Esempio n. 1
0
        public void OnEnabled()
        {
            Enabled = true;
            Log.Info(" v{0} Enabled", Version);
            BotMain.OnStart += BotMain_OnStart;
            BotMain.OnStop  += BotMain_OnStop;
            CurrentBehavior  = DefaultBehavior;
            EventManager.Enable();
            BotHistory.Enable();
            TabUi.InstallTab();
            ChangeMonitor.Enable();

            Service.Connect();
            CommunicationThread.ThreadStart();

            // When start button is clicked, hooks are cleared,
            TreeHooks.Instance.OnHooksCleared += OnHooksCleared;
        }
Esempio n. 2
0
 private void Enable()
 {
     if (!Application.Current.CheckAccess())
     {
         return;
     }
     Enabled             = true;
     TrinityCombat.Party = new AutoFollowPartyProvider();
     Log.Info(" v{0} Enabled", Version);
     BotMain.OnStart += BotMain_OnStart;
     BotMain.OnStop  += BotMain_OnStop;
     CurrentBehavior  = DefaultBehavior;
     EventManager.Enable();
     TabUi.InstallTab();
     ChangeMonitor.Enable();
     Server.ServerStartAttempts = 0;
     Client.ConnectionAttempts  = 0;
     Service.Connect();
     CommunicationThread.ThreadStart();
     TreeHooks.Instance.OnHooksCleared += OnHooksCleared;
 }