Esempio n. 1
0
        /// <summary>
        /// Displays the preferences dialog to the user.
        /// </summary>
        /// <param name="sender">Sender.</param>
        /// <param name="e">E.</param>
        private async void OnPreferencesButtonClicked(object sender, EventArgs e)
        {
            using (var preferencesDialog = EverlookPreferences.Create())
            {
                preferencesDialog.TransientFor = this;
                if (preferencesDialog.Run() == (int)ResponseType.Ok)
                {
                    preferencesDialog.SavePreferences();
                }

                preferencesDialog.Destroy();

                // Commit the changes
                ReloadViewportBackground();

                if (preferencesDialog.DidGameListChange)
                {
                    await ReloadGames();
                }

                if (preferencesDialog.ShouldRefilterTree)
                {
                    await RefilterTrees();
                }
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Displays the preferences dialog to the user.
        /// </summary>
        /// <param name="sender">Sender.</param>
        /// <param name="e">E.</param>
        private void OnPreferencesButtonClicked(object sender, EventArgs e)
        {
            using (EverlookPreferences preferencesDialog = EverlookPreferences.Create())
            {
                preferencesDialog.TransientFor = this;
                if (preferencesDialog.Run() == (int)ResponseType.Ok)
                {
                    preferencesDialog.SavePreferences();
                    ReloadRuntimeValues();
                }

                preferencesDialog.Destroy();
            }
        }