Example #1
0
        void update_seasons()
        {
            SeasonList.Items.Clear();

            foreach (CalendarEvent ce in fCalendar.Seasons)
            {
                MonthInfo mi  = fCalendar.FindMonth(ce.MonthID);
                int       day = ce.DayIndex + 1;

                ListViewItem lvi = SeasonList.Items.Add(ce.Name);
                lvi.SubItems.Add(mi.Name + " " + day);
                lvi.Tag = ce;
            }

            if (SeasonList.Items.Count == 0)
            {
                ListViewItem lvi = SeasonList.Items.Add("(no seasons)");
                lvi.ForeColor = SystemColors.GrayText;
            }

            SeasonList.Sort();
        }