private void CheckForLogin() { while (Status != Constants.LoginStatus.LoggedIn) { Thread.Sleep(100); } m_player = Battlelist.GetPlayer(); m_loggedIn = true; LooginChecker = new Thread(new ThreadStart(CheckForLogOut)); LooginChecker.Start(); }
public Client(Process pr) { try { Process = pr; Handle = Util.WinApi.OpenProcess(Util.WinApi.PROCESS_ALL_ACCESS, 0, (uint)pr.Id); Process.EnableRaisingEvents = true; Process.Exited += (process_Exited); MainWindowHandle = pr.MainWindowHandle; Addresses = new Adresses.Addresses(this); m_memory = new MemoryHelper(this); m_battlelist = new Battlelist(this); LooginChecker = new Thread(new ThreadStart(CheckForLogin)); LooginChecker.Start(); } catch (Exception ex) { System.Windows.Forms.MessageBox.Show("Run as admin!"); // System.Windows.Forms.MessageBox.Show(ex.ToString()); throw; } }