Esempio n. 1
0
        public void MakeTable()
        {
            this.Children.Clear();
            this.RowDefinitions.Clear();
            this.ColumnDefinitions.Clear();
            this.days.Clear();

            this.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) });

            this.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(0.5, GridUnitType.Star) });

            this.timeColumn = new ScheduleLessonTimeTable { RowCount = this.RowCount + 1 };
            this.Children.Add(this.timeColumn);

            for (int i = 0; i < this.DayCount; ++i)
            {

                this.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) });
                ScheduleDay sd = new ScheduleDay();
                sd.Date = this.FirstDay;
                sd.RowCount = this.RowCount;
                this.days.Add(sd);

                ScheduleWeek.SetRow(sd, 0);
                ScheduleWeek.SetColumn(sd, i+1);
                this.Children.Add(sd);   
                
            }

        }
Esempio n. 2
0
        public void ShowWithScheduleDay(ScheduleDay day, studentsgroup group, DateTime fd)
        {

            this.currentGroup = group;
            this.lGroup.Content = group.Name;
            this.firstDay = fd;

            this.cbWeek.SelectedIndex = day.Date.Date >= fd.Date.AddDays(7) ? 1 : 0;
            this.cbDay.SelectedIndex = (int)day.Date.DayOfWeek - 1;

            this.ShowDialog();

        }
Esempio n. 3
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.lGroup = ((System.Windows.Controls.Label)(target));
     return;
     case 2:
     this.cbWeek = ((System.Windows.Controls.ComboBox)(target));
     
     #line 47 "..\..\..\..\..\..\Classes\Schedule\Windows\EditSchedule.xaml"
     this.cbWeek.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cbWeek_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 3:
     this.cbDay = ((System.Windows.Controls.ComboBox)(target));
     
     #line 56 "..\..\..\..\..\..\Classes\Schedule\Windows\EditSchedule.xaml"
     this.cbDay.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cbDay_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 4:
     this.chbIsDoubled = ((System.Windows.Controls.CheckBox)(target));
     
     #line 65 "..\..\..\..\..\..\Classes\Schedule\Windows\EditSchedule.xaml"
     this.chbIsDoubled.Checked += new System.Windows.RoutedEventHandler(this.chbIsDoubled_Checked);
     
     #line default
     #line hidden
     
     #line 65 "..\..\..\..\..\..\Classes\Schedule\Windows\EditSchedule.xaml"
     this.chbIsDoubled.Unchecked += new System.Windows.RoutedEventHandler(this.chbIsDoubled_Unchecked);
     
     #line default
     #line hidden
     return;
     case 5:
     this.cbLesson = ((System.Windows.Controls.ComboBox)(target));
     
     #line 67 "..\..\..\..\..\..\Classes\Schedule\Windows\EditSchedule.xaml"
     this.cbLesson.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cbLesson_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 6:
     this.sDay = ((IMS.ScheduleDay)(target));
     return;
     case 7:
     this.dgSubjects = ((System.Windows.Controls.DataGrid)(target));
     
     #line 84 "..\..\..\..\..\..\Classes\Schedule\Windows\EditSchedule.xaml"
     this.dgSubjects.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.dgSubjects_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 8:
     this.dgTeachers = ((System.Windows.Controls.DataGrid)(target));
     
     #line 90 "..\..\..\..\..\..\Classes\Schedule\Windows\EditSchedule.xaml"
     this.dgTeachers.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.dgTeachers_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 9:
     this.tbClass = ((System.Windows.Controls.TextBox)(target));
     return;
     case 10:
     this.chbSubst = ((System.Windows.Controls.CheckBox)(target));
     
     #line 114 "..\..\..\..\..\..\Classes\Schedule\Windows\EditSchedule.xaml"
     this.chbSubst.Unchecked += new System.Windows.RoutedEventHandler(this.chbSubst_Unchecked);
     
     #line default
     #line hidden
     
     #line 114 "..\..\..\..\..\..\Classes\Schedule\Windows\EditSchedule.xaml"
     this.chbSubst.Checked += new System.Windows.RoutedEventHandler(this.chbSubst_Checked);
     
     #line default
     #line hidden
     return;
     case 11:
     this.chbRefused = ((System.Windows.Controls.CheckBox)(target));
     return;
     case 12:
     this.bClear = ((System.Windows.Controls.Button)(target));
     
     #line 118 "..\..\..\..\..\..\Classes\Schedule\Windows\EditSchedule.xaml"
     this.bClear.Click += new System.Windows.RoutedEventHandler(this.bClear_Click);
     
     #line default
     #line hidden
     return;
     case 13:
     this.cbClear = ((System.Windows.Controls.ComboBox)(target));
     return;
     case 14:
     this.cbiLesson = ((System.Windows.Controls.ComboBoxItem)(target));
     return;
     case 15:
     this.bOK = ((System.Windows.Controls.Button)(target));
     
     #line 125 "..\..\..\..\..\..\Classes\Schedule\Windows\EditSchedule.xaml"
     this.bOK.Click += new System.Windows.RoutedEventHandler(this.bOK_Click);
     
     #line default
     #line hidden
     return;
     case 16:
     this.bCancel = ((System.Windows.Controls.Button)(target));
     
     #line 126 "..\..\..\..\..\..\Classes\Schedule\Windows\EditSchedule.xaml"
     this.bCancel.Click += new System.Windows.RoutedEventHandler(this.bCancel_Click);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }