Exemplo n.º 1
0
 public bool CanMoveAxis(ASCOM.DeviceInterface.TelescopeAxes Axis)
 {
     return((bool)this.memberFactory.CallMember(3, "CanMoveAxis", new Type[1]
     {
         typeof(ASCOM.DeviceInterface.TelescopeAxes)
     }, (object)Axis));
 }
Exemplo n.º 2
0
 public void MoveAxis(ASCOM.DeviceInterface.TelescopeAxes Axis, double Rate)
 {
     this.memberFactory.CallMember(3, "MoveAxis", new Type[2]
     {
         typeof(ASCOM.DeviceInterface.TelescopeAxes),
         typeof(double)
     }, (object)Axis, (object)Rate);
 }
Exemplo n.º 3
0
        public ASCOM.DeviceInterface.IAxisRates AxisRates(ASCOM.DeviceInterface.TelescopeAxes Axis)
        {
            this.TL.LogMessage("AxisRates", "");
            this.TL.LogMessage("AxisRates", Axis.ToString());
            if (!this.memberFactory.IsComObject)
            {
                if (this.isPlatform6Telescope)
                {
                    this.TL.LogMessage("AxisRates", "Platform 6 .NET Telescope");
                    object obj = this.memberFactory.CallMember(3, "AxisRates", new Type[1]
                    {
                        typeof(ASCOM.DeviceInterface.TelescopeAxes)
                    }, (object)Axis);
                    try
                    {
                        ASCOM.DeviceInterface.IAxisRates axisRates = (ASCOM.DeviceInterface.IAxisRates)obj;
                        this.TL.LogMessage("AxisRates", "Number of returned AxisRates: " + (object)axisRates.Count);
                        if (axisRates.Count > 0)
                        {
                            for (int index = 1; index <= axisRates.Count; ++index)
                            {
                                this.TL.LogMessage("AxisRates", "Found Minimim: " + (object)axisRates[index].Minimum + ", Maximum: " + (object)axisRates[index].Maximum);
                            }
                        }
                    }
                    catch (Exception ex)
                    {
                        this.TL.LogMessageCrLf("AxisRates", ex.ToString());
                    }
                    return((ASCOM.DeviceInterface.IAxisRates)obj);
                }
                if (this.isPlatform5Telescope)
                {
                    this.TL.LogMessage("AxisRates", "Platform 5 .NET Telescope");
                    object obj = this.memberFactory.CallMember(3, "AxisRates", new Type[1]
                    {
                        typeof(ASCOM.DeviceInterface.TelescopeAxes)
                    }, (object)Axis);
                    ASCOM.DeviceInterface.IAxisRates axisRates = (IAxisRates) new AxisRates();
                    try
                    {
                        IAxisRates AxisRates = (IAxisRates)obj;
                        axisRates = (IAxisRates) new AxisRates(AxisRates, this.TL);
                        this.TL.LogMessage("AxisRates", "Number of returned AxisRates: " + (object)AxisRates.Count);
                        if (AxisRates.Count > 0)
                        {
                            for (int index = 1; index <= AxisRates.Count; ++index)
                            {
                                this.TL.LogMessage("AxisRates", "Found Minimim: " + (object)AxisRates[index].Minimum + ", Maximum: " + (object)AxisRates[index].Maximum);
                            }
                        }
                    }
                    catch (Exception ex)
                    {
                        this.TL.LogMessageCrLf("AxisRates", ex.ToString());
                    }
                    return(axisRates);
                }
                this.TL.LogMessage("AxisRates", "Neither Platform 5 nor Platform 6 .NET Telescope");
                return((ASCOM.DeviceInterface.IAxisRates) new AxisRates());
            }
            this.TL.LogMessage("AxisRates", "Platform 5/6 COM Telescope");
            _AxisRates axisRates1 = new _AxisRates(Axis, this.memberFactory.GetObjType, this.memberFactory.GetLateBoundObject, this.TL);

            try
            {
                if (axisRates1.Count > 0)
                {
                    for (int index = 1; index <= axisRates1.Count; ++index)
                    {
                        this.TL.LogMessage("AxisRates", "Found Minimim: " + (object)axisRates1[index].Minimum + ", Maximum: " + (object)axisRates1[index].Maximum);
                    }
                }
            }
            catch (Exception ex)
            {
                this.TL.LogMessageCrLf("AxisRates", ex.ToString());
            }
            return((ASCOM.DeviceInterface.IAxisRates)axisRates1);
        }