예제 #1
0
        private void OnChooseGroup(object sender, EventArgs e)
        {
            if ((SelectedGroup == ((Label)sender).Text) && IsSelected)
            {
                return;
            }

            SelectGroupByOpacity((Label)sender, 1, 0.25);
            SelectedNumber = ((Label)sender).Text;
            SelectedGroup  = SelectedItem + SelectedNumber;
            IsSelected     = true;
            ButtonOk.FadeTo(1);
            GroupName.Text = TimetableService.KeywordDictionary[SelectedGroup];
            GroupName.FadeTo(1);
        }
예제 #2
0
        private void OnChooseDirection(object sender, EventArgs e)
        {
            ButtonOk.FadeTo(0.25);
            GroupName.FadeTo(0);
            if (Groups.Children.Any())
            {
                SelectGroupByOpacity(Groups.Children[0], 0.25, 0.25);
            }
            if ((SelectedItem == ((Image)sender).Resources["tag"].ToString()) && (Groups.Opacity == 1.0))
            {
                TitleText.Text = TitleText.Resources["1"].ToString();
                SelectDirectionByOpacity((Image)sender, 0.25, 0.25);
                ChangeVisible(false);
                return;
            }
            if (SelectedItem == ((Image)sender).Resources["tag"].ToString())
            {
                TitleText.Text = TitleText.Resources["2"].ToString();
                SelectDirectionByOpacity((Image)sender, 1, 0.25);
                ChangeVisible(true);
                return;
            }

            TitleText.Text = TitleText.Resources["2"].ToString();
            SelectDirectionByOpacity((Image)sender, 1, 0.25);
            SelectedItem = ((Image)sender).Resources["tag"].ToString();
            ChangeVisible(false);
            DirectionName.Text = (string)DirectionName.Resources[SelectedItem];


            var numbers = TimetableService.TeamsLiterPossibleNumbers[SelectedItem].Select(GetGroupSelector);

            Groups.Children.Clear();
            foreach (var item in numbers)
            {
                Groups.Children.Add(item);
            }

            ChangeVisible(true);
        }