private void btnCreateNew_Click(object sender, RoutedEventArgs e) { var profileNameWindow = new ProfileNameWindow(mainWindow) { Topmost = true, Top = Top, Left = Left, }; profileNameWindow.ShowDialog(); if (profileNameWindow.DialogResult == true) { Close(); } }
private void BtnNewClick(object sender, RoutedEventArgs e) { var settings = new Settings(); var pnw = new ProfileNameWindow { Top = Top + Height / 10, Left = Left + Width / 10, Topmost = Topmost, }; if (pnw.ShowDialog() == true) { settings.ProfileName = pnw.ProfileName; cbProfiles.Items.Add(settings); cbProfiles.SelectedItem = settings; tcMain.SelectedIndex = 1; Settings.SaveSettings(settings); } }
private void BtnNewClick(object sender, RoutedEventArgs e) { var settings = new Settings(); var pnw = new ProfileNameWindow { Top = Top + Height/10, Left = Left + Width/10, Topmost = Topmost, }; if (pnw.ShowDialog() == true) { settings.ProfileName = pnw.ProfileName; cbProfiles.Items.Add(settings); cbProfiles.SelectedItem = settings; tcMain.SelectedIndex = 1; Settings.SaveSettings(settings); } }