/// <summary> /// 停止流盘任务 /// </summary> public override void Stop() { txtFileStream = new FileStream(FilePath + "\\" + currentTime + ".txt", FileMode.Append); StreamWriter txt = new StreamWriter(txtFileStream); txt.WriteLine("ElapsedTime = " + (DateTime.Now - startTime).TotalMilliseconds); txt.Close(); txtFileStream.Close(); if (_thdFetchAndWriteData.IsAlive == true) { if (false == _thdFetchAndWriteData.Join(200)) { _thdFetchAndWriteData.Abort(); JYLog.Print(JYLogLevel.DEBUG, "WriteDataFile Thread Exit Abnormally..."); } } aitask.Stop(); _wt.Close(); _fs.Close(); }
public void Stop() { AITask.Stop(); AITask.Channels.Clear(); }