Beispiel #1
0
        private void MonthEditBtn_Click(object sender, EventArgs e)
        {
            if (SelectedMonth != null)
            {
                int index = fCalendar.Months.IndexOf(SelectedMonth);

                MonthForm dlg = new MonthForm(SelectedMonth);
                if (dlg.ShowDialog() == DialogResult.OK)
                {
                    fCalendar.Months[index] = dlg.MonthInfo;

                    update_months();
                    update_seasons();
                    update_events();
                }
            }
        }
Beispiel #2
0
        private void MonthAddBtn_Click(object sender, EventArgs e)
        {
            MonthInfo mi = new MonthInfo();

            mi.Name = "New Month";

            MonthForm dlg = new MonthForm(mi);

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                fCalendar.Months.Add(dlg.MonthInfo);

                update_months();
                update_seasons();
                update_events();
            }
        }