private void GenerateConfigOnClick(object sender, RoutedEventArgs e) { HandleException(() => { SetConfig(() => _control.MainControl.Config); ((SettingsWindowPackage)Package).OptionJsonConfig = ConfigSerializer.ToJson(_config); MessageBox.Show("Successfully created config!", "Info", MessageBoxButton.OK, MessageBoxImage.Information); }, "Error while generating config"); CreateForm(); // if (_drawingMode == DrawingMode.Redrawing) return; _drawingMode = DrawingMode.ShouldBeRedrawn; HandleException(DrawGraph, "Error while drawing graph"); }
private void ExportOnClick(object sender, RoutedEventArgs e) { _control.Config.Text = ConfigSerializer.ToJson(_config); }