Пример #1
0
        private void SeasonEditBtn_Click(object sender, EventArgs e)
        {
            if (SelectedSeason != null)
            {
                int index = fCalendar.Seasons.IndexOf(SelectedSeason);

                SeasonForm dlg = new SeasonForm(SelectedSeason, fCalendar);
                if (dlg.ShowDialog() == DialogResult.OK)
                {
                    fCalendar.Seasons[index] = dlg.Season;
                    update_seasons();
                }
            }
        }
Пример #2
0
        private void SeasonAddBtn_Click(object sender, EventArgs e)
        {
            CalendarEvent ce = new CalendarEvent();

            ce.Name    = "New Season";
            ce.MonthID = fCalendar.Months[0].ID;

            SeasonForm dlg = new SeasonForm(ce, fCalendar);

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                fCalendar.Seasons.Add(dlg.Season);
                update_seasons();
            }
        }