public ViewStateObject(Account account, DateTime time, Process process, EViewState viewstate)
 {
     Account   = account;
     Time      = time;
     Process   = process;
     ViewState = viewstate;
 }
Exemplo n.º 2
0
 public ViewStateObject(Account account, DateTime time, Process process, EViewState viewstate)
 {
     Account = account;
     Time = time;
     Process = process;
     ViewState = viewstate;
 }
        private static void AddDeadProcessToTheList(Process gw2Process, EViewState viewState)
        {
            Account wanted =
                Config.Singleton.AccountSettings.FirstOrDefault(a => a.PID == gw2Process.Id);

            if (wanted != null)
            {
                DeadGW2Windows.Add(gw2Process, new ViewStateObject(wanted, DateTime.Now, gw2Process, viewState));
            }
            else
            {
                DeadGW2Windows.Add(gw2Process, new ViewStateObject(new Account(), DateTime.Now, gw2Process, viewState));
            }
        }
Exemplo n.º 4
0
 private static void GetRidOfProcessesThatHaveBeenIdleForLong(Process gw2Process, EViewState viewState)
 {
     KeyValuePair<Process, ViewStateObject> wanted =
         DeadGW2Windows.FirstOrDefault(p => p.Key.Id == gw2Process.Id);
     if (wanted.Key != null &&
         (DateTime.Now - wanted.Value.Time).TotalSeconds > Config.Singleton.GeneralSettings.FrozenTime)
     {
         if (viewState != EViewState.ViewGameplay && wanted.Value.Account != null && wanted.Value.Check())
         {
             wanted.Value.DoWork();
         }
     }
 }
Exemplo n.º 5
0
 private static void AddDeadProcessToTheList(Process gw2Process, EViewState viewState)
 {
     Account wanted =
         Config.Singleton.AccountSettings.FirstOrDefault(a => a.PID == gw2Process.Id);
     if (wanted != null)
     {
         DeadGW2Windows.Add(gw2Process, new ViewStateObject(wanted, DateTime.Now, gw2Process, viewState));
     }
     else
     {
         DeadGW2Windows.Add(gw2Process, new ViewStateObject(new Account(), DateTime.Now, gw2Process, viewState));
     }
 }
 public bool IsViewState(EViewState toCompare)
 {
     return(ViewState == toCompare);
 }
        private static void GetRidOfProcessesThatHaveBeenIdleForLong(Process gw2Process, EViewState viewState)
        {
            KeyValuePair <Process, ViewStateObject> wanted =
                DeadGW2Windows.FirstOrDefault(p => p.Key.Id == gw2Process.Id);

            if (wanted.Key != null &&
                (DateTime.Now - wanted.Value.Time).TotalSeconds > Config.Singleton.GeneralSettings.FrozenTime)
            {
                if (viewState != EViewState.ViewGameplay && wanted.Value.Account != null && wanted.Value.Check())
                {
                    wanted.Value.DoWork();
                }
            }
        }
Exemplo n.º 8
0
 public void ChangeViewState(EViewState state)
 {
     m_UI.m_ViewState.selectedPage = Enum.GetName(typeof(EViewState), state);
 }
Exemplo n.º 9
0
 public bool IsViewState(EViewState toCompare)
 {
     return ViewState == toCompare;
 }