Exemple #1
0
        public TimeTriggerUserControl(DayUserControl parent, TimeTrigger trigger)
        {
            _trigger = trigger;
            _parent  = parent;

            InitializeComponent();

            Description = $"{EnumLocalizer.GetLocalizedEnum(trigger.GetTriggerType())}: {trigger.GetDescription()}";
            EffectName  = trigger.Effect;
            Brightness  = trigger.Brightness.ToString();

            DataContext = this;
        }
        public AddTimeTriggerWindow(DayUserControl parent)
        {
            _parent = parent;
            Effects = new List <Effect>(UserSettings.Settings.ActiveDevice.Effects);
            Effects.InsertRange(0, OrchestratorCollection.GetOrchestratorForDevice(UserSettings.Settings.ActiveDevice).GetCustomEffectAsEffects());

            _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);
        }
Exemple #3
0
        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;
        }