public mediaController_VM() { this.media = mediaController.GetInstance; media.PropertyChanged += delegate(Object sender, PropertyChangedEventArgs e) { NotifyPropertyChanged("VM_" + e.PropertyName); }; }
public LineChart_model() { secondsTocalc = 30; fc = FlightController.GetInstance; mc = mediaController.GetInstance; fc.PropertyChanged += UpdateMedia; // Names = fc.Names; //Names = new string[] { "aileron", "elevator", "rudder", "flaps", "slats", "speed_brake", // "engine1_throttle", "engine2_throttle", "engine1_pump", "engine2_pump", "electric1_pump", // "electric2_pump", "external_power", "apu_generator", "latitude_deg", "longitude_deg", "altitude_ft", // "roll_deg", "pitch_deg", "heading_deg", "side_slip_deg", "airspeed_kt", "glideslop", "vertical_speed_fps", // "airspeed_indicator_indicated_speed_kt", "altimeter_indicated-altitude-ft", "altimeter_pressure-alt-ft", // "attitude-indicator_indicated-pitch-deg", "attitude-indicator_indicated-roll-deg", // "attitude-indicator_internal-pitch-deg", "attitude-indicator_internal-roll-deg", "encoder_indicated-altitude-ft", // "encoder_pressure-alt-ft", "gps_indicated-altitude-ft", "gps_indicated-ground-speed-kt", "gps_indicated-vertical-speed", // "indicated-heading-deg", "magnetic-compass_indicated-heading-deg", "slip-skid-ball_indicated-slip-skid", "turn-indicator_indicated-turn-rate", // "vertical-speed-indicator_indicated-speed-fpm", "engine_rpm" }; //need to store this globally or get dynamically from XML // this.NotifyPropertyChanged("names"); datalists = new Dictionary <string, LinkedList <DataPoint> >(); fc.dataUpdated += Update; mc.PropertyChanged += UpdateMedia; //for(int i = 0; i < names.Length; i++) //{ // datalists.Add(names[i], new LinkedList<DataPoint>()); //} timeStamp = 0; dc = null; }
private FlightController() { fg_client = new FGClient(); media = mediaController.GetInstance; }