Пример #1
0
 private void SimConnect_OnRecvEventFilename(SimConnect sender, SIMCONNECT_RECV_EVENT_FILENAME data)
 {
     if (data.uEventID == (int)SYSEVENTS.FileLoaded && Globals.MainWindow.FlightPlanViewModel != null)
     {
         Globals.MainWindow.FlightPlanViewModel.LoadFromFile(data.szFileName);
     }
 }
        private void SimConnect_OnRecvEventFilename(SimConnect sender, SIMCONNECT_RECV_EVENT_FILENAME data)
        {
            Trace.WriteLine($"Received event: {data.uEventID} szFileName: {data.szFileName}");

            if (data.uEventID == (uint)Definitions.AircraftLoaded)
            {
                Axis.MappingsRead(MappingFile()); // to reset axis info?!
                foreach (var m in Axis.Mappings)
                {
                    m.PropertyChanged += new PropertyChangedEventHandler(Axis_SimVarValueChanged);
                }
            }
            if (requestReverse)
            {
                RequestData(Definitions.ThrottleLowerLimit);
            }
            if (requestSpeeds)
            {
                RequestData(Definitions.DesignCruiseSpeedFeetPerSec);
            }
            if (requestEngines)
            {
                RequestData(Definitions.EnginesCount);
            }
            if (requestBrakes)
            {
                RequestData(Definitions.BrakesAvailable);
            }
            if (requestSpoiler)
            {
                RequestData(Definitions.SpoilerAvailable);
            }
            if (requestGear)
            {
                RequestData(Definitions.IsGearRetractable);
            }
            if (requestFlaps)
            {
                RequestData(Definitions.FlapsAvailable);
            }
            if (requestElevatorTrim)
            {
                RequestData(Definitions.ElevatorTrimDisabled);
            }
            if (requestAileronTrim)
            {
                RequestData(Definitions.AileronTrimDisabled);
            }
            if (requestRudderTrim)
            {
                RequestData(Definitions.RudderTrimDisabled);
            }
        }
Пример #3
0
        private void simconnect_OnRecvEventFilename(SimConnect sender, SIMCONNECT_RECV_EVENT_FILENAME data)
        {
            switch (data.uEventID)
            {
            case (uint)EVENTS.FLIGHTPLAN_LOADED:
                FLIGHTPLAN_LINK fpl;
                fpl.flightPlanFilename = data.szFileName;
                OnDataReceived(new DataReceivedEventArgs(FSDataType.DT_FLIGHTPLAN, fpl));
                break;

            default:
                break;
            }
        }
Пример #4
0
        private void Simconnect_OnRecvEventFilename(SimConnect sender, SIMCONNECT_RECV_EVENT_FILENAME data)
        {
            logger.LogInformation("OnRecvEventFilename dwID " + data.dwID + " uEventID " + data.uEventID);
            switch ((EVENTS)data.uEventID)
            {
            case EVENTS.AIRCRAFT_LOADED:
                logger.LogInformation("Aircraft loaded");
                simconnect.RequestDataOnSimObjectType(DATA_REQUESTS.AIRCRAFT_DATA, DEFINITIONS.PlaneData, 0, SIMCONNECT_SIMOBJECT_TYPE.USER);
                break;

            case EVENTS.FLIGHT_LOADED:
            {
                logger.LogInformation("Flight loaded");
                //var evt = (SIMCONNECT_RECV_EVENT_FILENAME)data;
            }
            break;
            }
        }
Пример #5
0
 void sc_OnRecvEventFilename(SimConnect sender, SIMCONNECT_RECV_EVENT_FILENAME data)
 {
     Console.WriteLine("sc_OnRecvEventFilename");
 }