layouts/framework/FrameFileTree.xaml.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
using tablegen2.logic;

namespace tablegen2.layouts
{
    /// <summary>
    /// FrameFileTree.xaml 的交互逻辑
    /// </summary>
    public partial class FrameFileTree : UserControl
    {
        public event Action OpenExcelRequest;

        public FrameFileTree()
        {
            InitializeComponent();
            if (AppData.Config != null)
                refreshExcelPath(AppData.Config.ExcelDir);
            lv.CreateExcelEvent += () => Util.performClick(btnAddExcel);
        }

        public IEnumerable<string> AllExcels
        {
            get { return lv.AllExcels; }
        }

        public void refreshExcelPath(string excelPath)
        {
            if (string.IsNullOrEmpty(excelPath) || !System.IO.Directory.Exists(excelPath))
            {
                txtPath.Text = string.Empty;
                lv.Visibility = Visibility.Hidden;
                layer.Visibility = Visibility.Visible;
            }
            else
            {
                txtPath.Text = excelPath;
                lv.Visibility = Visibility.Visible;
                layer.Visibility = Visibility.Hidden;
                lv.refreshByDir(excelPath);
            }
        }

        private void btnOpenExcel_Clicked(object sender, RoutedEventArgs e)
        {
            if (OpenExcelRequest != null)
                OpenExcelRequest.Invoke();
        }

        private void btnAddExcel_Clicked(object sender, RoutedEventArgs e)
        {
            var panel = new HeaderPage();
            panel.IsNewFileMode = true;
            panel.ExcelDir = AppData.Config.ExcelDir;
            panel.refreshDislpay(new List<TableExcelHeader>()
            {
                //new TableExcelHeader()
                //{
后面还有 29 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。