예제 #1
0
        public void UnselectModel(SelectableModel model)
        {
            if (!model.Selected)
            {
                return;
            }

            model.Selected = false;
            model.Refresh();
            SelectionChanged?.Invoke(model);
        }
예제 #2
0
        public void UnselectModel(SelectableModel model)
        {
            if (!_selectedModels.Contains(model))
            {
                return;
            }

            model.Selected = false;
            _selectedModels.Remove(model);
            model.Refresh();
            SelectionChanged?.Invoke(model, false);
        }
예제 #3
0
        public void SelectModel(SelectableModel model, bool unselectOthers)
        {
            if (model.Selected)
            {
                return;
            }

            if (unselectOthers)
            {
                UnselectAll();
            }

            model.Selected = true;
            model.Refresh();
            SelectionChanged?.Invoke(model);
        }
예제 #4
0
        public void SelectModel(SelectableModel model, bool unselectOthers)
        {
            if (_selectedModels.Contains(model))
            {
                return;
            }

            if (unselectOthers)
            {
                UnselectAll();
            }

            model.Selected = true;
            _selectedModels.Add(model);
            model.Refresh();
            SelectionChanged?.Invoke(model, true);
        }