Ejemplo n.º 1
0
        //TODO : Need add BotManager to manage all feature related to multibot,
        public bool ReInitSessionWithNextBot(MultiAccountManager.BotAccount bot = null, double lat = 0, double lng = 0, double att = 0)
        {
            this.CatchBlockTime = DateTime.Now; //remove any block
            MSniperServiceTask.BlockSnipe();
            this.VisibleForts.Clear();
            this.Forts.Clear();

            var manager = TinyIoCContainer.Current.Resolve <MultiAccountManager>();

            var nextBot = manager.GetSwitchableAccount(bot);

            this.Settings.AuthType         = nextBot.AuthType;
            this.Settings.Password         = nextBot.Password;
            this.Settings.Username         = nextBot.Username;
            this.Settings.DefaultAltitude  = att == 0 ? this.Client.CurrentAltitude : att;
            this.Settings.DefaultLatitude  = lat == 0 ? this.Client.CurrentLatitude : lat;
            this.Settings.DefaultLongitude = lng == 0 ? this.Client.CurrentLongitude : lng;
            this.Stats = new SessionStats(this);
            this.Reset(this.Settings, this.LogicSettings);
            //CancellationTokenSource.Cancel();
            this.CancellationTokenSource = new CancellationTokenSource();

            this.EventDispatcher.Send(new BotSwitchedEvent(nextBot)
            {
            });

            if (this.LogicSettings.MultipleBotConfig.DisplayList)
            {
                manager.DumpAccountList();
            }
            return(true);
        }
Ejemplo n.º 2
0
        private void SelectAccountForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (this.SelectedAccount == null)
            {
                var manager = TinyIoC.TinyIoCContainer.Current.Resolve <MultiAccountManager>();

                SelectedAccount            = manager.GetMinRuntime();
                SelectedAccount.LoggedTime = DateTime.Now;
            }
        }
Ejemplo n.º 3
0
 public ActiveSwitchAccountManualException(MultiAccountManager.BotAccount requestedAccount)
 {
     RequestedAccount = requestedAccount;
 }
Ejemplo n.º 4
0
 private void selectBot_Click(object sender, EventArgs e)
 {
     SelectedAccount = (MultiAccountManager.BotAccount)((Button)sender).Tag;
     this.Close();
 }
Ejemplo n.º 5
0
 public BotSwitchedEvent(MultiAccountManager.BotAccount nextBot)
 {
     this.Account = nextBot;
 }