Пример #1
0
 public Form1()
 {
     InitializeComponent();
     Exam c = new Exam("Јуни", 2014);
     lbExams.Items.Add(c);
     c = new Exam("Август", 2013);
     lbExams.Items.Add(c);
     c = new Exam("Јануари", 2015);
     lbExams.Items.Add(c);
     c = new Exam("Јуни", 2013);
     lbExams.Items.Add(c);
     c = new Exam("Август", 2012);
     lbExams.Items.Add(c);
 }
Пример #2
0
        private void lbConferences_SelectedIndexChanged(object sender, EventArgs e)
        {
            btnDeleteExam.Enabled = lbExams.SelectedIndex != -1;
            if (lbExams.SelectedIndex != -1)
            {
                selectedExam = lbExams.SelectedItem as Exam;
                tbDescription1.Text = selectedExam.Problem1.Description;
                nudPoints1.Value = selectedExam.Problem1.Points;
                tbDescription2.Text = selectedExam.Problem2.Description;
                nudPoints2.Value = selectedExam.Problem2.Points;

            }
            else
            {
                selectedExam = null;
            }
        }
 private void btnSave_Click(object sender, EventArgs e)
 {
     Exam = new Exam(cbMonth.SelectedItem.ToString(), (int)nudYear.Value);
     this.DialogResult = System.Windows.Forms.DialogResult.OK;
 }