void ProcessInnerMsgAgentStatus(bool isNew, string connectionID, string jsonFormatMsg) { if (isNew) { var agentStatus = Newtonsoft.Json.JsonConvert.DeserializeObject <CommonLib.InnerMsgAgentStatus>(jsonFormatMsg); FormUIManager.AddAgentListView(agentStatus); MainLib.MainLib.AddAgent(agentStatus); CommonLib.DevLog.Write(string.Format("Client:{0}. Agent 새로 등록", connectionID), CommonLib.LOG_LEVEL.INFO); } else { var msg = Newtonsoft.Json.JsonConvert.DeserializeObject <CommonLib.MsgAppServerStatus>(jsonFormatMsg); FormUIManager.ChangeAgentListView(connectionID, msg); MainLib.MainLib.ChangeAgentStatus(connectionID, msg); CommonLib.DevLog.Write(string.Format("Client:{0}. Agent 상태 갱신", connectionID)); } MainLib.MainLib.NotifyAgentInfoListToAllClients(); }
private void MainForm_Load(object sender, EventArgs e) { var serverConfig = new MainLib.SeverConfig { ServerAddress = Properties.Settings.Default.ServerAddress, SaveCCUAPIAddress = Properties.Settings.Default.SaveCCUAPIAddress, }; ProcessInnerMessage.Init(ServerLogicLib); FormUIManager.SetUIControl(listViewAgent, listViewRedis); textBoxServerAddress.Text = serverConfig.ServerAddress; var redisList = 레디스정보_리스뷰에_설정하기(); workProcessTimer.Tick += new EventHandler(OnProcessTimedEvent); workProcessTimer.Interval = new TimeSpan(0, 0, 0, 0, 32); workProcessTimer.Start(); ServerLogicLib.Init(serverConfig); ServerLogicLib.Init_Redis(redisList, checkBoxRedisStatus.Checked); }
void ProcessInnerMsgRedisCheckResult(string jsonFormatMsg) { var result = Newtonsoft.Json.JsonConvert.DeserializeObject <Tuple <string, string, string> >(jsonFormatMsg); FormUIManager.ChangeRedisStatus(result); ServerLogic.NotifyRedisStatus(jsonFormatMsg); }
void ProcessInnerMsgRemoveAgent(string connectionID) { FormUIManager.RemoveAgentListView(connectionID); MainLib.MainLib.RemoveAgent(connectionID); ServerLogic.NotifyRemoveAgentToAllClients(connectionID); }
void ProcessInnerMsgNotifyAgentAbNormal(string connectionID, string notifyMsg) { FormUIManager.ChangeAgentListView(connectionID, notifyMsg); CommonLib.DevLog.Write(string.Format("Client:{0}. Agent에 이상 발생: {1}", connectionID, notifyMsg), CommonLib.LOG_LEVEL.WARN); }