public DeviceUserControl(Device device, MainWindow parent) { InitializeComponent(); _device = device; SetOrchestrator(); _parent = parent; DeviceNameLabel.Content = _device.Name; //Set the correct icon switch (_orchestrator.PanelLayout.DeviceType) { case DeviceType.Canvas: SquareIcon.Visibility = Visibility.Visible; break; case DeviceType.Aurora: TriangleIcon.Visibility = Visibility.Visible; break; default: throw new NotImplementedException($"No icon implemented for device type {_orchestrator.PanelLayout.DeviceType}"); } //Initialize the effect combox box EffectComboBox.InitializeEffects(_orchestrator); EffectComboBox.ParentUserControl = this; DataContext = this; Update(); }
public void ReloadEffects() { //Reset the orchestrator since it can happen that the orchestrators have been reset before calling this function SetOrchestrator(); EffectComboBox.InitializeEffects(_orchestrator); EffectComboBox.UpdateSelection(_selectedEffect); }
public void ReloadEffects() { //Reset the orchestrator since it can happen that the orchestrators have been reset before calling this function RegisterWithOrchestrator(); var orchestrator = OrchestratorCollection.GetOrchestratorForDevice(_device); EffectComboBox.InitializeEffects(orchestrator); EffectComboBox.UpdateSelection(_selectedEffect); }
public AddProcessEventWindow(EventUserControl parent) { _parent = parent; DataContext = this; InitializeComponent(); EffectComboBox.InitializeEffects(); EffectComboBox.ParentUserControl = this; }
public AddSpotifyEventWindow(EventUserControl parent, Dictionary <string, string> playlists) { _parent = parent; Playlists = playlists.Select(playlist => new SpotifyPlaylistViewModel { PlaylistId = playlist.Key, PlaylistName = playlist.Value }).ToList(); DataContext = this; InitializeComponent(); EffectComboBox.InitializeEffects(); EffectComboBox.ParentUserControl = this; }
public AddTimeTriggerWindow(DayUserControl parent) { _parent = parent; _triggerTypeMapping = new Dictionary <string, TriggerType>() { { EnumLocalizer.GetLocalizedEnum(TriggerType.Time), TriggerType.Time }, { EnumLocalizer.GetLocalizedEnum(TriggerType.Sunrise), TriggerType.Sunrise }, { EnumLocalizer.GetLocalizedEnum(TriggerType.Sunset), TriggerType.Sunset } }; DataContext = this; InitializeComponent(); SelectedTriggerType = EnumLocalizer.GetLocalizedEnum(TriggerType.Time); EffectComboBox.InitializeEffects(); EffectComboBox.ParentUserControl = this; }