Example #1
0
 private void button16_Click(object sender, EventArgs e)
 {
     if (Process.GetProcessesByName("wow").Length > 1)
     {
         ProcessSelect PS = new ProcessSelect();
         PS.ShowDialog();
         wow     = new Memory.Memory();
         wow.PId = PS.PId;
         wow.InitMemory();
         FH      = new FarmHonor();
         Farmer  = new Farm();
         Running = false;
         PCoord  = new List <Coords>();
         if (wow.wow.ProcessId != 0)
         {
             WowControl.UpdateStatus("Attached to wow: " + wow.wow.ProcessId.ToString() + ".");
             MainTimer.Enabled = true;
             notifyIcon1.Text  = "Farmhelper: attached to wow: " + wow.wow.ProcessId.ToString();
         }
         else
         {
             WowControl.UpdateStatus("Not found wow process.");
             notifyIcon1.Text = "Farmhelper: not found wow process";
         }
         WowControl.LoadGoods();
         ProcessMainPage();
     }
     if (Process.GetProcessesByName("wow").Length == 1)
     {
         WowControl.UpdateStatus("Only one process found.");
         InitMain();
     }
     if (Process.GetProcessesByName("wow").Length == 0)
     {
         WowControl.UpdateStatus("Not found wow process.");
     }
 }
Example #2
0
 private void button16_Click(object sender, EventArgs e)
 {
     if (Process.GetProcessesByName("wow").Length > 1)
     {
         ProcessSelect PS = new ProcessSelect();
         PS.ShowDialog();
         wow = new Memory.Memory();
         wow.PId = PS.PId;
         wow.InitMemory();
         FH = new FarmHonor();
         Farmer = new Farm();
         Running = false;
         PCoord = new List<Coords>();
         if (wow.wow.ProcessId != 0)
         {
             WowControl.UpdateStatus("Attached to wow: " + wow.wow.ProcessId.ToString() + ".");
             MainTimer.Enabled = true;
             notifyIcon1.Text = "Farmhelper: attached to wow: " + wow.wow.ProcessId.ToString();
         }
         else
         {
             WowControl.UpdateStatus("Not found wow process.");
             notifyIcon1.Text = "Farmhelper: not found wow process";
         }
         WowControl.LoadGoods();
         ProcessMainPage();
     }
     if (Process.GetProcessesByName("wow").Length == 1)
     {
         WowControl.UpdateStatus("Only one process found.");
         InitMain();
     }
     if (Process.GetProcessesByName("wow").Length == 0)
         WowControl.UpdateStatus("Not found wow process.");
 }