Ejemplo n.º 1
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();
		}
Ejemplo n.º 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();
        }
Ejemplo n.º 3
0
		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();
		}