Пример #1
0
 private void OnInnerGaugeUpdate(object source, SwitchAxeEventArgs args)
 {
     Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Render, new Action(() =>
     {
         SwitchAxeInnerGauge  = args.InnerGauge / 100;
         IsUnderThirtyPercent = args.InnerGauge / 100 <= 0.3;
     }));
 }
Пример #2
0
        private void UpdateInformation()
        {
            var dummyArgs = new SwitchAxeEventArgs(Context);

            OnInnerGaugeUpdate(this, dummyArgs);
            OnOuterGaugeUpdate(this, dummyArgs);
            OnSwitchAxeBuffStateChange(this, dummyArgs);
            OnSwitchAxeBuffUpdate(this, dummyArgs);
            OnSafijiivaCounterUpdate(this, new JobEventArgs(Context));
        }
Пример #3
0
 private void OnSwitchAxeBuffStateChange(object source, SwitchAxeEventArgs args)
 {
     Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Render, new Action(() =>
     {
         if (!args.IsBuffActive)
         {
             SwitchAxeBuffPercentage = 0;
             SwitchAxeBuffTimer      = "0:00";
         }
     }));
 }
Пример #4
0
 private void OnSwitchAxeBuffUpdate(object source, SwitchAxeEventArgs args)
 {
     Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Render, new Action(() =>
     {
         if (args.IsBuffActive)
         {
             SwitchAxeBuffPercentage = args.SwitchAxeBuffTimer / 45;
             SwitchAxeBuffTimer      = TimeSpan.FromSeconds(args.SwitchAxeBuffTimer).ToString("m\\:ss");
         }
     }));
 }
Пример #5
0
 private void OnOuterGaugeUpdate(object source, SwitchAxeEventArgs args)
 {
     Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Render, new Action(() =>
     {
         IsChargeActive = args.SwordChargeTimer > 0;
         if (IsChargeActive)
         {
             SwitchAxeOuterGauge = args.SwordChargeTimer / args.SwordChargeMaxTimer;
             SwitchAxeOuterText  = TimeSpan.FromSeconds(args.SwordChargeTimer).ToString(args.SwordChargeTimer > 60 ? "m\\:ss" : "ss");
         }
         else
         {
             SwitchAxeOuterGauge = args.OuterGauge / 100;
             SwitchAxeOuterText  = $"{SwitchAxeOuterGauge:P0}";
         }
     }));
 }