Exemplo n.º 1
0
 public static void LoadAutoActivationSettings()
 {
     if (File.Exists(AutoActivationSettingsFileName))
     {
         using (var fileStream = new FileStream(AutoActivationSettingsFileName, FileMode.Open))
         {
             var dataContractSerializer = new DataContractSerializer(typeof(AutoActivationSettings));
             AutoActivationSettings = (AutoActivationSettings)dataContractSerializer.ReadObject(fileStream);
         }
     }
     else
     {
         AutoActivationSettings = new AutoActivationSettings();
     }
 }
Exemplo n.º 2
0
		static void LoadAutoActivationSettings()
		{
			if (File.Exists(AutoActivationSettingsFileName))
			{
				using (var fileStream = new FileStream(AutoActivationSettingsFileName, FileMode.Open))
				{
					var xmlSerializer = new XmlSerializer(typeof(AutoActivationSettings));
					AutoActivationSettings = (AutoActivationSettings)xmlSerializer.Deserialize(fileStream);
				}
			}
			else
			{
				AutoActivationSettings = new AutoActivationSettings();
			}
		}