private void button_Copy_Click(object sender, RoutedEventArgs e) { var win = new Window4(); win.Show(); this.Close(); }
private void button_Click(object sender, RoutedEventArgs e) { bool goalSet = true; if ((bool)loseRadioButton.IsChecked) { Data.newUserGoal = "lose"; } else if ((bool)maintainRadioButton.IsChecked) { Data.newUserGoal = "maintain"; } else if ((bool)gainRadioButton.IsChecked) { Data.newUserGoal = "gain"; } else { MessageBox.Show("Choose a goal!"); goalSet = false; } if (goalSet) { Window4 w = new Window4(); w.Show(); this.Close(); } }
private void textBlock_Copy6_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { Window4 W = new Window4(); W.Show(); this.Close(); }
private void button_Click(object sender, RoutedEventArgs e) { Window4 winTool = new Window4(); //Назначение текущего окна владельцем. winTool.Owner = this; //Отображение окна, принадлежащего окну-владельцу. winTool.Show(); this.Hide(); }
//участвовать private void asks_Copy1_Click(object sender, RoutedEventArgs e) { try { if (!mail.Equals("none")) { string table = "cards"; OleDbConnection myOleDbConnection = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" + System.IO.Directory.GetCurrentDirectory() + @"\db.accdb"); myOleDbConnection.Open(); OleDbCommand myOleDbCommand; // создаем объект OleDbCommand try { //myOleDbCommand = new OleDbCommand("SELECT*" + " FROM " + table + " WHERE Ind='"+inds.At(p.SelectedIndex)+"'", myOleDbConnection); myOleDbCommand = new OleDbCommand("Update " + table + " SET Holders='" + mail + "' WHERE Ind='" + inds.At(p.SelectedIndex) + "'", myOleDbConnection); myOleDbCommand.ExecuteNonQuery(); Window4 w4 = new Window4(); w4.ShowDialog(); poisk(); } catch (Exception r) { MessageBox.Show(r.Message); myOleDbConnection.Close(); } } else { MessageBox.Show("Войдите в аккаунт"); } } catch (Exception r) { MessageBox.Show(r.Message); } }
private void button3_Click(object sender, RoutedEventArgs e) { Window4 a = new Window4(); a.Visibility = Visibility.Visible; }
private void Add_Categories_Click(object sender, RoutedEventArgs e) { Window4 addCategories = new Window4(); addCategories.Show(); }