private void ConfigButton_Click(object sender, RoutedEventArgs e) { ConfigDialog configDialog = new ConfigDialog(this); if (configDialog.ShowDialog() == true) { MessageBox.Show("Changes will take effect after you restart the application", "Notice", MessageBoxButton.OK, MessageBoxImage.Information); chkRecord.IsChecked = configDialog.cbxRecord.IsChecked ?? false; AllowVideoRecord = chkRecord.IsChecked; chkSound.IsChecked = configDialog.cbxSound.IsChecked ?? false; AllowSoundAlarm = chkSound.IsChecked; } }
private void configureTextBlock_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { ConfigDialog configDialog = new ConfigDialog(basePath, this); configDialog.ShowDialog(); }