// 点击“开始”按钮 void startBT_Click(object sender, EventArgs e) { buildCacheAction.SaveFilename = ConstValue.CacheFilename; buildCacheAction.RootPath = buildCacheForm.rootPathTB.Text; Constrain.NotEmptyString(buildCacheAction.RootPath); buildCacheAction.Start(); }
public override void Start() { Constrain.NotEmptyString(this.RootPath); Constrain.NotEmptyString(this.SaveFilename); if (thread != null && thread.IsAlive) { Trace.WriteLine("本 Action 已经启动,但是又尝试重入,已经忽略该请求"); return; } // 清除之前残留的信息 ErrorInfo = null; CurrentWorkingDirectory = null; // 开始新的征程 :) thread = new Thread(_start); thread.Start(); fireStarted(this); }