示例#1
0
        public ScenesPage(Group group)
        {
            this.BindingContext = HueHelper.GetScenes(group.id);

            //var menuListView = new CircleListView()
            //{
            //    ItemsSource =
            //};

            //this.Content = menuListView;
            //menuListView.ItemTapped += OnItemTapped;
        }
示例#2
0
        async void OnToggled(object sender, ToggledEventArgs e)
        {
            try
            {
                var selectedGroup = (Switch)sender;
                var group         = (Group)selectedGroup.BindingContext;

                HueHelper.SetGroupAction(group.id, e.Value);
            }
            catch (Exception ex)
            {
                await DisplayAlert("Error", $"Toggle failed. {ex.Message}", "OK");
            }
        }
示例#3
0
        public MainPage()
        {
            InitializeComponent();

            List <Group> groups = null;

            try
            {
                groups = HueHelper.GetGroups();
            }
            catch (Exception ex)
            {
                Alert("Error", $"Failed to load groups. {ex.Message}", "OK");
            }

            CreateAllPage();
            CreateGroupsPages(groups);
            SelectedItem = Children[1];
        }
示例#4
0
 private void AllButton_Clicked(object sender, EventArgs e)
 {
     HueHelper.KillAll();
 }