private void debugmenu_resetconfigButton_Click(object sender, RoutedEventArgs e) { ResetSettingsWindow wnd = new ResetSettingsWindow(true); wnd.Owner = this; wnd.ShowDialog(); }
private void settingsPage_WebcamEditorPage_ActionBar_resetconfigurationButton_Click(object sender, RoutedEventArgs e) { ResetSettingsWindow dialog = new ResetSettingsWindow(); settingsPage_dimGrid.Opacity = 0; settingsPage_dimGrid.Visibility = Visibility.Visible; DoubleAnimation dimanim = new DoubleAnimation(1.0, new TimeSpan(0, 0, 0, 0, 500)); settingsPage_dimGrid.BeginAnimation(Grid.OpacityProperty, dimanim); dialog.Owner = this; dialog.ShowDialog(); DoubleAnimation dimanim_out = new DoubleAnimation(0, new TimeSpan(0, 0, 0, 0, 500)); settingsPage_dimGrid.BeginAnimation(Grid.OpacityProperty, dimanim_out); DispatcherTimer dimanim_out_timer = new DispatcherTimer(); dimanim_out_timer.Interval = new TimeSpan(0, 0, 0, 0, 500); dimanim_out_timer.Tick += (s, ev) => { dimanim_out_timer.Stop(); settingsPage_dimGrid.Visibility = Visibility.Collapsed; }; dimanim_out_timer.Start(); }