/// <summary> /// 处理制版信息 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void fileSystemWatcher1_Created(object sender, FileSystemEventArgs e) { try { string fsw_path = this.fileSystemWatcher1.Path + @e.Name.ToString(); //dic_files.TryAdd(e.Name.ToString(), e.Name.ToString()); thread_fsw2 td = new thread_fsw2("grade", fsw_path, mWebsocket); check_fsw_2 = new Thread(new ThreadStart(td.Thread_Watch_fsw2)); check_fsw_2.IsBackground = true; check_fsw_2.Start(); websocket.Dwon(mWebsocket.spath, mWebsocket.gradeList); } catch (Exception ex) { IniHelper.WriteLog(ex); if (ex.Message.Contains("集合已修改")) { MessageBox.Show("请稍后再试"); } return; } }
/// <summary> /// 处理排料信息 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void fileSystemWatcher4_Created(object sender, FileSystemEventArgs e) { try { string fsw_path = this.fileSystemWatcher4.Path + "\\" + @e.Name.ToString();//订单号文件夹 thread_fsw2 td = new thread_fsw2("maskList", fsw_path, mWebsocket); check_fsw_2 = new Thread(new ThreadStart(td.Thread_Watch_fsw2)); check_fsw_2.Start(); } catch (Exception ex) { MessageBox.Show(ex.Message); IniHelper.WriteLog(ex); } try { websocket.Dwon(mWebsocket.spath, mWebsocket.blowDown); } catch (Exception ex) { MessageBox.Show("下载失败", "错误提示"); IniHelper.WriteLog(ex); } }