コード例 #1
0
 protected void FireOnMessageReceived(MessageRecivedEventHandler e)
 {
     if (this.OnMessageReceived != null)
     {
         OnMessageReceived(this, e);
     }
 }
コード例 #2
0
 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;
     }
 }
コード例 #3
0
        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;
            }
        }
コード例 #4
0
        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;
            }
        }
コード例 #5
0
 private void NetCon_OnMessageReceived(object sender, MessageRecivedEventHandler e)
 {
     this.FireOnMessageReceived(e);
 }