private void reg_but_Click(object sender, RoutedEventArgs e) { RegForm regForm = new RegForm(); regForm.ShowDialog(); }