Exemple #1
0
 private void LokiPoeOnOnGuiTick(object sender, GuiTickEventArgs guiTickEventArgs)
 {
     if (!BotManager.IsRunning)
     {
         using (LokiPoe.AcquireFrame())
         {
             _data.Update();
         }
     }
 }
Exemple #2
0
 private void TritonHsOnOnGuiTick(object sender, GuiTickEventArgs guiTickEventArgs)
 {
     // Only update if we're actually enabled.
     if (IsEnabled)
     {
         Application.Current.Dispatcher.BeginInvoke(new Action(() =>
         {
             var leftControl     = Wpf.FindControlByName <Label>(Application.Current.MainWindow, "StatusBarLeftLabel");
             leftControl.Content = string.Format("运行时间: {0}", TritonHs.Runtime.Elapsed.ToString("h'小时 'm'分 's'秒'"));
         }));
     }
 }
Exemple #3
0
 private void TritonHsOnOnGuiTick(object sender, GuiTickEventArgs guiTickEventArgs)
 {
     // Only update if we're actually enabled.
     if (IsEnabled)
     {
         Application.Current.Dispatcher.BeginInvoke(new Action(() =>
         {
             var leftControl     = Wpf.FindControlByName <Label>(Application.Current.MainWindow, "StatusBarLeftLabel");
             leftControl.Content = string.Format("Runtime: {0}", TritonHs.Runtime.Elapsed.ToString("h'h 'm'm 's's'"));
         }));
         if (!_isNewgameing && _isStartingNewGame)
         {
             _numStartingNewGame++;
             if (_numStartingNewGame >= 75)
             {
                 Log.DebugFormat("StartingNewGame is hang 50s , so Unlock this Hero");
                 _numStartingNewGame = 0;
                 _isUnlocking        = true;
                 UnlockHeroConf();
             }
         }
         if (_tickstop)
         {
             Log.InfoFormat("The stats plugin is stop, Ticktime not update");
         }
         else
         {
             if (_numtick >= 60)
             {
                 DateTime baseTime = Convert.ToDateTime("1970-1-1 8:00:00");
                 TimeSpan ts       = DateTime.Now - baseTime;
                 long     intervel = (long)ts.TotalSeconds;
                 StatsSettings.Instance.Ticktime = intervel;
                 _numtick = 0;
                 UpdateMainGuiStats();
             }
             else
             {
                 _numtick++;
             }
         }
     }
 }