public AutoPilot() { InitializeComponent(); AutoPilotViewModel APVM = new AutoPilotViewModel(ApplicationModel.Instance); this.DataContext = APVM; }
public AutoPilot() { //set context to view model viewModel = new AutoPilotViewModel(); this.DataContext = viewModel; InitializeComponent(); }
public AutoPilot() { InitializeComponent(); vm = new AutoPilotViewModel(new AutoPilotModel()); DataContext = vm; //this is the exact color from the instructions customLightRed = (Brush) new BrushConverter().ConvertFrom("#FFB6C1"); vm.PropertyChanged += delegate(object sender, System.ComponentModel.PropertyChangedEventArgs e) { /* if the user is typing, that means that the text has been changed, thus the background should * change to light red, otherwise it should be white */ if (e.PropertyName.Equals("IsTyping")) { if (vm.IsTyping) { textBox.Background = customLightRed; } else { textBox.Background = Brushes.White; } } }; }
public AutoPilot() { InitializeComponent(); AutoPilotViewModel autoViewModel = new AutoPilotViewModel(); DataContext = autoViewModel; }
private AutoPilotViewModel vm; // auto pilot view model instance /** * the constructor creates presentation of AutoPilot Control based on the xaml code * and initialized his properties **/ public AutoPilotControl() { InitializeComponent(); vm = new AutoPilotViewModel(); /* changes the data context to view model */ DataContext = vm; }
public AutoPilot() { InitializeComponent(); AutoPilotViewModel AutoPilotVM = new AutoPilotViewModel(); DataContext = AutoPilotVM; }
public AutoPilot() { // Intialize the component InitializeComponent(); // Initialize the view model. viewModel = new AutoPilotViewModel(); DataContext = viewModel; }
public void SendCommands(string input, AutoPilotViewModel vm) { // open new thread to avoid idle new Thread(delegate() { Commands.Instance.SendCommands(input); vm.Background = Brushes.White; }).Start(); }
public Auto() { InitializeComponent(); autoPilotView = new AutoPilotViewModel(); DataContext = autoPilotView; if (autoPilotView.WhiteBackgroundAction == null) { autoPilotView.WhiteBackgroundAction = new Action(() => TextBox.Background = Brushes.White); } }
public AutoPilot() { // init InitializeComponent(); DataContext = this.vm = new AutoPilotViewModel(); // while script wasn't sent, textbox is pink // this.colorfullTextBox.Background = Brushes.Pink; /* if (vm.makeRed == null) * { * vm.makeRed = new Action(() => this.colorfullTextBox.Background = Brushes.Pink); * } * if (vm.makeWhite == null) * { * vm.makeWhite = new Action(() => this.colorfullTextBox.Background = Brushes.WhiteSmoke); * }*/ }
//CTOR public MainWindow() { InitializeComponent(); IMainWinModel m = new MainWinMod(AutoPilotBox); vm = new ManuelPilotViewModel(m, joystick); FlightBoardViewModel fvm = new FlightBoardViewModel(m); AutoPilotViewModel avm = new AutoPilotViewModel(m); osvm = new OtherStuffViewModel(m); flightBoard.VM = fvm; m.PropertyChanged += fvm.Model_PropertyChanged; joystick.Moved += vm.JoyStick_Handler; this.DataContext = vm; autoPilotButt.DataContext = avm; clearButt.DataContext = avm; connectButt.DataContext = osvm; settButt.DataContext = osvm; Application.Current.MainWindow.Closing += new System.ComponentModel.CancelEventHandler(MainWindow_Closing); }
public AutoPilot() { vm = new AutoPilotViewModel(SimulatorModel.Instance); InitializeComponent(); this.DataContext = vm; }
public AutoPilotView() { InitializeComponent(); viewModel = new AutoPilotViewModel(); DataContext = viewModel; }
public AutoPilot() { InitializeComponent(); vm = new AutoPilotViewModel(new AutoPilotModel()); DataContext = vm; }
public UC_AutoPilot() { InitializeComponent(); DataContext = new AutoPilotViewModel(); }
public AutoPilot() { InitializeComponent(); this.viewModel = new AutoPilotViewModel(); this.DataContext = this.viewModel; }
public AutoPilot() { InitializeComponent(); DataContext = new AutoPilotViewModel(Commands.Instance); }
public AutoPilotControlPanel() { InitializeComponent(); vm = new AutoPilotViewModel(new AutoPilotModel()); this.DataContext = vm; }
public AutoPilotView() { InitializeComponent(); VM_AutoPilot = new AutoPilotViewModel(); DataContext = VM_AutoPilot; }
public AutoPilot() { InitializeComponent(); autoVM = new AutoPilotViewModel(); this.DataContext = autoVM; }