// constructor gets the model in order to create the view models for each view internal MainWindow(IFlightControl model) { InitializeComponent(); // create player view model and set its data context PlayerViewModel pvm = new PlayerViewModel(model);; playerView.PlayerVM = pvm; playerView.DataContext = pvm; // create data view model and set its data context DataViewModel dvm = new DataViewModel(model); dataView.DataVM = dvm; dataView.DataContext = dvm; // create research view model and set its data context ResearchViewModel rvm = new ResearchViewModel(model); researchView.ResearchVM = rvm; researchView.DataContext = rvm; // create settings view model and set its data context SettingsViewModel svm = new SettingsViewModel(model); settingsView.SettingsVM = svm; settingsView.DataContext = svm; }
// constructor public ViewModel(IFlightControl model) { this.Model = model; // the view model is an observer of the model model.PropertyChanged += delegate(Object sender, PropertyChangedEventArgs e) { PropertyChangedNotify("VM_" + e.PropertyName); }; }
public DashboarQueryConsumer(ILogger log, IFlightControl flightControl, IHubContext <DashboardQueryHub> hubContext, IConfiguration configuration) { Log = log; FlightControl = flightControl; Configuration = configuration; Settings = Configuration.GetSection("DashboardSettings").Get <DashboardSettings>(); DashBoardGw = EndpointAddress.Create(Settings.DashboardgatewayQueue); _dashboardQueryHubContext = hubContext; #region Set_Handler_chain _barChart = new BarChart(); _lineChart = new LineChart(); _pieChart = new PieChart(); _simplePie = new SimplePie(); _barChart.SetSuccessor(_lineChart); _lineChart.SetSuccessor(_pieChart); _lineChart.SetSuccessor(_simplePie); #endregion }
public FlightMapSampleHub(IFlightControl ctrl) { control = ctrl; }
public AnimationController(IFlightControl ctrl, IConfiguration configuration) { adminKey = configuration["AdminKey"]; control = ctrl; }
// view model constructor (contains the model) public PlayerViewModel(IFlightControl model) : base(model) { }
// view model constructor (contains the model) public ResearchViewModel(IFlightControl model) : base(model) { }
// view model constructor (contains the model) public DataViewModel(IFlightControl model) : base(model) { }
// view model constructor (contains the model) public SettingsViewModel(IFlightControl model) : base(model) { }
public FlightMapHub(IFlightControl ctrl) { control = ctrl; }