/// <summary>
        /// Trigger the Aktive Job Changed Event
        /// </summary>
        /// <param name="job"></param>
        private void triggerAktiveJobChangedEvent(Simulation_Job job)
        {
            AktiveJobChangedEventArgs myArgument = new AktiveJobChangedEventArgs();

            myArgument.Job = job;
            aktiveJobChanged(myArgument);
        }
Beispiel #2
0
        /// <summary>
        /// Highlighting DataGrid Row with the Active Job
        /// </summary>
        /// <param name="job"></param>
        private void highlightDataGridRow(Simulation_Job job)
        {

            JobsDataGrid.SelectedItem = null;

            if (lastAktiveRow != null)
            {
                lastAktiveRow.Background = Brushes.White;
            }

            lastAktiveRow = (DataGridRow)JobsDataGrid.ItemContainerGenerator.ContainerFromItem(job);
            lastAktiveRow.Background = activeRowColor;


        }
        /// <summary>
        /// Set the Thread to sleep
        /// </summary>
        /// <param name="delayInMs"></param>
        private void DelayThread(Simulation_Job job)
        {
            try
            {
                // Delay / Stop the Thread wit the given MS from the Settings
                Thread.Sleep(Convert.ToInt32(job.Value));
            }
            catch
            {
                // Show a Message that the Input was Invalid
                // Configure the message box to be displayed
                string           messageBoxText = "Delay Einstellungen sind ungültig. Die Verzögerung wird nicht ausgeführt";
                string           caption        = "Ungültige Eingabe für das Verzögern";
                MessageBoxButton button         = MessageBoxButton.OK;
                MessageBoxImage  icon           = MessageBoxImage.Warning;

                // Display message box
                MessageBox.Show(messageBoxText, caption, button, icon);
            }
        }