Example #1
0
 static public void InvokeAll(this MultiProcess item)
 {
     if (item != null)
     {
         item();
     }
 }
Example #2
0
 private void killProcessToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (listView1.SelectedItems.Count != 0)
     {
         string       ProcessToKill = listView1.SelectedItems[0].SubItems[1].Text;
         DialogResult ConfirmKill   = MessageBox.Show("Do you wanna kill the process [" + ProcessToKill + "]", "Kill Process Confirmation", MessageBoxButtons.YesNo);
         if (ConfirmKill == DialogResult.Yes)
         {
             try
             {
                 Process[] KillProcess = Process.GetProcessesByName(ProcessToKill);
                 foreach (Process MultiProcess in KillProcess)
                 {
                     MultiProcess.Kill();
                 }
                 listView1.Items.Clear();
                 ListProcesses();
             }
             catch (Exception ex)
             {
                 MessageBox.Show(ex.Message);
             }
         }
         else
         {
             MessageBox.Show("Process Kill Aborted");
         }
     }
 }
Example #3
0
 static public void InvokeAll <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10>(this MultiProcess <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10> item, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10)
 {
     if (item != null)
     {
         item(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);
     }
 }
Example #4
0
 static public void InvokeAll <P1, P2, P3, P4, P5, P6, P7>(this MultiProcess <P1, P2, P3, P4, P5, P6, P7> item, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7)
 {
     if (item != null)
     {
         item(p1, p2, p3, p4, p5, p6, p7);
     }
 }
Example #5
0
 static public void InvokeAll <P1, P2, P3, P4, P5>(this MultiProcess <P1, P2, P3, P4, P5> item, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5)
 {
     if (item != null)
     {
         item(p1, p2, p3, p4, p5);
     }
 }
Example #6
0
 static public void InvokeAll <P1, P2, P3>(this MultiProcess <P1, P2, P3> item, P1 p1, P2 p2, P3 p3)
 {
     if (item != null)
     {
         item(p1, p2, p3);
     }
 }
Example #7
0
 static public void InvokeAll <P1, P2>(this MultiProcess <P1, P2> item, P1 p1, P2 p2)
 {
     if (item != null)
     {
         item(p1, p2);
     }
 }
Example #8
0
 static public void InvokeAll <P1>(this MultiProcess <P1> item, P1 p1)
 {
     if (item != null)
     {
         item(p1);
     }
 }
 void Player_PlayerError(object sender, MultiProcess.Client.EventArg.PlayerErrorEventArgs e)
 {
     Application.Current.Dispatcher.Invoke(
     () =>
     { MessageBox.Show(this.View, e.ErrorCode + "\n" + e.ErrorMessage, "Error"); });
 }