public static void ResetSettings(ref ObservableDictionary <string, object> dict) { WriteSetting("ShowLog", 1, RegistryValueKind.DWord, ref dict); WriteSetting("NotificationType", "Both", RegistryValueKind.String, ref dict); }
public static int WriteSetting(string setting, object value, RegistryValueKind type, ref ObservableDictionary <string, object> dict) { int returnCode; RegistryKey key = Registry.CurrentUser.OpenSubKey("Software\\NovaStudios\\NovaChatClient\\Settings", true); if (key == null) { key = Registry.CurrentUser.CreateSubKey("Software\\NovaStudios\\NovaChatClient\\Settings", true); } try { key.SetValue(setting, value, type); AddSettingToDict(setting, value, ref dict); returnCode = 0; } catch { returnCode = 1; } key.Dispose(); return(returnCode); }
public NotificationManager(Tcp_Client parent, ref ObservableDictionary <string, object> settingsDictionary) { this.parent = parent; }