コード例 #1
0
ファイル: MainForm.cs プロジェクト: Bia10/clrn
 private void InitMain()
 {
     wow = new Memory.Memory();
     SS = new SpellSearcher();
     FH = new FarmHonor();
     Farmer = new Farm();
     Running = false;
     PCoord = new List<Coords>();
     if (wow.wow.ProcessId != 0)
     {
         notifyIcon1.Text = "Farmhelper: attached to wow: " + wow.wow.ProcessId.ToString();
         WowControl.UpdateStatus("Attached to wow: " + wow.wow.ProcessId.ToString() + ".");
         MainTimer.Enabled = true;
     }
     else
     {
         WowControl.UpdateStatus("Not found wow process.");
         notifyIcon1.Text = "Farmhelper: not found wow process";
     }
     WowControl.LoadGoods();
     ProcessMainPage();
 }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: Bia10/clrn
 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.");
 }