Beispiel #1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Window3 windo3 = new Window3();

            if (truac == false)
            {
                acc = false;
                windo3.Show();
                rest(windo3);
            }
            else
            {
                const string message =
                    "Вы хотите прекратить наблюдения?";
                const string caption = "Закрыть?";
                var          result  = MessageBox.Show(message, caption,
                                                       MessageBoxButton.YesNo);

                // If the no button was pressed ...
                if (result == MessageBoxResult.Yes)
                {
                    // cancel the closure of the form.
                    truac      = false;
                    bb.Content = "Создать";
                    ab.Content = "Войти";
                    win3.Title = "Бассейн";
                }
            }
        }
Beispiel #2
0
 public async void rest(Window3 l)
 {
     if (l.IsLoaded == false && save() != "")
     {
         prov(save());
     }
     else
     {
         await Task.Delay(randf.Next(10, 100)); rest(l);
     }
 }
Beispiel #3
0
        private void Button_Click_1(object sender, RoutedEventArgs e)//обработка одноой из кнопок
        {
            Window3 windo3 = new Window3();

            if (truac == false)
            {
                acc = true;
                windo3.Show();
                rest(windo3);
            }
            else
            {
                MainWindow mm = new MainWindow();
                pr = true;
                mm.Show();
                rest1(mm);
            }
        }