public ViewWidgetSelectorRoomNavigation(HelperKinsky aHelper, UINavigationController aNavigationController, UIScrollView aScrollView, ViewWidgetSelectorSource aViewWidgetSelectorSource, UIBarButtonItem aButtonRefresh, UIButton aButtonStandby, UIButton aButtonStandbyAll) { iHelper = aHelper; iRooms = new List <Linn.Kinsky.Room>(); iNavigationController = aNavigationController; iNavigationController.Delegate = new Delegate(this, aViewWidgetSelectorSource); iScrollView = aScrollView; iViewWidgetSelectorSource = aViewWidgetSelectorSource; iButtonRefresh = aButtonRefresh; iNavigationController.ViewControllers[0].NavigationItem.RightBarButtonItem = iButtonRefresh; iButtonStandbyAll = aButtonStandbyAll; UIBarButtonItem barButton = new UIBarButtonItem(iButtonStandbyAll); iNavigationController.ViewControllers[0].NavigationItem.LeftBarButtonItem = barButton; UpdateStandbyAllButtonState(); iButtonStandby = aButtonStandby; UIBarButtonItem barButton2 = new UIBarButtonItem(iButtonStandby); iViewWidgetSelectorSource.NavigationItem.RightBarButtonItem = barButton2; iViewWidgetSelectorSource.EventSelectionChanged += SelectionChanged; iButtonRefresh.Clicked += RefreshClicked; iButtonStandby.TouchUpInside += StandbyClicked; iButtonStandbyAll.TouchUpInside += StandbyAllClicked; }
public Delegate(IControllerRoomSelector aControllerRoomSelector, ViewWidgetSelectorSource aViewWidgetSelectorSource) { iControllerRoomSelector = aControllerRoomSelector; iViewWidgetSelectorSource = aViewWidgetSelectorSource; }
private void AddViews() { ViewWidgetSelectorRoom viewWidgetSelectorRoom = new ViewWidgetSelectorRoom(); ViewWidgetSelectorPopover <Linn.Kinsky.Room> popOverRoom = new ViewWidgetSelectorPopover <Room>(helper.Helper, viewWidgetSelectorRoom, viewWidgetSelectorRoom, navigationItemSource.LeftBarButtonItem, navigationItemSource.RightBarButtonItem); iViewMaster.ViewWidgetSelectorRoom.Add(viewWidgetSelectorRoom); iViewMaster.ViewWidgetSelectorRoom.Add(popOverRoom); ViewWidgetSelectorSource viewWidgetSelectorSource = new ViewWidgetSelectorSource(); ViewWidgetSelectorPopover <Linn.Kinsky.Source> popOverSource = new ViewWidgetSelectorPopover <Source>(helper.Helper, viewWidgetSelectorSource, viewWidgetSelectorSource, navigationItemSource.RightBarButtonItem, navigationItemSource.LeftBarButtonItem); iViewMaster.ViewWidgetSelectorSource.Add(viewWidgetSelectorSource); iViewMaster.ViewWidgetSelectorSource.Add(popOverSource); viewInfo.Alignment = UITextAlignment.Left; viewInfo.TopAlign = true; viewOverlayInfo.Alignment = UITextAlignment.Center; viewOverlayInfo.TopAlign = false; ViewWidgetTrackArtworkRetriever artworkRetriever = new ViewWidgetTrackArtworkRetriever(); ViewWidgetTrackArtwork artwork = new ViewWidgetTrackArtwork(imageViewArtwork); artworkRetriever.AddReceiver(artwork); iViewMaster.ViewWidgetTrack.Add(artworkRetriever); iViewMaster.ViewWidgetTrack.Add(artwork); iViewMaster.ViewWidgetTrack.Add(new ViewWidgetTrackMetadata(viewInfo, helper.OptionExtendedTrackInfo)); iViewMaster.ViewWidgetTrack.Add(new ViewWidgetTrackMetadata(viewOverlayInfo, helper.OptionExtendedTrackInfo)); ViewWidgetTransportControl transportControl = new ViewWidgetTransportControl(buttonLeft, buttonCentre, buttonRight); iViewMaster.ViewWidgetTransportControlDiscPlayer.Add(transportControl); iViewMaster.ViewWidgetTransportControlMediaRenderer.Add(transportControl); iViewMaster.ViewWidgetTransportControlRadio.Add(transportControl); iViewMaster.ViewWidgetVolumeControl.Add(iViewWidgetVolumeControl); iViewMaster.ViewWidgetVolumeControl.Add(iViewWidgetVolumeButtons); iViewMaster.ViewWidgetVolumeControl.Add(iViewWidgetVolumeRotary); iViewMaster.ViewWidgetMediaTime.Add(iViewWidgetTime); iViewMaster.ViewWidgetMediaTime.Add(iViewWidgetTimeButtons); iViewMaster.ViewWidgetMediaTime.Add(iViewWidgetTimeRotary); iViewMaster.ViewWidgetPlayMode.Add(new ViewWidgetPlayMode(sourceToolbar, buttonShuffle, buttonRepeat)); sourceToolbar.Initialise(buttonShuffle, buttonRepeat); iViewMaster.ViewWidgetPlaylist.Add(new ViewWidgetPlaylistMediaRenderer(tableViewSource, sourceToolbar, buttonViewInfo, iViewSaveSupport, helper.OptionGroupTracks)); iViewMaster.ViewWidgetPlaylistRadio.Add(new ViewWidgetPlaylistRadio(tableViewSource, buttonViewInfo, iViewSaveSupport)); ViewWidgetPlaylistReceiver playlistReceiver = new ViewWidgetPlaylistReceiver(tableViewSource, buttonViewInfo, imageViewPlaylistAux, iViewSaveSupport); iViewMaster.ViewWidgetPlaylistReceiver.Add(playlistReceiver); iViewMaster.ViewWidgetSelectorRoom.Add(playlistReceiver); iViewMaster.ViewWidgetPlaylistDiscPlayer.Add(new ViewWidgetPlaylistDiscPlayer(imageViewPlaylistAux)); iViewMaster.ViewWidgetPlaylistAux.Add(new ViewWidgetPlaylistAux(imageViewPlaylistAux)); ViewWidgetBrowserRoot viewBrowser = navigationController.TopViewController as ViewWidgetBrowserRoot; viewBrowser.Initialise(new Location(iLocator.Root), iPlaySupport, iConfigController, helper.OptionInsertMode, helper.Helper.LastLocation); iViewMaster.ViewWidgetButtonWasteBin.Add(new ViewWidgetButtonWasteBin(sourceToolbar.BarButtonItemDelete)); iViewMaster.ViewWidgetButtonSave.Add(new ViewWidgetButtonSave(sourceToolbar.BarButtonItemSave)); }