Exemple #1
0
        public MainWindow()
        {
            InitializeComponent();
            NetworkConnection   generalTelnet = new NetworkConnection();
            MainWindowViewModel myViewModel   = new MainWindowViewModel(new MainWindowModel(generalTelnet));

            this.DataContext = myViewModel;

            FlightBoardViewModel flightBoardViewModel = new FlightBoardViewModel(new FlightBoardModel(generalTelnet));

            this.flightBoardView.SetVM(flightBoardViewModel);
            this.flightBoardView.DataContext = flightBoardViewModel;

            CommandCenterUCVM ccucvm = new CommandCenterUCVM(new CommandCenterUCModel(generalTelnet));

            this.commandCenterUCView.SetVM(ccucvm);
        }
Exemple #2
0
 public void SetVM(CommandCenterUCVM viewModel)
 {
     this.DataContext = viewModel;
     myViewModel      = viewModel;
 }
Exemple #3
0
 /// <summary>
 /// Sets a view model for this view
 /// </summary>
 /// <param name="viewModel">the required view model</param>
 public void SetVM(CommandCenterUCVM viewModel)
 {
     this.DataContext = viewModel;
     this.JoystickView.SetVM(viewModel);
 }