CommandHelper.cs

(开头部分) 10KB

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

using System;
using System.IO;
using System.Text;
using System.Windows;
using tablegen2.logic;
using tablegen2.layouts;
using System.Collections.Generic;
using System.Linq;

namespace tablegen2
{
    internal enum CommandType
    {
        Unknown = 0,
        Help,
        OpenDatFile,
        OpenExcelFile,
        ExportFiles,
    }

    internal static class CommandHelper
    {
        //-h|-help|/h|/help
        //fullPath.exdat
        //fullPath.xls|.xlsx
        //-i excelFullPath|excelDir -o outputDir -t xml|json|lua|dat

        public static CommandType Command { get; internal set; }

        public static string OpenDatFullPath { get; internal set; }

        public static string OpenExcelFullPath { get; internal set; }

        public static string ExportInputPath { get; internal set; }
        public static string ExportOutputDir { get; internal set; }
        public static string ExportType { get; internal set; }

        static CommandHelper()
        {
            _analyzeCommandParameter();
        }

        public static void MsgBox(string str, params object[] args)
        {
           MessageBox.Show(
                string.Format(str, args),
                "提示",
                System.Windows.MessageBoxButton.OK,
                System.Windows.MessageBoxImage.Information);
        }

        private static void _analyzeCommandParameter()
        {
            Command = CommandType.Unknown;

            do
            {
                string[] arr = Environment.GetCommandLineArgs();
                if (arr.Length == 0)
                    break;
后面还有 251 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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