public void set(string key, string value)
		{
			DataStorage.UserSetting setting;
			if (settingsDictionary.ContainsKey(key))
			{
				setting = settingsDictionary[key];
			}
			else
			{
				setting = new DataStorage.UserSetting();
				setting.Name = key;

				settingsDictionary[key] = setting;
			}

			setting.Value = value;
			setting.Commit();
		}
Exemple #2
0
        public void set(string key, string value)
        {
            DataStorage.UserSetting setting;
            if (settingsDictionary.ContainsKey(key))
            {
                setting = settingsDictionary[key];
            }
            else
            {
                setting      = new DataStorage.UserSetting();
                setting.Name = key;

                settingsDictionary[key] = setting;
            }

            setting.Value = value;
            setting.Commit();
        }
		public void set(string key, string value)
		{
			UserSetting setting;

			if(!settingsDictionary.TryGetValue(key, out setting))
			{
				// If the setting for the given key doesn't exist, create it
				setting = new UserSetting()
				{
					Name = key
				};
				settingsDictionary[key] = setting;
			}

			// Special case to propagate Language to local property on assignment
			if(key == "Language")
			{
				this.Language = value;
			}

			setting.Value = value;
			setting.Commit();
		}