Пример #1
0
		public static void SetString(string name, string stringValue)
		{
			var registryData = new RegistryData()
			{
				Name = name,
				StringValue = stringValue
			};
			SetRegistryData(registryData);
		}
Пример #2
0
		public static void SetInt(string name, int intValue)
		{
			var registryData = new RegistryData()
			{
				Name = name,
				IntValue = intValue
			};
			SetRegistryData(registryData);
		}
Пример #3
0
		static void SetRegistryData(RegistryData newRegistryData)
		{
			try
			{
				var registryDataConfiguration = GetRegistryDataConfiguration();
				var registryData = registryDataConfiguration.RegistryDataCollection.FirstOrDefault(x => x.Name == newRegistryData.Name);
				if (registryData == null)
				{
					registryData = new RegistryData()
					{
						Name = newRegistryData.Name
					};
					registryDataConfiguration.RegistryDataCollection.Add(registryData);
				}
				registryData.StringValue = newRegistryData.StringValue;
				registryData.IntValue = newRegistryData.IntValue;
				registryData.DoubleValue = newRegistryData.DoubleValue;
				registryData.BoolValue = newRegistryData.BoolValue;
				registryData.StringsValue = newRegistryData.StringsValue;
				registryData.WindowRectValue = newRegistryData.WindowRectValue;
				registryData.ColorValue = newRegistryData.ColorValue;
				SetRegistryDataConfiguration(registryDataConfiguration);
			}
			catch (Exception e)
			{
				Logger.Error(e, "RegistrySettingsHelper.SetRegistryData " + newRegistryData.Name);
			}
		}
Пример #4
0
		public static void SetColor(string name, Color color)
		{
			var registryData = new RegistryData()
			{
				Name = name,
				ColorValue = color
			};
			SetRegistryData(registryData);
		}
Пример #5
0
		public static void SetWindowRect(string name, WindowRect windowRect)
		{
			var registryData = new RegistryData()
			{
				Name = name,
				WindowRectValue = windowRect
			};
			SetRegistryData(registryData);
		}
Пример #6
0
		public static void SetBool(string name, bool boolValue)
		{
			var registryData = new RegistryData()
			{
				Name = name,
				BoolValue = boolValue
			};
			SetRegistryData(registryData);
		}
Пример #7
0
		public static void SetDouble(string name, double doubleValue)
		{
			var registryData = new RegistryData()
			{
				Name = name,
				DoubleValue = doubleValue
			};
			SetRegistryData(registryData);
		}