Beispiel #1
0
 void LoadConfiguration(object o, RoutedEventArgs a)
 {
     if (ofd.ShowDialog().Value)
     {
         Model               = new GeneratorModel();
         Model.FileName      = ofd.FileName;
         Model.Configuration = GeneratorConfig.Load(Model.FileName);
         InitializeConfiguration(o, a);
         a.Handled = true;
         if (LoadCompleteAction != null)
         {
             LoadCompleteAction.Invoke();
         }
     }
 }
Beispiel #2
0
 void ReloadConfiguration(object o, RoutedEventArgs a)
 {
     if (Model == null)
     {
         return;
     }
     if (System.IO.File.Exists(Model.FileName))
     {
         Model.Configuration = GeneratorConfig.Load(Model.FileName);
         InitializeConfiguration(o, a);
         a.Handled = true;
         if (LoadCompleteAction != null)
         {
             LoadCompleteAction.Invoke();
         }
     }
     else
     {
         MessageBox.Show("Nothing to reload.");
     }
 }