示例#1
0
        public FSInterface()
        {
            int errorCode = 0;
            isconnected = false;
            connect = new Fsuipc();
            connect.FSUIPC_Initialization();
            if(!connect.FSUIPC_Open(0,ref errorCode))
                throw new Exception("Can't connect to FSUIPC! Error code = " + errorCode.ToString());
            else
                isconnected = true;

            reqCount = 0;
            //init all subclasses
            Speeds = new Speeds(this);
            Altitudes = new Altitudes(this);
            Autopilot = new Autopilot(this);
            Controls = new FlightControls(this);
        }
示例#2
0
        public FSInterface()
        {
            int errorCode = 0;

            isconnected = false;
            connect     = new Fsuipc();
            connect.FSUIPC_Initialization();
            if (!connect.FSUIPC_Open(0, ref errorCode))
            {
                throw new Exception("Can't connect to FSUIPC! Error code = " + errorCode.ToString());
            }
            else
            {
                isconnected = true;
            }

            reqCount = 0;
            //init all subclasses
            Speeds    = new Speeds(this);
            Altitudes = new Altitudes(this);
            Autopilot = new Autopilot(this);
            Controls  = new FlightControls(this);
        }