コード例 #1
0
ファイル: RegOps.cs プロジェクト: Nova1545/NovaChatService
 public static void ResetSettings(ref ObservableDictionary <string, object> dict)
 {
     WriteSetting("ShowLog", 1, RegistryValueKind.DWord, ref dict);
     WriteSetting("NotificationType", "Both", RegistryValueKind.String, ref dict);
 }
コード例 #2
0
ファイル: RegOps.cs プロジェクト: Nova1545/NovaChatService
        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);
        }
コード例 #3
0
 public NotificationManager(Tcp_Client parent, ref ObservableDictionary <string, object> settingsDictionary)
 {
     this.parent = parent;
 }