protected void SaveSettings(bool runEvent)
        {
            // Before saving settings, retrieve them first
            if (isSettingsRetrieved == false)
            {
                RetrieveFromSettings(runEvent);
            }

            // Set the version
            Settings.SetInt(VersionKey, AppVersion);

            // Run events
            if (runEvent == true)
            {
                OnBeforeSaveSettings?.Invoke(this);
            }

            // Save each version here
            foreach (IStoredSetting singleSetting in AllSingleSettings)
            {
                singleSetting.OnSaveSetting(Settings, AppVersion);
            }

            // Save the preferences
            Settings.Save();

            // Run events
            if (runEvent == true)
            {
                OnAfterSaveSettings?.Invoke(this);
            }
        }
        public void SaveSettings()
        {
            OnBeforeMoonbyteCommandsEventArgs onBeforeRequest = new OnBeforeMoonbyteCommandsEventArgs()
            {
                SettingDirectory = this.SettingsDirectory
            };

            OnBeforeSaveSettings?.Invoke(this, onBeforeRequest);

            if (onBeforeRequest.CancelRequest == BaseCommands.MoonbyteCancelRequest.Continue)
            {
                File.WriteAllLines(settingsFullDirectory, settings);
            }

            OnAfterSaveSettings?.Invoke(this, new EventArgs());
        }