Beispiel #1
0
        private void Options_Load(object sender, EventArgs e)
        {
            ClassOptions classOptions = Options_Control.GetClassOptions;

            ВыборДняНедели.SelectedIndex = classOptions.FirstDay;
            NoAlarm.Checked     = classOptions.NotAlarm;
            NumberWeeks.Checked = classOptions.NumberWeeks;
        }
Beispiel #2
0
 public void Load(ref ClassOptions classOptions)
 {
     try {
         var formatter = new BinaryFormatter();
         using (var fs = new FileStream("config.bin", FileMode.Open)) {
             classOptions = (ClassOptions)formatter.Deserialize(fs);
         }
     }
     catch {
         classOptions = new ClassOptions();
     }
 }
Beispiel #3
0
 public static void NewOption(int firstday, bool notalarm, bool numberweeks)
 {
     options = new ClassOptions(firstday, notalarm, numberweeks);
 }