예제 #1
0
파일: Main.cs 프로젝트: catontheway/myevo
 private void MainBtnRefreshProcessClick(object sender, EventArgs e)
 {
     MainComProcessSelection.Items.Clear();
     MainComProcessSelection.Update();
     _wowProc = Process.GetProcessesByName("Wow");
     foreach (Process proc in _wowProc)
     {
         string name = "Not ingame";
         if (Memory.OpenProcess(proc.Id))
         {
             try
             {
                 if (Memory.Read <byte>(Memory.BaseAddress + (uint)PublicPointers.InGame.InGame) == 1)
                 {
                     try
                     {
                         name = Memory.ReadUtf8(Memory.BaseAddress + (uint)PublicPointers.Globals.PlayerName, 256);
                     }
                     catch
                     {
                     }
                 }
             }
             catch
             {
             }
         }
         MainComProcessSelection.Items.Add(proc.MainWindowTitle + "- " + proc.Id + " - " + name);
     }
     if (MainComProcessSelection.Items.Count == 0)
     {
         MainComProcessSelection.Items.Add("No game");
     }
     MainComProcessSelection.SelectedIndex = 0;
 }
예제 #2
0
 private void MainBtnRefreshProcessClick(object sender, EventArgs e)
 {
     MainComProcessSelection.Items.Clear();
     MainComProcessSelection.Update();
     _wowProc = Process.GetProcessesByName("Wow");
     foreach (Process proc in _wowProc)
     {
         MainComProcessSelection.Items.Add(proc.MainWindowTitle + "- " + proc.Id);
     }
     if (MainComProcessSelection.Items.Count == 0)
     {
         MainComProcessSelection.Items.Add("No game");
     }
     MainComProcessSelection.SelectedIndex = 0;
 }