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()); }
public void Open(string fileName) { try { var newCfg = Persistence.Read(fileName); if (newCfg != null) { Main = new ModelConfigurationMain(newCfg); OnPropertyChanged("Main"); } } catch (Exception) { throw; } }