protected void DoSystemStateChanged(MonitorSystemState state) { try { CLocalSystem.WriteInfoLog(string.Format("MonitorSystem[{0}] SystemState={1} UserName={2}", Name, state, (state == MonitorSystemState.Login ? UserName : ""))); if (!IsLocal && state != MonitorSystemState.Login) { SystemContext.SystemCleanup(); } if (OnSystemStateChanged != null) { if (CLocalSystem.MainForm != null) { MethodInvoker form_invoker = delegate { OnSystemStateChanged(SystemContext, Name, state); }; CLocalSystem.MainForm.Invoke(form_invoker); } else { OnSystemStateChanged(SystemContext, Name, state); } } } catch (Exception e) { CLocalSystem.WriteErrorLog(string.Format("CMonitorSystem.DoSystemStateChanged Exception:{0}", e)); } }
private void DoDisconnected(IMonitorSystemContext context, IProcessor processor) { if (CheckOrigin(context, processor)) { mOldState = State; LoginUser = null; State = MonitorSystemState.Logout; } }
protected void DoConnected(IMonitorSystemContext context, IProcessor processor) { if (CheckOrigin(context, processor)) { mOldState = MonitorSystemState.None; if (mOldState == MonitorSystemState.Login) { if (!mConfig.UserName.Equals("") && !mConfig.Password.Equals("")) { this.Login(mConfig.UserName, mConfig.Password, true); } } } }
private void DoRemoteSystemStateChanged(IMonitorSystemContext context, string name, MonitorSystemState state) { IMonitorSystem system = comboBox_monitorSystem.SelectedItem as IMonitorSystem; if (system != null && system.Name.Equals(name)) { InitMonitorList(context); } }
private void DoSystemStateChanged(IMonitorSystemContext context, string name, MonitorSystemState state) { if (OnSystemStateChanged != null) { OnSystemStateChanged(context, name, state); } }