Exemple #1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Joystick = ((FlightSimulatorApp.View.FullJoystick)(target));
                return;

            case 2:
                this.map = ((FlightSimulatorApp.View.Map)(target));
                return;

            case 3:

            #line 28 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonConnect_Click);

            #line default
            #line hidden
                return;

            case 4:

            #line 29 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonDisconnect_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Exemple #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.background = ((System.Windows.Controls.Image)(target));
                return;

            case 2:
                this.Controls = ((FlightSimulatorApp.View.Controll)(target));
                return;

            case 3:
                this.Map = ((FlightSimulatorApp.View.Map)(target));
                return;

            case 4:
                this.DashBoard = ((FlightSimulatorApp.View.DashBoard)(target));
                return;

            case 5:
                this.Error = ((FlightSimulatorApp.View.Error)(target));
                return;

            case 6:
                this.disconnect = ((System.Windows.Controls.Button)(target));

            #line 17 "..\..\..\View\ControlsPage.xaml"
                this.disconnect.Click += new System.Windows.RoutedEventHandler(this.disconnect_Click);

            #line default
            #line hidden
                return;

            case 7:
                this.close_prog = ((System.Windows.Controls.Button)(target));

            #line 18 "..\..\..\View\ControlsPage.xaml"
                this.close_prog.Click += new System.Windows.RoutedEventHandler(this.close_prog_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Exemple #3
0
        public void StartFlying(string ip, int port)
        {
            MainGrid.Children.Remove(MainButton);
            model = new Model.AircraftModel(new TcpClient(), ip, port);
            ViewModels.DashBoardViewModel VMdashboard = new ViewModels.DashBoardViewModel(model);
            View.DashBoard das = new View.DashBoard(model, VMdashboard);
            dashSpace.Children.Add(das);
            DataContext = VMdashboard;
            if (!model.Stop)
            {
                ViewModels.JoystickViewModel VMjoystick = new ViewModels.JoystickViewModel(model);
                ViewModels.MapViewModel      VMmap      = new ViewModels.MapViewModel(model);

                View.Sliders slide = new View.Sliders(model, VMjoystick);
                View.Map     mapp  = new View.Map(model, VMmap);
                joySpace.Children.Add(slide);
                mapSpace.Children.Add(mapp);
            }
        }