private void DummyDB_Checkbox_Unchecked(object sender, RoutedEventArgs e) { SQLite_Data_Access.IsUsingDummyDB = false; Properties.Settings.Default.UserUsingDummyDB = false; // Refresh the Main Window event viewer // Also request the API in 30 sec so user doesnt have to wait 15m to see info. UpdateUIElements.ForceEventViewerRefresh(); ApiLoopHandler.TriggerTimerIn30sec(); // Log info var Log = new LogHandler("Switched to MainDB."); Log.WriteLogFile(); }
// ------------------------------------------- // - 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(); } }
private void SyncDB_Button_Click(object sender, RoutedEventArgs e) { ApiLoopHandler.TriggerTimerIn30sec(); }