コード例 #1
0
 public void TestConnection()
 {
     using (var device = new ASCOM.DriverAccess.Telescope("ASCOM.EQ500X.Telescope"))
     {
         bool dummy = false;
         Assert.IsFalse(device.Connected);
         Assert.IsFalse(device.CommandBool("isSimulated", dummy));
         try
         {
             device.Connected = true;
             //Assert.IsTrue(device.Connected);
             //Assert.IsTrue(device.CommandBool("isSimulated", dummy));
             device.Connected = false;
         }
         catch (Exception) { }
         Assert.IsFalse(device.Connected);
         Assert.IsFalse(device.CommandBool("isSimulated", dummy));
     }
 }
コード例 #2
0
 public void TestSimulation()
 {
     using (var device = new ASCOM.DriverAccess.Telescope("ASCOM.EQ500X.Telescope"))
     {
         bool dummy = false;
         Assert.IsFalse(device.Connected);
         Assert.IsFalse(device.CommandBool("isSimulated", dummy));
         Assert.IsTrue(device.CommandBool("Simulated", true));
         Assert.IsTrue(device.CommandBool("isSimulated", dummy));
         device.Connected = true;
         Assert.IsTrue(device.Connected);
         Assert.IsTrue(device.CommandBool("isSimulated", dummy));
         device.Connected = false;
         Assert.IsFalse(device.Connected);
         Assert.IsTrue(device.CommandBool("isSimulated", dummy));
         Assert.IsFalse(device.CommandBool("Simulated", false));
         Assert.IsFalse(device.CommandBool("isSimulated", dummy));
     }
 }
コード例 #3
0
 public void setUp()
 {
     device = new ASCOM.DriverAccess.Telescope("ASCOM.EQ500X.Telescope");
     device.CommandBool("Simulated", true);
 }
コード例 #4
0
 public bool CommandBool(string command, bool raw)
 {
     CheckConnected();
     return(m_mount.CommandBool(command, raw));
 }