Пример #1
0
        private async void StartButton_Click(object sender, RoutedEventArgs e)
        {
            if (Validations.CheckTextBox(txtbxLecName, txtbxRoom).Equals(true))
            {
                var dialog = new MessageDialog("Check Valuing fields");
                await dialog.ShowAsync();
            }
            else
            {
                //try
                //{
                await DatabaseManagement.CountAllLecturesData(lecid);

                gloablvalue.NewLecId       = lecid.Text;
                FingerStatusBorder.Opacity = 0.75;
                mytimer.Start();
                Stopwatch.Visibility = Visibility.Visible;
                FINGER.Visibility    = Visibility.Visible;
                DataGrid.Visibility  = Visibility.Collapsed;
                BtN_Menu.Visibility  = Visibility.Collapsed;
                DateTime TimeDate = DateTime.Now; //time and date
                datetime              = TimeDate.ToString();
                Title.Text            = txtbxLecName.Text;
                StartButton.IsEnabled = false;
                EndButton.Visibility  = Visibility.Visible;
                //}
                //catch (Exception)
                //{
                //    var dialog = new MessageDialog("Error in count lectures numbers!");
                //    await dialog.ShowAsync();
                //}
            }
        }