Пример #1
0
        public void SelectSatellite(Satellite sat)
        {
            if (_selectedSatellites.Any(s => s.ID == sat.ID))
            {
                return;
            }

            _selectedSatellites.Add(sat);
            OnSelectionChanged(EventArgs.Empty);
        }
Пример #2
0
        public void RemoveSatellite(Satellite sat)
        {
            _selectedSatellites.RemoveAll(s => s.ID == sat.ID);
            OnSelectionChanged(EventArgs.Empty);

            if (MainSatellite == null)
            {
                return;
            }

            if (MainSatellite.ID == sat.ID)
            {
                MainSatellite = null;

                if (SelectedSatellites.Count > 0)
                {
                    MainSatellite = SelectedSatellites[0];
                }
            }
        }
Пример #3
0
 public void FocusSatellite(Satellite sat)
 {
     MainSatellite = sat;
     SelectSatellite(sat);
     OnSelectionChanged(EventArgs.Empty);
 }