コード例 #1
0
 void sc_OnRecvSimobjectDataBytype(SimConnect sender, SIMCONNECT_RECV_SIMOBJECT_DATA_BYTYPE data)
 {
     if (!Objects.Contains(data.dwObjectID))
     {
         VehiclePosition pos = (VehiclePosition)data.dwData;
         pos.ObjectID = data.dwObjectID;
         AddObject(pos);
     }
 }
コード例 #2
0
 void AddObject(VehiclePosition pos)
 {
     sc.RequestDataOnSimObject(
         (RequestIDs)((uint)RequestIDs.VehicleDataRequestBase + (uint)pos.ObjectID),
         pos.ObjectID,
         SIMCONNECT_PERIOD.VISUAL_FRAME,
         SIMCONNECT_DATA_REQUEST_FLAG.CHANGED,
         pos);
     this.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, new MyDelegate(delegate()
     {
         Objects.Add(pos);
     }));
 }
コード例 #3
0
        void AddObject(UInt32 eObjectID)
        {
            VehiclePosition pos = new VehiclePosition(eObjectID);

            AddObject(pos);
        }