Esempio n. 1
0
 /// <summary>
 /// ctor
 /// </summary>
 /// <param name="bridge">Actual Bridge.</param>
 public Form_GroupCreator(Bridge bridge)
 {
     InitializeComponent();
     _bridge     = bridge;
     gcv         = new GroupCreatorView(HueObjectHelper.GetBridgeLights(_bridge));
     DataContext = gcv;
 }
Esempio n. 2
0
 /// <summary>
 /// ctor
 /// </summary>
 /// <param name="bridge">active bridge.</param>
 public Form_SceneCreator(Bridge bridge)
 {
     InitializeComponent();
     scv         = new SceneCreatorView(HueObjectHelper.GetBridgeLights(bridge), bridge);
     DataContext = scv;
     _br         = bridge;
 }
Esempio n. 3
0
 public Form_SceneCreator(Bridge bridge, HueObject obj)
 {
     InitializeComponent();
     _id         = ((Scene)obj).Id;
     scv         = new SceneCreatorView(HueObjectHelper.GetBridgeLights(bridge), obj, bridge);
     DataContext = scv;
     _br         = bridge;
 }
Esempio n. 4
0
 public Form_GroupCreator(Bridge bridge, HueObject selectedGroup)
 {
     InitializeComponent();
     _bridge                = bridge;
     gcv                    = new GroupCreatorView(HueObjectHelper.GetBridgeLights(_bridge), (Group)selectedGroup);
     DataContext            = gcv;
     Title                  = string.Format(GUI.GroupCreatorForm_ModifyingGroup_Title, ((Group)selectedGroup).name);
     btnCreateGroup.Content = GUI.GroupCreatorForm_ModifyGroupButton;
     DataContext            = gcv;
 }
Esempio n. 5
0
        /// <summary>
        /// ctor
        /// </summary>
        /// <param name="bridge">Actual Bridge.</param>
        public Form_GroupCreator(Bridge bridge)
        {
            InitializeComponent();
            _bridge = bridge;
            HelperResult hr = HueObjectHelper.GetBridgeLights(_bridge);

            if (hr.Success)
            {
                gcv         = new GroupCreatorView((List <HueObject>)hr.Hrobject);
                DataContext = gcv;
            }
        }
Esempio n. 6
0
        public Form_GroupCreator(Bridge bridge, HueObject selectedGroup)
        {
            InitializeComponent();
            _bridge = bridge;
            HelperResult hr = HueObjectHelper.GetBridgeLights(_bridge);

            if (hr.Success)
            {
                gcv   = new GroupCreatorView((List <HueObject>)hr.Hrobject, (Group)selectedGroup);
                Title = string.Format(GUI.GroupCreatorForm_ModifyingGroup_Title, ((Group)selectedGroup).name);
                btnCreateGroup.Content = GUI.GroupCreatorForm_ModifyGroupButton;
                DataContext            = gcv;
            }
            else
            {
                MessageBoxError.ShowLastErrorMessages(_bridge);
                this.Close();
            }
        }
Esempio n. 7
0
        private void FetchHueObject()
        {
            if (_objectypeindex == -1)
            {
                ListHueObject = null;
                return;
            }

            HelperResult hr;

            switch (_objectypeindex)
            {
            case 0:
                hr = HueObjectHelper.GetBridgeLights(BridgeStore.SelectedBridge);
                break;

            case 1:
                hr = HueObjectHelper.GetBridgeGroups(BridgeStore.SelectedBridge);
                break;

            case 2:
                hr = HueObjectHelper.GetBridgeScenes(BridgeStore.SelectedBridge);
                break;

            default:
                hr = new HelperResult()
                {
                    Success = false
                };
                break;
            }

            if (hr.Success)
            {
                ListHueObject = (List <HueObject>)hr.Hrobject;
            }
        }
Esempio n. 8
0
        private void FetchHueObject()
        {
            switch (_objectypeindex)
            {
            case -1:
                ListHueObject = null;
                break;

            case 0:
                ListHueObject = HueObjectHelper.GetBridgeLights(_bridge);
                break;

            case 1:
                ListHueObject = HueObjectHelper.GetBridgeGroups(_bridge);
                break;

            case 2:
                ListHueObject = HueObjectHelper.GetBridgeScenes(_bridge);
                break;

            default:
                break;
            }
        }