Example #1
0
 public static void Load (string path)
 {
     if (_instance == null)
     {
         using (var s = File.Open (path, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite))
         {
             _instance = (BasicConfiguration)new XmlSerializer (typeof (BasicConfiguration)).Deserialize (s);
             _instance.Path = path;
         }
     }
 }
Example #2
0
 public void FillExample()
 {
     Comport = "COM1";
     NumberOfContactClosureBanks = 1;
     AvailableRelayBanks = new List<RelayBank>
                               {
                                   new RelayBank
                                       {
                                           AvailableRelays = 8,
                                           Number = 0
                                       }
                               };
     _instance = this;
 }