Example #1
0
 public BaseConnections()
 {
     TerminalParameters = Configuration.ConfigurationHolder.GetInstance().GetValue(ConfigurationParameter.TerminalPreferences);
     test       = new DummyInstrument();
     BSelection = test.GetB();
     MSelection = test.GetM(BSelection.First());
     test.Axis  = new Dictionary <Axis, int>()
     {
         { Axis.X, 0 }, { Axis.Y, 0 }
     };
 }
 public void Init()
 {
     test       = new DummyInstrument();
     BSelection = test.GetB();
     MSelection = test.GetM(BSelection.First());
     test.Axis  = new Dictionary <Axis, int>()
     {
         { Axis.X, 0 }, { Axis.Y, 0 }
     };
     TerminalParameters = Configuration.ConfigurationHolder.GetInstance().GetValue(ConfigurationParameter.TerminalPreferences);
     if (TerminalParameters["ConnectionType"] == "IP")
     {
         _baseConnection = new TCP();
     }
     else if (TerminalParameters["ConnectionType"] == "RS232")
     {
         _baseConnection = new RS232();
     }
     //_baseConnection.CloseConnection();
 }