Esempio n. 1
0
 public ModelConfiguration()
 {
     Persistence = new Persistence();
     //
     try
     {
         Main = new ModelConfigurationMain(Persistence.Read());
     }
     catch (Exception)
     {
         var newCfg = new ConfigurationMain();
         newCfg.PassBsa.SetDefaultRepacks();
         Main = new ModelConfigurationMain(newCfg);
     }
     //Main = new ModelConfigurationMain(Persistence.Read() ?? new ConfigurationMain());
 }
Esempio n. 2
0
 public void Open(string fileName)
 {
     try
     {
         var newCfg = Persistence.Read(fileName);
         if (newCfg != null)
         {
             Main = new ModelConfigurationMain(newCfg);
             OnPropertyChanged("Main");
         }
     }
     catch (Exception)
     {
         throw;
     }
 }