public void SaveToRegistry()
{
RegistryKey key = Registry.CurrentUser.CreateSubKey(_registryKey);
if (key == null)
{
Factory.GUIController.ShowMessage("Unable to access registry key: " + _registryKey, System.Windows.Forms.MessageBoxIcon.Warning);
}
else
{
key.SetValue("ScEdTabWidth", _tabSize.ToString());
key.SetValue("TestGameStyle", ((int)_testGameScreen).ToString());
key.SetValue("StartupPane", ((int)_editorStartupPane).ToString());
key.SetValue("DefaultImportPath", _defaultImportPath);
key.SetValue("ProjectTreeOnRight", _projectTreeOnRight ? "1" : "0");
key.SetValue("MessageBoxOnCompileErrors", ((int)_messageBoxOnCompileErrors).ToString());
key.SetValue("IndentUsingTabs", _indentUseTabs ? "1" : "0");
key.SetValue("ShowViewPreviewByDefault", _showViewPreviewByDefault ? "1" : "0");
key.SetValue("PaintProgramPath", _paintProgramPath);
key.SetValue("SpriteImportTransparency", ((int)_defaultSpriteImportTransparency).ToString());
key.SetValue("NewGamePath", _defaultNewGamePath);
key.SetValue("SendAnonymousStats", _sendAnonymousStats ? "1" : "0");
key.SetValue("StatsLastSent", _statsLastSent.ToString("u"));
key.SetValue("BackupWarningInterval", _backupWarningInterval.ToString());
key.SetValue("LastBackupWarning", _lastBackupWarning.ToString("u"));
key.SetValue("RemapPaletteBackgrounds", _remapPalettizedBackgrounds ? "1" : "0");
key.SetValue("KeepHelpOnTop", _keepHelpOnTop ? "1" : "0");
key.SetValue("DialogOnMultipleTabsClose", _dialogOnMultibleTabsClose ? "1" : "0");
WriteRecentSearchesList(key);
key.Close();
}
}