コード例 #1
0
        public AirportCounterControl(Counter counter)
        {
            Counter = counter;
            InitializeComponent();

            Rect_Color.Fill = AirportColors.GetColorById(counter.Id);

            Update();
        }
コード例 #2
0
        public AirportTerminalControl(Terminal terminal)
        {
            InitializeComponent();

            // Initalize terminal
            Terminal        = terminal;
            Rect_Color.Fill = AirportColors.GetColorById(terminal.Id);
            Update();
        }
コード例 #3
0
 /// <summary>
 /// Used to update luggage control
 /// </summary>
 public void Update(Luggage luggage)
 {
     if (luggage != null)
     {
         Rect_Counter.Fill  = AirportColors.GetColorById(luggage.CounterId);
         Rect_Terminal.Fill = AirportColors.GetColorById(luggage.TerminalId);
     }
     else
     {
         Rect_Counter.Fill  = Brushes.Black;
         Rect_Terminal.Fill = Brushes.Black;
     }
 }