コード例 #1
0
ファイル: AusotsParser.cs プロジェクト: zylx0532/QSimPlanner
 public AusotsParser(
     ITrackMessage data,
     StatusRecorder statusRecorder,
     AirportManager airportList)
 {
     allTxt = ((AusotsMessage)data).AllText;
     this.statusRecorder = statusRecorder;
     this.airportList    = airportList;
 }
コード例 #2
0
 // @Throws
 private async Task GetTracksAsync(ITrackMessageProvider provider, StatusRecorder r)
 {
     try
     {
         Message = await provider.GetMessageAsync();
     }
     catch
     {
         AddFailRecord(r);
         throw;
     }
 }
コード例 #3
0
 // @Throws
 private void GetTracks(ITrackMessageProvider provider, StatusRecorder r)
 {
     try
     {
         Message = provider.GetMessage();
     }
     catch
     {
         AddFailRecord(r);
         throw;
     }
 }
コード例 #4
0
        private void SetTrackMessageAndEnable(TrackType type, ITrackMessage message)
        {
            var h = GetHandler(type);

            StatusRecorder.Clear(type);
            h.UndoEdit();

            h.GetAllTracks(new TrackMessageProvider(message), StatusRecorder);
            h.AddToWaypointList(StatusRecorder);
            InvokeTrackMessageUpdated();
            InvokeStatusChanged(type);
        }
コード例 #5
0
ファイル: Helpers.cs プロジェクト: zylx0532/QSimPlanner
        public static ITrackParser <T> GetParser <T>(ITrackMessage msg,
                                                     StatusRecorder statusRecorder, AirportManager airportList) where T : Track
        {
            var type = GetTrackType <T>();

            if (type == TrackType.Nats)
            {
                return((ITrackParser <T>) new NatsParser(msg, statusRecorder));
            }
            else if (type == TrackType.Pacots)
            {
                return((ITrackParser <T>) new PacotsParser(msg, airportList));
            }
            else if (type == TrackType.Ausots)
            {
                return((ITrackParser <T>) new AusotsParser(msg, statusRecorder, airportList));
            }

            throw new ArgumentException();
        }
コード例 #6
0
ファイル: PacotsParser.cs プロジェクト: zylx0532/QSimPlanner
 public PacotsParser(ITrackMessage message, AirportManager airportList)
 {
     this.message     = (PacotsMessage)message;
     this.airportList = airportList;
 }
コード例 #7
0
 public void SetTrackMessageAndEnable(TrackType type, ITrackMessage message,
                                      ActionSequence seq)
 {
     queues.EnqueueSyncTask(type, () => SetTrackMessageAndEnable(type, message), seq);
 }
コード例 #8
0
 public TrackMessageProvider(ITrackMessage msg)
 {
     this.msg = msg;
 }
コード例 #9
0
 public NatsParser(ITrackMessage message, StatusRecorder statusRecorder)
 {
     this.message        = (NatsMessage)message;
     this.statusRecorder = statusRecorder;
 }