mengxiangge 5 年 前
コミット
647534232e
1 ファイル変更22 行追加2 行削除
  1. 22 2
      Starter/Program.cs

+ 22 - 2
Starter/Program.cs

@@ -23,8 +23,28 @@ namespace ExportStart
         [STAThread]
         static void Main(string[] args)
         {
-            string command = args[0];
-            string path = args[1];
+            string command = null;
+            string path = null;
+            if (args.Length > 0)
+            {
+                command = args[0];
+            }
+            if (args.Length > 1)
+            {
+                path = args[1];
+            }
+#if DEBUG
+            if (string.IsNullOrWhiteSpace(command))
+            {
+                command = "DataExport";
+                path = @"E:\导出测试\test.rvt";
+            }
+          
+#endif
+            if (string.IsNullOrEmpty(command))
+            {
+                Console.WriteLine("命令参数错误");
+            }
             Console.WriteLine(command);
             Console.WriteLine(path);
             if (File.Exists(path)&&Enum.TryParse(command, out CommandType commandType))