Beispiel #1
0
 private void button6_Click(object sender, EventArgs e)
 {
     // create new year
     year a = new year();
     a.setname(Interaction.InputBox("please enter a name for year", "year name", years.Count.ToString()));
     years.Add(a);
     updateyear();
 }
Beispiel #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     // load
     OpenFileDialog b = new OpenFileDialog();
     if (b.ShowDialog() == DialogResult.OK)
     {
         StreamReader a = new StreamReader(b.FileName);
         int numofyears = int.Parse(a.ReadLine());
         for (int i = 0; i != numofyears; i++)
         {
             year c = new year();
             c.loadsubjects(ref a);
             years.Add(c);
         }
         a.Close();
         updateyear();
     }
 }