示例#1
0
 private void CheckSettings()
 {
     Settings = InvictusSettings.FromFile("InvictusSettings.xml");
     if (Settings == null)
     {
         Settings = new InvictusSettings();
         Settings.Save();
     }
 }
示例#2
0
 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;
 }
示例#3
0
 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();
     }
 }
示例#4
0
        public static InvictusSettings FromFile(string fileName)
        {
            InvictusSettings res = (InvictusSettings)SerializationHelper.FromFile(fileName, typeof(InvictusSettings));

            return(res);
        }