private void StopTimerTick() { if (UiTimer != null) { UiTimer.Stop(); } }
private void TrainTimer_Elapsed(object sender, ElapsedEventArgs e) { Counter = 0; FirstEventTime = DateTime.MinValue; LastEventTime = DateTime.MinValue; UiTimer.Stop(); }
public Effect(EffectManager.EffectEnums Effect, Vector2 Location, bool Spritesheet) { EffectE = Effect; effectTex = GetEffect(Effect); effectLength = GetEffectLength(Effect); location = Location; spriteSheet = Spritesheet; Timer = new UiTimer(effectLength); }
public EngineEventsManagerService([ServiceDependency] StateManagerService stateManager, [ServiceDependency] IEngineCmdManagerService engineCmdManager) { _StateManager = stateManager; _EngineCmdManager = engineCmdManager; _ScreenSaverTimer = new UiTimer(Settings.Default.NoJacksScreenSaverSg * 1000); _ScreenSaverTimer.AutoReset = false; _ScreenSaverTimer.Elapsed += OnScreenSaverTimerElapsed; _HangupCallsTimer = new UiTimer(Settings.Default.NoJacksEndComunicationsSg * 1000); _HangupCallsTimer.AutoReset = false; _HangupCallsTimer.Elapsed += OnHangupCallsTimerElapsed; }
public async Task NewFollower(string newFollowerName) { // Cheer 200 goranhal 15/9/19 // Cheer 110 copperbeardy 20/9/19 if (Configuration.Type != UserActivityConfiguration.UserActivityTrainType.Follow) { return; } // cheer 1000 jamesmontemagno 15/10/19 // cheer 1050 tbdgamer 15/10/19 TrackNewFollowers(); TrainTimer.Stop(); TrainTimer.Interval = TimeSpan.FromSeconds(Configuration.MaxTimeBetweenActionsInSeconds).TotalMilliseconds; if (this.Counter == 0) { FirstEventTime = DateTime.Now; } LastEventTime = DateTime.Now; this.Counter++; LatestFollower = newFollowerName; await StartAnimation(); TrainTimer.Start(); InvokeAsync(StateHasChanged); if (!UiTimer.Enabled) { UiTimer.Start(); } /** * If the train type isnt FOLLOWER stop processing * If the train has not started, start it * ==> animation & timer * If the train HAS started * => increment train, restart animation, reset timer * * When the timer expires, clear animation, zero-out the train? * * NOTE: Store a list of the new followers so that we don't retrigger the train for the same follower multiple times * * */ }
private async Task StartAnimation() { UiTimer.Stop(); await InvokeAsync(StateHasChanged); }
private void StopTimerTick() { UiTimer?.Stop(); }
void Awake() { instance = this; }
public Effect(EffectManager.EffectEnums Effect, Vector2 Location, bool Spritesheet) { EffectE = Effect; effectTex = GetEffect(Effect); effectLength = GetEffectLength(Effect); location = Location; spriteSheet = Spritesheet; Timer = new UiTimer(effectLength); }