Ejemplo n.º 1
0
        public void PopulateFlightCB()
        {
            _flightNumberCB.Items.Clear();
            String destinationCode = (String)_destinationAirportSearchableComboBox.GetSelectedValue();
            if( destinationCode == null ) return;

            JwList<VmScheduledFlight> data = new JwList<VmScheduledFlight>();
            foreach(VmScheduledFlight sf in _scheduledFlights)
            {
                if( sf.MatchesDestinationAirportCode(destinationCode) )
                {
                    data.Add(sf);
                }
            }

            data.Sort(delegate(VmScheduledFlight sf1, VmScheduledFlight sf2) { return sf1.DepartureTime.CompareTo(sf2.DepartureTime); });
            _flightNumberCB.AddRange(data);

            HandleFlightCBSelection();
        }
Ejemplo n.º 2
0
        //# __________ PROTOCOL :: EVENT MANAGER RESOLUTION __________ #//
        public VmEventManagerIF GetMostRecentlyUsedEventManager()
        {
            JwList<VmEventManagerIF> v = new JwList<VmEventManagerIF>();
            AddIfBeingUsed(v, ItemEventManager);
            AddIfBeingUsed(v, NestEventManager);
            AddIfBeingUsed(v, AliasEventManager);

            if( v.IsEmpty() ) return null;

            v.Sort( new VmEventManagerMostRecentlyUsedComparer());
            return v.GetLast();
        }