Ejemplo n.º 1
0
        protected override void Synchronise()
        {
            base.Synchronise();
            ChatFlightCardDataItem dataItem = this.DataItem as ChatFlightCardDataItem;

            this.nameElement.Text     = dataItem.PassangerName;
            this.planeImage           = dataItem.Image;
            this.totalSumElement.Text = dataItem.Total;
            for (int index = 0; index < this.stackElement.Children.Count; ++index)
            {
                if (index < this.stackElement.Children.Count && this.stackElement.Children[index] is FlightStackLayoutPanel)
                {
                    this.stackElement.Children.RemoveAt(index);
                }
            }
            int index1 = 3;

            foreach (FlightInfo flight in dataItem.Flights)
            {
                FlightStackLayoutPanel flightStackElement = this.CreateFlightStackElement();
                FlightCardAirportInfo  departureElement   = this.CreateFlightDepartureElement(flight.DepartureCity, flight.DepartureAirport, flight.DepartureDateTime.ToShortDateString(), flight.DepartureDateTime.ToShortTimeString());
                LightVisualElement     flightImageElement = this.CreateFlightImageElement();
                flightImageElement.Image = this.planeImage;
                FlightCardAirportInfo flightArrivalElement = this.CreateFlightArrivalElement(flight.ArrivalCity, flight.ArrivalAirport, flight.ArrivalDateTime.ToShortDateString(), flight.ArrivalDateTime.ToShortTimeString());
                flightStackElement.Children.Add((RadElement)departureElement);
                flightStackElement.Children.Add((RadElement)flightImageElement);
                flightStackElement.Children.Add((RadElement)flightArrivalElement);
                this.stackElement.Children.Insert(index1, (RadElement)flightStackElement);
                ++index1;
            }
        }
Ejemplo n.º 2
0
 public ChatFlightCardElement(ChatFlightCardDataItem item)
     : base((BaseChatCardDataItem)item)
 {
 }