Browse Source

修改自动启动方式

章政 8 years ago
parent
commit
cf6e482ed1
2 changed files with 6 additions and 1 deletions
  1. 1 0
      UAS_XmlAnalysor/Form1.Designer.cs
  2. 5 1
      UAS_XmlAnalysor/Form1.cs

+ 1 - 0
UAS_XmlAnalysor/Form1.Designer.cs

@@ -212,6 +212,7 @@
             this.AutoStart.TabIndex = 16;
             this.AutoStart.Text = "开机自动启动";
             this.AutoStart.UseVisualStyleBackColor = true;
+            this.AutoStart.CheckedChanged += new System.EventHandler(this.AutoStart_CheckedChanged);
             // 
             // Form1
             // 

+ 5 - 1
UAS_XmlAnalysor/Form1.cs

@@ -118,7 +118,6 @@ namespace UAS_XmlAnalysor
             ChooseFolder.Enabled = false;
             ChooseBackUpFolder.Enabled = false;
             StopWatch.Enabled = true;
-            SetAutoRun();
             OperateResult.AppendText("开始执行监控\n");
         }
 
@@ -285,5 +284,10 @@ namespace UAS_XmlAnalysor
                 e.Cancel = true;
             }
         }
+
+        private void AutoStart_CheckedChanged(object sender, EventArgs e)
+        {
+            SetAutoRun();
+        }
     }
 }