private void ErrorMessageTimer_Tick(object sender, EventArgs e) { Dispatcher.Invoke(() => { StatusMessage.Content = " "; }); ErrorMessageTimer.Stop(); }
/// <summary> /// Set the message to show on the status bar /// </summary> /// <param name="message"></param> public void SetStatusMessage(string message) { StatusMessage.Content = message; if (ErrorMessageTimer.IsEnabled) { ErrorMessageTimer.Stop(); } ErrorMessageTimer.Start(); SetLoader(false); }
protected override void OnClosing(CancelEventArgs e) { if (PoolDispatcherTimer.IsEnabled) { PoolDispatcherTimer.Stop(); } if (MinerDispatcherTimer.IsEnabled) { MinerDispatcherTimer.Stop(); } if (ErrorMessageTimer.IsEnabled) { ErrorMessageTimer.Stop(); } SaveWindowState(MainGrid); base.OnClosing(e); }