internal SettingsDialog(Package package)
        {
            InitializeComponent();

            ShowInTaskbar = false;

            Logger.WriteEvent += Logger_WriteEvent;

            _package        = package;
            _globalSettings = new GlobalIncrementSettings();

            GlobalSettingsPropertyGrid.IsCategorized   = true;
            SolutionSettingsPropertyGrid.IsCategorized = true;

            try
            {
                var version =
                    ReflectionHelper.GetAssemblyAttribute <AssemblyFileVersionAttribute>(
                        Assembly.GetExecutingAssembly()).Version;
                var configuration =
                    ReflectionHelper.GetAssemblyAttribute <AssemblyConfigurationAttribute>(
                        Assembly.GetExecutingAssembly()).Configuration;

                Title = $"{Title} v{version} [{configuration}]";
            }

            catch (Exception ex)
            {
                ex.Swallow();
            }
        }
        private void DialogWindow_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                _globalSettings.Load();
            }
            catch (Exception ex)
            {
                MessageBox.Show($"An error occurred while loading the global settings:\n{ex}",
                                "Global Settings Error",
                                MessageBoxButton.OK,
                                MessageBoxImage.Error);
                _globalSettings = new GlobalIncrementSettings();
            }

            LoadSolution();

            GlobalSettingsPropertyGrid.SelectedObject = _globalSettings;
            VerboseLoggingEnabledCheckbox.IsChecked   = Settings.Default.IsVerboseLogEnabled;
            VersionEnabledCheckBox.IsChecked          = Settings.Default.IsEnabled;
            LogTextBox.AppendText(Logger.Instance.Contents);
        }