示例#1
0
        public void WriteLine(string path, string line)
        {
            FunctionSub.Close_Excel_Process();//加载参数前,判断有没有打开Excel,打开的话关掉
            CsvInfo csvInfo = new CsvInfo();

            PathHelper(path);                 //if the path is not exit? creat it by auto
            csvInfo.Path = path;
            csvInfo.Line = line;
            queue.Enqueue(csvInfo);
        }
示例#2
0
 private void FrmMain_Load(object sender, EventArgs e)
 {
     this.Location    = new Point(0, 0);
     this.MinimumSize = this.Size;
     #region 检查执行参数文件夹
     System.IO.DirectoryInfo SFile = new System.IO.DirectoryInfo(PVar.BZ_ParameterPath);
     CheckForIllegalCrossThreadCalls = false;
     if (!SFile.Exists)
     {
         if (Interaction.MsgBox("参数文件不存在,程序拒绝加载,请查看路径:" + "\r\n" + PVar.BZ_ParameterPath + "\r\n" + "执行函数Main_Load()", Constants.vbExclamation, "重要参数文件") == Constants.vbOK)
         {
             //ProjectData.EndApp();
         }
     }
     #endregion
     this.Text                   = Globals.settingMachineInfo.什么机器.ToString();
     PageLogin.loginTp           = loginType.Op;
     PageEngineering.PauseClick += On_Pause;
     //PageEngineering.On_EMG += On_ErrorBtn;
     PageProduction.On_Errorbtn += On_ErrorBtn;
     FunctionSub.Close_Excel_Process();//加载参数前,判断有没有打开Excel,打开的话关掉
     Globals.BindDevice();
     #region 加载Data
     DataManager.Instance.toosing      = DataManager.Instance.toosing.Load();//本机不存在抛料问题
     DataManager.Instance.yield        = DataManager.Instance.yield.Load();
     DataManager.Instance.uph          = DataManager.Instance.uph.Load();
     DataManager.Instance.currentyield = DataManager.Instance.currentyield.LoadCurrentYield();
     DataManager.Instance.alarmRecord  = DataManager.Instance.alarmRecord.Load();
     #endregion
     InitPages();
     InitTask();
     CsvServer.Instance.Start();
     if (Globals.settingMachineInfo.什么机器 == WhichMachine.MMS)
     {
         DAQ.Instance.Start();                                                     //for pci9222 analog
     }
     PVar.LampStatus = 50;
     Globals.InitDevice();
     if (Globals.settingFunc.打开SSH通信)
     {
         SSH_Thread.Instance.Start();
         SSH.Instance.Connect(Globals.settingPara.SSH远程IP地址, 22, Globals.settingPara.SSH用户名, out Globals.SSHconnSt);
     }
     this.Btn_Start.BackColor = Mycolor.Red;
     this.Btn_Pause.BackColor = Mycolor.None;
     this.Btn_Stop.BackColor  = Mycolor.None;
     this.Btn_Start.Enabled   = true;
     this.Btn_Stop.Enabled    = false;
     this.Btn_Pause.Enabled   = true;
     this.timer1.Enabled      = true;
 }