public static Settings Load(string fileName = DEFAULT_FILENAME) { string file = DataManager.getAbsolutePath(fileName); Settings t = new Settings();//load defalt if (File.Exists(file)) { t = (new JavaScriptSerializer()).Deserialize<Settings>(File.ReadAllText(file)); } return t; }
public static void Main() { _messageProvider = new BasicMessageProvider();//enable basic message provider //open settings _settings = Settings.Load(); _competition = Competition.Load(); //start wpf application thread var application = new App(); application.Exit += Application_Exit; application.InitializeComponent(); application.Run(); }