Exemple #1
0
        public RadioStationView()
        {
            tabView = new NSTabView();

            tabView.Add(new NSTabViewItem((NSString)"Recent")
            {
                Label   = "Recent",
                ToolTip = "Recent radio stations",
                View    = (recent = new RadioStationListView {
                    IsIncluded = false,
                }),
            });
            tabView.Add(new NSTabViewItem((NSString)"My Stations")
            {
                Label   = "My Stations",
                ToolTip = "My Radio Stations",
                View    = (stations = new RadioStationListView {
                    IsIncluded = true,
                }),
            });
            tabView.DidSelect += async(object sender, NSTabViewItemEventArgs e) => {
                await Task.Delay(1);

                recent.CollectionView.ReloadData();
                stations.CollectionView.ReloadData();
            };
            AddSubview(tabView);
        }
        public RadioStationView()
        {
            iflButton = new SimpleButton
            {
                Clicked = async(obj) =>
                {
                    await PlaybackManager.Shared.Play(new RadioStation("I'm Feeling Lucky")
                    {
                        Id = "IFL",
                    });
                },
                Title = "I'm Feeling Luck",
            };
            AddSubview(iflButton);
            tabView = new NSTabView();

            tabView.Add(new NSTabViewItem((NSString)"Recent")
            {
                Label   = "Recent",
                ToolTip = "Recent radio stations",
                View    = (recent = new RadioStationListView {
                    IsIncluded = false,
                }),
            });
            tabView.Add(new NSTabViewItem((NSString)"My Stations")
            {
                Label   = "My Stations",
                ToolTip = "My Radio Stations",
                View    = (stations = new RadioStationListView {
                    IsIncluded = true,
                }),
            });
            tabView.DidSelect += async(object sender, NSTabViewItemEventArgs e) => {
                await Task.Delay(1);

                recent.CollectionView.ReloadData();
                stations.CollectionView.ReloadData();
            };
            AddSubview(tabView);
        }