public void SelectLed(LedViewModel ledViewModel)
        {
            if (SelectedLed != null)
            {
                SelectedLed.Selected = false;
                SelectedLed.SetColor(LedViewModel.UnselectedColor);
            }

            if (ledViewModel != null)
            {
                SelectedLed          = ledViewModel;
                SelectedLed.Selected = true;
                SelectedLed.SetColor(LedViewModel.SelectedColor);
            }
        }
        public void FinishAddLed(bool addBefore, string ledId)
        {
            int index;

            if (SelectedLed == null)
            {
                if (addBefore)
                {
                    index = 0;
                }
                else
                {
                    index = LedViewModels.Count;
                }
            }
            else
            {
                if (addBefore)
                {
                    index = LedViewModels.IndexOf(SelectedLed);
                }
                else
                {
                    index = LedViewModels.IndexOf(SelectedLed) + 1;
                }
            }

            var ledLayout = new LedLayout {
                Id = ledId
            };
            var ledViewModel = new LedViewModel(Model, this, _windowManager, ledLayout);

            DeviceLayout.Leds.Insert(index, ledLayout);
            LedViewModels.Insert(index, ledViewModel);

            UpdateLeds();
            SelectLed(ledViewModel);
        }