public MainWindow() { InitializeComponent(); ResetView(); System.Windows.Threading.DispatcherTimer dispatcherTimer = new System.Windows.Threading.DispatcherTimer(); dispatcherTimer.Tick += dispatcherTimer_Tick; dispatcherTimer.Interval = new TimeSpan(0, 0, 0, 0, 500); dispatcherTimer.Start(); Thread updateThread = new Thread(UpdateThread); updateThread.Start(); #pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call. ServiceCommands.EditQueueStatus("1", "zamknieta"); #pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call. }
/// <summary> /// This method is called when pause button is clicked /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Btn_pause_Click(object sender, RoutedEventArgs e) { if (currentQueueStatus == "wstrzymana") { #pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call. ServiceCommands.EditQueueStatus("1", "otwarta"); #pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call. } else #pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call. { ServiceCommands.EditQueueStatus("1", "wstrzymana"); } #pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call. }