/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void timer1_Tick() { string IP = ""; while (true) { Thread.Sleep(1000); try { IP = AppConfig.GetIPAdress(); JtWcfMainHelper.InitPara(IP, "", ""); JtWcfTaskHelper.InitPara(IP, "", ""); _mainConnected = JtWcfMainHelper.IsConnected; _taskConnected = JtWcfTaskHelper.IsConnected; IDevManager.ISetDevBacks(JtWcfMainHelper.GetDevList()); DoWork(); } catch { } } }
/// <summary> /// 发送站点 /// </summary> /// <param name="tar"></param> public void ISendTar(int tar) { if (_devBack != null && CurTar == "0") { JtWcfMainHelper.InitPara(AppConfig.GetIPAdress(), "", ""); ///启动指令 JtWcfMainHelper.SendOrder(_devBack.DevId, new CommonDeviceOrderObj("站点", 3, tar)); } }
/// <summary> /// /// </summary> public void ISendRun(string source) { if (_devBack != null && CurStatue == "3") { JtWcfMainHelper.InitPara(AppConfig.GetIPAdress(), "", ""); ///启动指令 JtWcfMainHelper.SendOrder(_devBack.DevId, new CommonDeviceOrderObj(source, 1)); } }