override public void LoadFrom(Subsystem rcs) { _rcs = (RCS)rcs; Thrusters = new ObservableCollection <RCSThrusterViewModel>(); foreach (RCSThruster thruster in _rcs.thrusters) { Thrusters.Add(new RCSThrusterViewModel(thruster)); } }
public RCSViewModel(RCS rcs) { AddRCSThrusterCommand = new DelegateCommand(AddThruster); RemoveRCSThrusterCommand = new DelegateCommand <RCSThrusterViewModel>(RemoveThruster); if (rcs != null) { LoadFrom(rcs); } }
public bool IsViewModelOf(RCS rcs) { return(rcs == _rcs); }