protected void FireOnMessageReceived(MessageRecivedEventHandler e) { if (this.OnMessageReceived != null) { OnMessageReceived(this, e); } }
private void Netmanager_OnMessageReceived(object sender, MessageRecivedEventHandler e) { switch (e.Code) { case MessageCode.MC_FileList: RCS_FileList gf = Remote_Content_Show_MessageGenerator.GetMessageFromByte<RCS_FileList>(e.MessageData); foreach (FileItem fi in gf.Items) { this.items.Add(fi); } this.Dispatcher.Invoke(() => { this.Elemets.ItemsSource = items; } ); break; } }
private void Netmanager_OnMessageReceived(object sender, MessageRecivedEventHandler e) { switch (e.Code) { case MessageCode.MC_Event_List_Response: RCS_Event_List_Response rcsELR = Remote_Content_Show_MessageGenerator.GetMessageFromByte<RCS_Event_List_Response>(e.MessageData); this.Dispatcher.Invoke(() => { foreach (Event ev in rcsELR.EventList.List) { this.eventItems.Add(new EventItemVM(ev)); } this.ErrorListBox.ItemsSource = eventItems; } ); break; } }
private void Netmanager_OnMessageReceived(object sender, MessageRecivedEventHandler e) { switch (e.Code) { case MessageCode.MC_Process_List_Response: RCS_Process_List_Response rcsPLR = Remote_Content_Show_MessageGenerator.GetMessageFromByte<RCS_Process_List_Response>(e.MessageData); this.Dispatcher.Invoke(() => { AgentProcessOverview apo = new AgentProcessOverview(rcsPLR, e.Ip); this.AddedAgents.Items.Add(apo); } ); // Add the results for later! foreach (ProcessDescription pd in rcsPLR.ProcesseList.Processes) { this.allProcess.Add(new ProcessDescriptionWrapper(pd, e.Ip, rcsPLR.ClientName)); } this.job.Agents.Add(new Agent() { IP = e.Ip.ToString() }); break; } }
private void NetCon_OnMessageReceived(object sender, MessageRecivedEventHandler e) { this.FireOnMessageReceived(e); }