private void CheckSettings() { Settings = InvictusSettings.FromFile("InvictusSettings.xml"); if (Settings == null) { Settings = new InvictusSettings(); Settings.Save(); } }
public void Assign(InvictusSettings s) { this.Min24HourChange = s.Min24HourChange; this.Min7DaysChange = s.Min7DaysChange; this.Min14DayChange = s.Min14DayChange; this.Min3MonthChange = s.Min3MonthChange; this.MinCp24HourChange = s.MinCp24HourChange; this.MinCp4WeekChange = s.MinCp4WeekChange; this.MinCp7DayChange = s.MinCp7DayChange; this.MinCp3MonthChange = s.MinCp3MonthChange; this.AutorizationOperationWaitTimeInSeconds = s.AutorizationOperationWaitTimeInSeconds; this.Login = s.Login; this.Password = s.Password; }
void ShowSettingsForm() { using (SettingsForm form = new SettingsForm()) { InvictusSettings s = new InvictusSettings(); s.Assign(Settings); form.Settings = s; if (form.ShowDialog() != DialogResult.OK) { return; } Settings.Assign(s); Settings.Save(); UpdateFormatRules(); } }
public static InvictusSettings FromFile(string fileName) { InvictusSettings res = (InvictusSettings)SerializationHelper.FromFile(fileName, typeof(InvictusSettings)); return(res); }