Exemplo n.º 1
0
        private void GenerateConfig_OnClick(object sender, RoutedEventArgs args)
        {
            var configGenerator = new ResolverConfigWindow();

            configGenerator.Show();
            Close();
        }
Exemplo n.º 2
0
        private void LoadConfig_OnClick(object sender, RoutedEventArgs args)
        {
            var openFileDialog = new System.Windows.Forms.OpenFileDialog
            {
                Filter   = "JSON file (*.json)|*.json",
                FileName = "ResolverConfig.json"
            };

            // ReSharper disable once InvertIf
            if (openFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                var configFn = openFileDialog.FileName;
                var config   = JsonConvert.DeserializeObject <ResolverConfig>(File.ReadAllText(configFn));

                var configWindow = new ResolverConfigWindow(config);
                configWindow.Show();
                Close();
            }
        }