示例#1
0
        override public void LoadFrom(Subsystem rcs)
        {
            _rcs = (RCS)rcs;

            Thrusters = new ObservableCollection <RCSThrusterViewModel>();
            foreach (RCSThruster thruster in _rcs.thrusters)
            {
                Thrusters.Add(new RCSThrusterViewModel(thruster));
            }
        }
示例#2
0
        public RCSViewModel(RCS rcs)
        {
            AddRCSThrusterCommand    = new DelegateCommand(AddThruster);
            RemoveRCSThrusterCommand = new DelegateCommand <RCSThrusterViewModel>(RemoveThruster);

            if (rcs != null)
            {
                LoadFrom(rcs);
            }
        }
示例#3
0
 public bool IsViewModelOf(RCS rcs)
 {
     return(rcs == _rcs);
 }