Пример #1
0
        // -------------------------------------------
        // - EVENT VIEWER SECTION                    -
        // -------------------------------------------

        /// <summary>
        /// This updates all the controls in the MainWindow for the EventViewer section.
        /// </summary>
        public static void PopulateAllEventViewControls(
            ListView listView, TextBox eventIDTextBox, DatePicker datePickerStart,
            DatePicker datePickerEnd, ComboBox eventTypeComboBox, ComboBox stateComboBox,
            ComboBox severityComboBox, ListBox keywordsListBox, StatusBar statusBar)
        {
            // Make sure valid chars are entered in the EventID TextBox.
            // If they are valid, then update and display the controls
            // to the user.
            if (EnsureValidCharsInEventIDTextBox(eventIDTextBox))
            {
                RefreshAndFilterEventList(listView, eventIDTextBox, datePickerStart,
                                          datePickerEnd, eventTypeComboBox, stateComboBox,
                                          severityComboBox, keywordsListBox);
                UpdateUIEventType(listView, eventTypeComboBox);
                UpdateUIStates(stateComboBox);
                UpdateUIKeywords(keywordsListBox);
                UpdateUISeverity(listView, severityComboBox);
                UpdateUIStatusBar(statusBar, listView);
                ApiLoopHandler.StartApiTimerLoop();
            }
        }