public MainWindow()
 {
     try
     {
         InitializeComponent();
     }
     catch (Exception e)
     {
         throw new Exception($"Main window did not initialize. {e.Message}");
     }
     finally
     {
         Content = new AirportUserControl(this);
     }
 }
示例#2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.AirportUC = ((CT.UI.Views.AirportUserControl)(target));
                return;

            case 2:
                this.grdMain = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.imgPlaneArr1 = ((System.Windows.Controls.Image)(target));
                return;

            case 4:
                this.txtblckFlightArr1 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 5:
                this.imgPlaneArr2 = ((System.Windows.Controls.Image)(target));
                return;

            case 6:
                this.txtblckFlightArr2 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 7:
                this.imgPlaneArr3 = ((System.Windows.Controls.Image)(target));
                return;

            case 8:
                this.txtblckFlightArr3 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 9:
                this.imgPlaneRunway = ((System.Windows.Controls.Image)(target));
                return;

            case 10:
                this.txtblckFlightRunway = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 11:
                this.txtblckTerminal1Message = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 12:
                this.imgPlaneTerminal1 = ((System.Windows.Controls.Image)(target));
                return;

            case 13:
                this.txtblckFlightTerminal1 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 14:
                this.txtblckTerminal2Message = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 15:
                this.imgPlaneTerminal2 = ((System.Windows.Controls.Image)(target));
                return;

            case 16:
                this.txtblckFlightTerminal2 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 17:
                this.imgPlanDepart = ((System.Windows.Controls.Image)(target));
                return;

            case 18:
                this.txtblckFlightDepart = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 19:
                this.lstvwParkUnload = ((System.Windows.Controls.ListView)(target));
                return;

            case 20:
                this.lstvwParkDepart = ((System.Windows.Controls.ListView)(target));
                return;
            }
            this._contentLoaded = true;
        }