private void Options_Button_Click(object sender, RoutedEventArgs e) { OptionsWindow optionsWindow = new OptionsWindow(this.Left, this.Top, this.Height, this.Width, 0.8); optionsWindow.ShowDialog(); optionsWindow.Close(); }
// Tools private void MenuToolsOptions_Click(object sender, EventArgs e) { using (OptionsWindow optionsWindow = new OptionsWindow()) { _ = optionsWindow.ShowDialog(this); } }
private void OpenOptionsWindow(object sender, RoutedEventArgs e) { OptionsWindow oW = new OptionsWindow(); oW.ShowDialog(); oW.Focus(); }
public ITranslationProvider[] Browse(IWin32Window owner, LanguagePair[] languagePairs, ITranslationProviderCredentialStore credentialStore) { try { var options = new SdlMTCloudTranslationOptions(); var credentials = SplitCredentials(credentialStore, options); var window = new OptionsWindow(); var languages = new Languages.Provider.Languages(); var model = new OptionsWindowModel(window, options, credentials, languagePairs, languages); window.DataContext = model; window.ShowDialog(); if (window.DialogResult.HasValue && window.DialogResult.Value) { var clientId = model.Options.ClientId; var clientSecret = model.Options.ClientSecret; var resendDraft = model.Options.ResendDrafts; var provider = new SdlMTCloudTranslationProvider(options) { Options = model.Options }; SetCredentials(credentialStore, clientId, clientSecret, resendDraft, true); return(new ITranslationProvider[] { provider }); } } catch (Exception e) { Log.Logger.Error($"{Constants.Browse} {e.Message}\n {e.StackTrace}"); } return(null); }
private void Menu_OpenOptions(object sender, RoutedEventArgs e) { var optionsWindow = new OptionsWindow { Owner = this, ShowInTaskbar = false }; optionsWindow.ShowDialog(); }
/// <summary> /// Show the options menu /// Task finishes when the window is closed /// </summary> public async Task RunShowOptionsMenu() { if (Application.Current.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) { var optionsWindow = new OptionsWindow(CurrentOptions); await optionsWindow.ShowDialog(desktop.MainWindow); } }
private void BtnOptions_Click(object sender, RoutedEventArgs e) { var optionsWindow = new OptionsWindow { Owner = this }; optionsWindow.ShowDialog(); }
private void OptionsMenuItem_Click(object sender, RoutedEventArgs e) { OptionsWindow optionWindow = new OptionsWindow(); if (optionWindow.ShowDialog() == false) { } }
private void Options_Button_Click(object sender, RoutedEventArgs e) { OptionsWindow optionsWindow = new OptionsWindow(this.Left, this.Top, this.Height, this.Width, 0.8); //setup the options window while it exists GuiController.GetController().SetupOptionsWindow(optionsWindow); optionsWindow.ShowDialog(); optionsWindow.Close(); }
/// <summary> /// Shows the options window. /// </summary> private void ShowOptionsWindow() { OptionsWindow window = new OptionsWindow() { Owner = Application.Current.MainWindow, WindowStartupLocation = WindowStartupLocation.CenterOwner }; window.ShowDialog(); }
private bool ShowOptionsWindow() { var optionsWindow = new OptionsWindow { DataContext = optionsViewModel, }; optionsViewModel.SetOptionsWindow(optionsWindow); return(optionsWindow.ShowDialog() == true); }
private bool ShowOptionsWindow() { var optionsWindow = new OptionsWindow { DataContext = optionsViewModel, }; optionsViewModel.SetOptionsWindow(optionsWindow); return optionsWindow.ShowDialog() == true; }
private void ShowOptionsWindowMethod() { OptionsModel model = new OptionsModel(); OptionsViewModel viewModel = new OptionsViewModel(model); OptionsWindow view = new OptionsWindow(); view.DataContext = viewModel; view.ShowDialog(); }
private void MenuItemOptionsWindow_Click(object sender, RoutedEventArgs e) { var wnd = new OptionsWindow(new List <IOutputDevicePlugin>() { new WasapiOutPlugin(), new WaveOutPlugin(), new DirectSoundOutPlugin(), new NullOutPlugin() }); wnd.ShowDialog(); }
public bool ShowOptions(OptionsCollectionViewModel viewModel) { var window = new OptionsWindow(); window.DataContext = viewModel; window.Icon = BitmapFrame.Create(new Uri("pack://application:,,,/CalDavSynchronizer;component/Resources/ApplicationIcon.ico")); ElementHost.EnableModelessKeyboardInterop(window); viewModel.RequestBringIntoView += delegate { window.BringIntoView(); }; return(window.ShowDialog().GetValueOrDefault(false)); }
/// <summary> /// Handles the Click event of the OptionsButton control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="RoutedEventArgs"/> instance containing the event data.</param> private void OptionsButton_Click(object sender, RoutedEventArgs e) { try { OptionsWindow childWindow = new OptionsWindow(); this.Close(); childWindow.ShowDialog(); } catch (Exception error) { errorLogViewModel.LogError(error); } }
public void AppStart(object sender, StartupEventArgs args) { Bootstrap.Build(); if (CfgService.ReadPropertyParseBool("showCfgWndOnStartup")) { Window optionsWindow = new OptionsWindow(); optionsWindow?.ShowDialog(); } else { Window mainWindow = new MainWindow(); mainWindow?.Show(); } }
private void ShowOptions() { var options = new OptionsWindow(); options.ShowDialog(); if (options.RefreshRecentLists) { recentQueries.Clear(); LoadList(recentQueries, Settings.RecentQueries); recentDestinations.Clear(); LoadList(recentDestinations, Settings.RecentPaths); } }
private void SetOptions(object sender, RoutedEventArgs e) { OptionsWindow optionWindow = new OptionsWindow(options); optionWindow.ShowDialog(); if (optionWindow.DialogResult == true) { ComboBoxItem DefaultGame = (ComboBoxItem)optionWindow.DefaultGame.SelectedItem; int defaultGame = Convert.ToInt32(DefaultGame.Tag); options = new Options(optionWindow.DefaultImport.Text, optionWindow.DefaultExport.Text, (SupportedGames)defaultGame, optionWindow.WWiseExePath.Text, optionWindow.DefaultProjectPath.Text); options.WriteOptions(); mode = options.defaultGame; ChangeView(); } }
private void Options_Click(object sender, RoutedEventArgs e) { Logger.Add(new Log(this.GetType().Name, MethodBase.GetCurrentMethod().Name, "Menu -> Options")); OptionsWindow view = new OptionsWindow(); this.Visibility = Visibility.Hidden; if (bool.Parse(view.ShowDialog().ToString())) { this.Visibility = Visibility.Visible; PlayerName = ConfigurationManager.AppSettings["PlayerName"]; Logger.Add(new Log(this.GetType().Name, MethodBase.GetCurrentMethod().Name, "Options was changed")); } else { KILL(); } }
public static void EditOptions(Options options) { var toEdit = new Options { OfficeVersion = options.OfficeVersion, OfficeApplication = options.OfficeApplication }; var window = new OptionsWindow(toEdit); var result = window.ShowDialog(); if (result.HasValue && result.Value) { options.OfficeVersion = toEdit.OfficeVersion; options.OfficeApplication = toEdit.OfficeApplication; } }
private void Window_KeyDown(object sender, System.Windows.Input.KeyEventArgs e) { System.Diagnostics.Debug.Print(e.Key.ToString()); OnWindowKeyDown(sender, e); var isCtrl = (System.Windows.Input.Keyboard.IsKeyDown(Key.LeftCtrl) || System.Windows.Input.Keyboard.IsKeyDown(Key.RightCtrl)); if (e.Key == Key.O && isCtrl) { var wnd = new OptionsWindow(new List <IOutputDevicePlugin>() { new WasapiOutPlugin(), new WaveOutPlugin(), new DirectSoundOutPlugin(), new NullOutPlugin() }); wnd.ShowDialog(); } }
private void HandleOptionsToolbarButtonClick(object sender, RoutedEventArgs e) { // Create the options form var optionsWindow = new OptionsWindow { Owner = this }; // Show the options form and get the result var result = optionsWindow.ShowDialog(); // If okay was selected if (result.HasValue && result.Value) { // Reset the database to current settings ResetDatabase(); // Re-initialize the feed display DisplayFeed(); } }
public MainWindow() { this.InitializeComponent(); this.Logger = new Logger(this.LogStackPanel, true); AlertManager.SetupAlert(this.AlertBox, this.AlertBody); this.SetupPages(); SavedData.LoadData(); this.ToOptionsButton.Click += (sender, args) => { var options = new OptionsWindow { Owner = this }; options.ShowDialog(); }; }
public bool Edit(IWin32Window owner, ITranslationProvider translationProvider, LanguagePair[] languagePairs, ITranslationProviderCredentialStore credentialStore) { try { if (!(translationProvider is SdlMTCloudTranslationProvider editProvider)) { return(false); } //get saved key if there is one and put it into options var credentials = SplitCredentials(credentialStore, editProvider.Options); var window = new OptionsWindow(); var languages = new Languages.Provider.Languages(); var model = new OptionsWindowModel(window, editProvider.Options, credentials, languagePairs, languages); window.DataContext = model; window.ShowDialog(); if (window.DialogResult.HasValue && window.DialogResult.Value) { editProvider.Options = model.Options; var clientId = editProvider.Options.ClientId; var clientSecret = model.Options.ClientSecret; var resendDraft = model.Options.ResendDrafts; SetCredentials(credentialStore, clientId, clientSecret, resendDraft, true); return(true); } } catch (Exception e) { Log.Logger.Error($"{Constants.EditWindow} {e.Message}\n {e.StackTrace}"); } return(false); }
public void OptionsCommand_Execute() { var optionsWindow = new OptionsWindow(); optionsWindow.ShowDialog(); }
private void options_popup(object sender, EventArgs e) { OptionsWindow popup = new OptionsWindow(); popup.ShowDialog(); reloadOptions(); }
private void OptionsButton_Click(object sender, RoutedEventArgs e) { var options = new OptionsWindow(AnalysisJobViewModel.Options); options.ShowDialog(); }
private void MenuToolsOptions_Click(object sender, EventArgs e) { var optionsWindow = new OptionsWindow(); optionsWindow.ShowDialog(this); }
void ShowOptions(object obj) { var options = new OptionsWindow(); options.ShowDialog(); }
private void ShowOptionsWindow() { OptionsWindow = new OptionsWindow(); OptionsWindow.ShowDialog(); }
private void ExecOpenOptionsWinCmd(object obj) { var optWin = new OptionsWindow(); optWin.ShowDialog(); }
private void buttonOptions_Click(object sender, RoutedEventArgs e) { var optionsWindow = new OptionsWindow(); optionsWindow.ShowDialog(); }