/// <summary> /// Constructor /// </summary> public MainWindow() { InitializeComponent(); this.model = new FlightSimulatorModel(new MyTelnetClient()); fs_ViewModel = new FlightSimulatorViewModel(this.model); DataContext = fs_ViewModel; //here for binding the ip, port, etc }
private void Application_Startup(Object sender, StartupEventArgs e) { model = new FlightSimulatorModel(new MyTelnetClient()); flightSimulatorViewModel = new FlightSimulatorViewModel(model); manualControlsViewModel = new ManualControlsViewModel(model); dashboardViewModel = new DashboardViewModel(model); mapControlViewModel = new MapControlViewModel(model); Window mainWindow = new MainWindow(); mainWindow.Show(); }
public UserFeaturesWindow(string csvFile) { InitializeComponent(); FlightSimulator FSmodel = FlightSimulator.ModelInstance; fsView = new FlightSimulatorViewModel(); fsView.VM_UploadReg(csvFile); DataContext = fsView; flags = fsView.VM_Flags; graphsAndList = new GraphsAndList(); DispatcherTimer timer = new DispatcherTimer(); timer.Interval = TimeSpan.FromSeconds(1); timer.Tick += timer_Tick; timer.Start(); }
public FlightSimulatorView(FlightSimulatorViewModel f) { InitializeComponent(); vm = f; DataContext = vm; this.dash.DataContext = f.DashboardVM; this.dash.SetVM(f.DashboardVM); this.media.DataContext = f.MediaPlayerVM; this.media.SetVM(f.MediaPlayerVM); this.gear.DataContext = f.GearControlVM; this.gear.SetVM(f.GearControlVM); this.graphs.DataContext = f.GraphsVM; this.graphs.SetVM(f.GraphsVM); this.detector.DataContext = f.DetectorVM; this.detector.SetVM(f.DetectorVM); Loaded += StartSim; }
public ErrorsWindow(FlightSimulatorViewModel flightSimulatorViewModel) { InitializeComponent(); vm = flightSimulatorViewModel; DataContext = vm; }