Пример #1
0
        private void initializeControls()
        {
            RealTimeAMS rtams = new RealTimeAMS();

            section_panels.Clear();
            section_labels.Clear();
            Grid[]  gs = { student_panel, attendance_panel, stats_panel, reports_panel, settings_panel, about_panel };
            Label[] ls = { student_section, attendance_section, stats_section, reports_section, settings_section, about_section };
            foreach (Grid g in gs)
            {
                section_panels.Add(g);
            }

            foreach (Label l in ls)
            {
                section_labels.Add(l);
            }

            RealTimeAMS.time_in_format  = time_in_format.Text;
            RealTimeAMS.time_out_format = time_out_format.Text;

            int status = timeStatus.IsChecked ? 0 : 1;

            rtams.changetimeState(status);
        }
Пример #2
0
        private void timeStatusChanged(object sender, RoutedEventArgs e)
        {
            HorizontalToggleSwitch swits = sender as HorizontalToggleSwitch;
            RealTimeAMS            rtams = new RealTimeAMS();
            int status = swits.IsChecked ? 0 : 1;

            rtams.changetimeState(status);
        }