|
@@ -23,8 +23,28 @@ namespace ExportStart
|
|
[STAThread]
|
|
[STAThread]
|
|
static void Main(string[] args)
|
|
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(command);
|
|
Console.WriteLine(path);
|
|
Console.WriteLine(path);
|
|
if (File.Exists(path)&&Enum.TryParse(command, out CommandType commandType))
|
|
if (File.Exists(path)&&Enum.TryParse(command, out CommandType commandType))
|