Exemplo n.º 1
0
        private void usl_Click(object sender, RoutedEventArgs e)
        {
            Window6 winTool = new Window6();

            //Назначение текущего окна владельцем.
            winTool.Owner = this;
            //Отображение окна, принадлежащего окну-владельцу.
            winTool.Show();
            this.Hide();
        }
Exemplo n.º 2
0
        private void button_Click(object sender, RoutedEventArgs e)
        {
            bool genderPicked   = true;
            bool birthdayPicked = true;

            if ((bool)maleRadioButton.IsChecked)
            {
                Data.newUserGender = "male";
            }
            else if ((bool)femaleRadioButton1.IsChecked)
            {
                Data.newUserGender = "female";
            }
            else
            {
                genderPicked = false;
            }
            if (birthDatePicker.SelectedDate != null)
            {
                Data.newUserBirthday = (DateTime)birthDatePicker.SelectedDate;
            }
            else
            {
                birthdayPicked = false;
            }

            if (genderPicked && birthdayPicked)
            {
                Window6 w = new Window6();
                w.Show();
                this.Close();
            }
            else
            {
                MessageBox.Show("Please choose!");
            }
        }