/// <summary>
 /// constructor
 /// </summary>
 public FlightBoardViewModel()
 {
     //connect to model layer
     model = FlightBoardModel.Instance;
     //sign to event
     model.changedParamsEvent += ChangedParams;
 }
Example #2
0
 /// <summary>
 /// ctor for the view model
 /// </summary>
 /// <param name="model">a required model</param>
 public FlightBoardViewModel(FlightBoardModel model)
 {
     myModel = model;
     myModel.PropertyChanged += delegate(object o, PropertyChangedEventArgs e)
     {
         this.PropertyChanged?.Invoke(o, e);
     };
 }
Example #3
0
 public FlightBoardViewModel(FlightBoardModel model)
 {
     this.model             = model;
     model.PropertyChanged += delegate(object sender, System.ComponentModel.PropertyChangedEventArgs e)
     {
         NotifyPropertyChanged(e.PropertyName);
     };
 }
 public FlightBoardViewModel()
 {
     model = new FlightBoardModel();
     model.PropertyChanged += delegate(object sender, PropertyChangedEventArgs e)
     {
         NotifyPropertyChanged(e.PropertyName);
     };
 }
Example #5
0
 public FlightBoardViewModel(FlightBoardModel model)
 {
     this.flightBoardModel  = model;
     model.PropertyChanged += delegate(Object sender, PropertyChangedEventArgs e)
     {
         /* let the observers of the vie model the model) know that a property changed */
         NotifyPropertyChanged(e.PropertyName);
     };
 }
Example #6
0
 /* the ViewModel responsible of the Flight Board.
  * receiving a displayer as a parameter.
  * also, creates new FlightBoard model and registers itself to be
  * notified when properties change. */
 public FlightBoardViewModel(IWindowDisplayer windowDisplayer)
 {
     this.displayer         = windowDisplayer;
     model                  = new FlightBoardModel();
     model.PropertyChanged += delegate(object sender, PropertyChangedEventArgs e)
     {
         this.NotifyPropertyChanged("VM_" + e.PropertyName);
     };
 }
Example #7
0
        public FlightBoardViewModel()
        {
            _flightBoardModel = new FlightBoardModel();

            //Tie and chain the Notify of the viewModel with the model Notify - when the model notify, the viewModel notify As well.
            _flightBoardModel.PropertyChanged += delegate(Object sender, PropertyChangedEventArgs e) {
                NotifyPropertyChanged(e.PropertyName);
            };
        }
Example #8
0
 public FlightBoardViewModel()
 {
     flightBoardModel = new FlightBoardModel(InfoServer.Instance);
     flightBoardModel.PropertyChanged += delegate(Object sender, PropertyChangedEventArgs e)
     {
         if (e.PropertyName == "Lat")
         {
             Lat = flightBoardModel.Lat;
         }
         else if (e.PropertyName == "Lon")
         {
             Lon = flightBoardModel.Lon;
         }
         NotifyPropertyChanged(e.PropertyName);
     };
 }
Example #9
0
 public FlightBoardViewModel()
 {
     model = new FlightBoardModel(new Info());
     model.PropertyChanged += delegate(Object sender, PropertyChangedEventArgs e)
     {
         if (e.PropertyName == "Lat")
         {
             Lat = model.Lat;
         }
         else if (e.PropertyName == "Lon")
         {
             Lon = model.Lon;
         }
         NotifyPropertyChanged(e.PropertyName);
     };
 }
 // The constructor.
 public FlightBoardViewModel()
 {
     // Create the model and connect it to the information server.
     model = new FlightBoardModel(new InformationServer());
     model.PropertyChanged += delegate(Object sender, PropertyChangedEventArgs e) {
         // Update the lat.
         if (e.PropertyName == "Lat")
         {
             Lat = model.Lat;
         }
         // Update the lon.
         else if (e.PropertyName == "Lon")
         {
             Lon = model.Lon;
         }
         // Notify everyone of changes.
         PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(e.PropertyName));
     };
 }
 public FlightBoardViewModel()
 {
     this.myModel  = new FlightBoardModel();
     this.myClient = Client.InstanceClass;
 }
Example #12
0
 public FlightBoardViewModel()
 {
     model = new FlightBoardModel();
     model.FlightBoardData += updateFlightBoardData;
 }
Example #13
0
 /// <summary>
 /// Constructor
 /// </summary>
 public FlightBoardViewModel()
 {
     this.model = new FlightBoardModel();
     this.model.PropertyChanged += Model_PropertyChanged;
 }
 public FlightBoardViewModel(FlightBoardModel model)
 {
     this.model = model;
 }
 public FlightBoardVM()
 {
     info = new FlightBoardModel();
     info.PropertyChanged += FlightBoardViewModel_PropertyChanged;
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="model"> A model object, used to receive updated values from and connect to the simulator </param>
 public FlightBoardViewModel(FlightBoardModel model)
 {
     this.model = model;
     this.model.PropertyChanged += (sender, args) => NotifyPropertyChanged("VM_" + args.PropertyName);
 }
Example #17
0
 public FlightBoardViewModel(FlightBoardModel m)
 {
     model = m;
 }
Example #18
0
 public FlightBoardViewModel()
 {
     model = FlightBoardModel.Instance;
     model.updateChangedParamsEvent += NotifyChangedParams;
 }
Example #19
0
 public FlightBoardViewModel()
 {
     this.isConnected            = false;
     this.model                  = new FlightBoardModel();
     this.model.PropertyChanged += M_PropertyChanged;
 }