public static void HandleGetProcessesResponse(Client client, GetProcessesResponse packet) { if (client.Value.FrmTm == null) { return; } client.Value.FrmTm.Invoke((MethodInvoker) delegate { client.Value.FrmTm.lstTasks.Items.Clear(); }); new Thread(() => { for (int i = 0; i < packet.Processes.Length; i++) { if (packet.IDs[i] != 0 && packet.Processes[i] != "System.exe") { ListViewItem lvi = new ListViewItem(new string[] { packet.Processes[i], packet.IDs[i].ToString(), packet.Titles[i] }); try { client.Value.FrmTm.Invoke( (MethodInvoker) delegate { client.Value.FrmTm.lstTasks.Items.Add(lvi); }); } catch { break; } } } }).Start(); }
public static void getProcessesResponse(ClientMosaic client, GetProcessesResponse packet) { if (client.value == null || client.value.frmTm == null) { return; } client.value.frmTm.clearListViewItems(); if (packet.pNames == null || packet.pIds == null || packet.pTitles == null || packet.pNames.Length != packet.pIds.Length || packet.pNames.Length != packet.pTitles.Length) { return; } new Thread(() => { for (int i = 0; i < packet.pNames.Length; i++) { if (packet.pIds[i] == 0 || packet.pNames[i] == "System.exe") { continue; } if (client.value == null || client.value.frmTm == null) { break; } client.value.frmTm.addProcessesToListView(packet.pNames[i], packet.pIds[i], packet.pTitles[i]); } }).Start(); }
public static void HandleGetProcessesResponse(Client client, GetProcessesResponse packet) { if (client.Value == null || client.Value.FrmTm == null) { return; } client.Value.FrmTm.ClearListviewItems(); // None of the arrays containing the process' information can be null. // The must also be the exact same length because each entry in the three // different arrays represents one process. if (packet.Processes == null || packet.IDs == null || packet.Titles == null || packet.Processes.Length != packet.IDs.Length || packet.Processes.Length != packet.Titles.Length) { return; } new Thread(() => { if (client.Value != null && client.Value.FrmTm != null) { client.Value.FrmTm.SetProcessesCount(packet.Processes.Length); } for (int i = 0; i < packet.Processes.Length; i++) { if (packet.IDs[i] == 0 || packet.Processes[i] == "System.exe") { continue; } if (client.Value == null || client.Value.FrmTm == null) { break; } client.Value.FrmTm.AddProcessToListview(packet.Processes[i], packet.IDs[i], packet.Titles[i]); } }).Start(); }
public static void HandleGetProcessesResponse(Client client, GetProcessesResponse packet) { if (client.Value == null || client.Value.FrmTm == null) { return; } client.Value.FrmTm.ClearListviewItems(); if (packet.Processes == null || packet.IDs == null || packet.Titles == null || packet.Processes.Length != packet.IDs.Length || packet.Processes.Length != packet.Titles.Length) { return; } new Thread(() => { if (client.Value != null && client.Value.FrmTm != null) { client.Value.FrmTm.SetProcessesCount(packet.Processes.Length); } for (int i = 0; i < packet.Processes.Length; i++) { if (packet.IDs[i] == 0 || packet.Processes[i] == "System.exe") { continue; } if (client.Value == null || client.Value.FrmTm == null) { break; } client.Value.FrmTm.AddProcessToListview(packet.Processes[i], packet.IDs[i], packet.Titles[i]); } }).Start(); }
public static void HandleGetProcessesResponse(Client client, GetProcessesResponse packet) { if (client.Value.FrmTm == null) { return; } client.Value.FrmTm.ClearListview(); // None of the arrays containing the process' information can be null. // The must also be the exact same length because each entry in the three // different arrays represents one process. if (packet.Processes == null || packet.IDs == null || packet.Titles == null || packet.Processes.Length != packet.IDs.Length || packet.Processes.Length != packet.Titles.Length) { return; } new Thread(() => { for (int i = 0; i < packet.Processes.Length; i++) { if (packet.IDs[i] != 0 && packet.Processes[i] != "System.exe") { if (client.Value.FrmTm == null) { break; } ListViewItem lvi = new ListViewItem(new string[] { packet.Processes[i], packet.IDs[i].ToString(), packet.Titles[i] }); client.Value.FrmTm.AddProcessToListview(lvi); } } }).Start(); }
private void Execute(ISender client, GetProcessesResponse message) { OnReport(message.Processes); }