Пример #1
0
        private void ErrorMessageTimer_Tick(object sender, EventArgs e)
        {
            Dispatcher.Invoke(() =>
            {
                StatusMessage.Content = " ";
            });

            ErrorMessageTimer.Stop();
        }
Пример #2
0
        /// <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);
        }
Пример #3
0
        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);
        }