Exemplo n.º 1
0
        /// <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();
        }
Exemplo n.º 2
0
 public void Stop()
 {
     AITask.Stop();
     AITask.Channels.Clear();
 }