private void SaveSettingsClicked(object sender, RoutedEventArgs e)
        {
            this.showOverlay = cbxShowOverlay.IsChecked == true;

            // Save the settings to a file.
            var file = new SettingsFile
                {
                    MinimumGameMinutes = this.minimumGameMinuteCount,
                    InitialCommercials = this.initialCommercialCount,
                    GameMinutesPerExtra = this.gameMinutesPerExtraCount,
                    Delay = this.selectedDelay,
                    ReplayDirectory = this.replayDirectory,
                    ShowOverlay = this.showOverlay
                };

            file.Save();

            var handler = this.SettingsClose;
            if (handler != null)
            {
                this.SettingsClose(this, EventArgs.Empty);
            }
        }