public ScenesPage(Group group) { this.BindingContext = HueHelper.GetScenes(group.id); //var menuListView = new CircleListView() //{ // ItemsSource = //}; //this.Content = menuListView; //menuListView.ItemTapped += OnItemTapped; }
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"); } }
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]; }
private void AllButton_Clicked(object sender, EventArgs e) { HueHelper.KillAll(); }