Example #1
0
        private void cb_year_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cb_year.Text == "")
            {
                return;                     //probably a faster way of doing this.
            }
            if (currentTT == null)
            {
                return;
            }
            cb_form.Items.Clear();

            YearGroup yearToDisplay = (YearGroup)cb_year.SelectedItem;

            foreach (FormClass f in yearToDisplay.Forms)
            {
                cb_form.Items.Add(f);
            }

            cb_form.SelectedIndex = 0;
            if (displayedItem == null)
            {
                return;
            }
            if (displayedItem.YearIndex == cb_year.SelectedIndex)
            {
                return;
            }
            currentTT.MoveYears(displayedItem, Convert.ToByte(cb_year.SelectedIndex));
            RefreshViews();
        }