Ejemplo n.º 1
0
 public virtual void Load()
 {
     lock (readWriteLock)
     {
         TextReader textReader = null;
         try{
             XmlSerializer deserializer = XmlHelper.CreateSerializer(typeof(EV3FirmwareSettings));
             textReader = new StreamReader(settingsFileName);
             Object obj          = deserializer.Deserialize(textReader);
             var    loadSettings = (EV3FirmwareSettings)obj;
             textReader.Close();
             GeneralSettings   = loadSettings.GeneralSettings;
             WiFiSettings      = loadSettings.WiFiSettings;
             SoundSettings     = loadSettings.SoundSettings;
             WebServerSettings = loadSettings.WebServerSettings;
         }
         catch
         {
             Save();
         }
         if (textReader != null)
         {
             textReader.Close();
         }
     }
 }
Ejemplo n.º 2
0
 public FirmwareSettings()
 {
     GeneralSettings   = new GeneralSettings();
     WiFiSettings      = new WiFiSettings();
     DebugSettings     = new DebugSettings();
     SoundSettings     = new SoundSettings();
     WebServerSettings = new WebServerSettings();
 }
Ejemplo n.º 3
0
 public FirmwareSettings()
 {
     GeneralSettings = new GeneralSettings();
     WiFiSettings = new WiFiSettings();
     DebugSettings = new DebugSettings();
     SoundSettings = new SoundSettings();
     WebServerSettings = new WebServerSettings();
 }
Ejemplo n.º 4
0
 public EV3FirmwareSettings(string settingsFileName)
 {
     this.settingsFileName = settingsFileName;
     GeneralSettings       = new GeneralSettings();
     WiFiSettings          = new WiFiSettings();
     SoundSettings         = new SoundSettings();
     WebServerSettings     = new WebServerSettings();
 }
Ejemplo n.º 5
0
		public EV3FirmwareSettings(string settingsFileName)
		{
			this.settingsFileName = settingsFileName;
			GeneralSettings = new GeneralSettings();
			WiFiSettings = new WiFiSettings();
			SoundSettings = new SoundSettings();
			WebServerSettings = new WebServerSettings();

		}
Ejemplo n.º 6
0
		public virtual void Load()
		{
			lock (readWriteLock) 
			{
				TextReader textReader = null;
				try{
					XmlSerializer deserializer = XmlHelper.CreateSerializer(typeof(EV3FirmwareSettings));
					textReader = new StreamReader (settingsFileName);
					Object obj = deserializer.Deserialize (textReader);
					var loadSettings = (EV3FirmwareSettings)obj;
					textReader.Close ();
					GeneralSettings = loadSettings.GeneralSettings;
					WiFiSettings = loadSettings.WiFiSettings;
					SoundSettings = loadSettings.SoundSettings;
					WebServerSettings = loadSettings.WebServerSettings;
				}
				catch
				{
					Save();
				}
				if(textReader!= null)
					textReader.Close();
			}
		}