Exemple #1
0
 public PodcastLibraryPage(bool showDevice)
     : base(showDevice, MediaType.Podcast)
 {
     this.UIPath = "Collection\\Podcasts";
     if (showDevice)
     {
         this.PivotPreference = Shell.MainFrame.Device.Podcasts;
         Deviceland.InitDevicePage(this);
     }
     else
     {
         this.PivotPreference = Shell.MainFrame.Collection.Podcasts;
     }
     this.IsRootPage   = true;
     this.SeriesPanel  = new SubscriptionSeriesPanel(this);
     this.EpisodePanel = new SubscriptionEpisodePanel(this);
     if (!showDevice)
     {
         this.DetailsPanel = new SubscriptionDetailsPanel(this);
     }
     this.m_markAllAsPlayed     = new MenuItemCommand(Shell.LoadString(StringId.IDS_PODCAST_MARK_AS_PLAYED_MENUITEM));
     this.m_markAllAsUnplayed   = new MenuItemCommand(Shell.LoadString(StringId.IDS_PODCAST_MARK_AS_UNPLAYED_MENUITEM));
     this.TransportControlStyle = TransportControlStyle.Music;
     this.PlaybackContext       = PlaybackContext.LibraryPodcast;
     this.ShowPlaylistIcon      = false;
 }
 public PhotoLibraryPage(bool showDevice)
     : base(showDevice, MediaType.Photo)
 {
     this.UI     = LibraryTemplate;
     this.UIPath = "Collection\\Photos";
     if (showDevice)
     {
         this.PivotPreference = Shell.MainFrame.Device.Photos;
         Deviceland.InitDevicePage(this);
     }
     else
     {
         this.PivotPreference = Shell.MainFrame.Collection.Photos;
     }
     this.IsRootPage                   = true;
     this._photosPanel                 = new PhotosPanel(this);
     this._photoFolderPanel            = new PhotoFolderPanel(this);
     this.ShowPlaylistIcon             = false;
     this.TransportControlStyle        = TransportControlStyle.Photo;
     this._slideShowState              = new SlideShowState(this);
     this._expandedFolderIds           = new Dictionary <int, bool>();
     this._refreshFolderIds            = new Dictionary <int, bool>();
     this._refreshPictures             = new Command();
     this._pendingFolderToExpandToRoot = -1;
     this._pendingFolderDeleteId       = -1;
     this._pendingFolderId             = -1;
 }
 public VideoLibraryPage(bool showDevice, VideoLibraryView desiredView)
     : base(showDevice, MediaType.Video)
 {
     this.UI     = LibraryTemplate;
     this.UIPath = "Collection\\Videos\\Default";
     if (showDevice)
     {
         this.PivotPreference = Shell.MainFrame.Device.Videos;
         Deviceland.InitDevicePage(this);
     }
     else
     {
         this.PivotPreference = Shell.MainFrame.Collection.Videos;
     }
     this.IsRootPage = true;
     if (!this.ShowDeviceContents)
     {
         this.Views         = new NotifyChoice(this);
         this.Views.Options = (new ViewCommand[6]
         {
             new ViewCommand(Views, Shell.LoadString(StringId.IDS_COLLECTION_VIDEO_ALL_PIVOT), VideoLibraryView.All),
             new ViewCommand(Views, Shell.LoadString(StringId.IDS_COLLECTION_VIDEO_TV_PIVOT), VideoLibraryView.TV),
             new ViewCommand(Views, Shell.LoadString(StringId.IDS_COLLECTION_VIDEO_MUSIC_PIVOT), VideoLibraryView.Music),
             new ViewCommand(Views, Shell.LoadString(StringId.IDS_COLLECTION_VIDEO_MOVIES_PIVOT), VideoLibraryView.Movies),
             new ViewCommand(Views, Shell.LoadString(StringId.IDS_COLLECTION_VIDEO_OTHER_PIVOT), VideoLibraryView.Other),
             new ViewCommand(Views, Shell.LoadString(StringId.IDS_COLLECTION_VIDEO_PERSONAL_PIVOT), VideoLibraryView.Personal)
         });
         int num = -1;
         if (desiredView != VideoLibraryView.Invalid)
         {
             for (int index = 0; index < this.Views.Options.Count; ++index)
             {
                 if (desiredView == ((ViewCommand)this.Views.Options[index]).View)
                 {
                     num = index;
                     break;
                 }
             }
         }
         if (num == -1)
         {
             num = ClientConfiguration.Shell.VideoCollectionView;
         }
         this.Views.ChosenChanged += new EventHandler(this.ViewChanged);
         if (num >= 0 && num < this.Views.Options.Count)
         {
             this.Views.ChosenIndex = num;
         }
     }
     this._videosPanel          = new VideosPanel(this);
     this.ShowPlaylistIcon      = false;
     this.TransportControlStyle = TransportControlStyle.Video;
     this.PlaybackContext       = PlaybackContext.LibraryVideo;
 }
Exemple #4
0
 public DeviceOverfillLand(UIDevice device)
 {
     this._device = device;
     this._list   = this.Device.GenerateSyncGroupList(this, true);
     Deviceland.InitDevicePage(this);
     this.ShowBackArrow    = false;
     this.ShowComputerIcon = ComputerIconState.Hide;
     this.ShowNowPlayingX  = false;
     this.ShowPivots       = false;
     this.ShowSearch       = false;
     this.ShowSettings     = false;
     this.UI          = "res://ZuneShellResources!DeviceSyncGroups.uix#SyncGroupsPage";
     this.BottomBarUI = "res://ZuneShellResources!DeviceSyncGroups.uix#GasGauge";
 }
 public ApplicationLibraryPage(bool showDevice)
     : base(showDevice, MediaType.Application)
 {
     this.UI = LibraryTemplate;
     if (showDevice)
     {
         this.UIPath          = "Device\\Applications";
         this.PivotPreference = Shell.MainFrame.Device.Applications;
         Deviceland.InitDevicePage(this);
     }
     else
     {
         this.UIPath          = "Collection\\Applications";
         this.PivotPreference = Shell.MainFrame.Collection.Applications;
     }
     this.IsRootPage            = true;
     this.ShowPlaylistIcon      = false;
     this.ShowCDIcon            = false;
     this.TransportControlStyle = TransportControlStyle.None;
     this._applicationsPanel    = new ApplicationsPanel(this);
 }
 public ChannelLibraryPage(bool showDevice)
     : base(showDevice, MediaType.Playlist)
 {
     if (showDevice)
     {
         this.PivotPreference = Shell.MainFrame.Device.Channels;
         Deviceland.InitDevicePage(this);
         this.ShowComputerIcon = ComputerIconState.Show;
     }
     else
     {
         this.DetailsPanel    = new ChannelDetailsPanel(this);
         this.PivotPreference = Shell.MainFrame.Collection.Channels;
     }
     this.IsRootPage            = true;
     this.UIPath                = "Collection\\Channels";
     this.SeriesPanel           = new ChannelSeriesPanel(this);
     this.EpisodePanel          = new ChannelEpisodePanel(this);
     this.TransportControlStyle = TransportControlStyle.Music;
     this.PlaybackContext       = PlaybackContext.Music;
 }
        public MusicLibraryPage(bool showDevice, MusicLibraryView desiredView)
            : base(showDevice, MediaType.Track)
        {
            this.UI     = LibraryTemplate;
            this.UIPath = "Collection\\Music";
            this._updatePreferredView = true;
            if (showDevice)
            {
                this.PivotPreference = Shell.MainFrame.Device.Music;
                Deviceland.InitDevicePage(this);
            }
            else
            {
                this.PivotPreference = Shell.MainFrame.Collection.Music;
            }
            this.IsRootPage = true;
            this.Views      = new NotifyChoice(this);
            if (!this.ShowDeviceContents)
            {
                this.Views.Options = (new ViewCommand[5]
                {
                    new ViewCommand(Views, Shell.LoadString(StringId.IDS_COLLECTION_BROWSE), new EventHandler(this.ShowArtistPivot), MusicLibraryView.Artist),
                    new ViewCommand(Views, Shell.LoadString(StringId.IDS_COLLECTION_GENRE), new EventHandler(this.ShowGenrePivot), MusicLibraryView.Genre),
                    new ViewCommand(Views, Shell.LoadString(StringId.IDS_COLLECTION_ALBUM), new EventHandler(this.ShowAlbumPivot), MusicLibraryView.Album),
                    new ViewCommand(Views, Shell.LoadString(StringId.IDS_COLLECTION_LIST), new EventHandler(this.ShowSongPivot), MusicLibraryView.Song),
                    new ViewCommand(Views, Shell.LoadString(StringId.IDS_PLAYLISTS_PIVOT), new EventHandler(this.ShowPlaylistPivot), MusicLibraryView.Playlist)
                });
            }
            else
            {
                this.Views.Options = (new ViewCommand[2]
                {
                    new ViewCommand(Views, Shell.LoadString(StringId.IDS_COLLECTION_BROWSE), new EventHandler(this.ShowArtistPivot), MusicLibraryView.Artist),
                    new ViewCommand(Views, Shell.LoadString(StringId.IDS_PLAYLISTS_PIVOT), new EventHandler(this.ShowPlaylistPivot), MusicLibraryView.Playlist)
                });
            }
            int num = -1;

            if (desiredView != MusicLibraryView.Invalid)
            {
                for (int index = 0; index < this.Views.Options.Count; ++index)
                {
                    if (desiredView == ((ViewCommand)this.Views.Options[index]).View)
                    {
                        num = index;
                        break;
                    }
                }
            }
            if (num == -1)
            {
                num = !this.ShowDeviceContents ? ClientConfiguration.Shell.MusicCollectionView : ClientConfiguration.Shell.MusicDeviceView;
            }
            this.Views.ChosenChanged += new EventHandler(this.ViewChanged);
            if (num >= 0 && num < this.Views.Options.Count)
            {
                this.Views.ChosenIndex = num;
            }
            this.ContentTypes                    = new NotifyChoice(this);
            this.ContentTypes.Options            = new ArrayListDataSet(ContentTypes);
            this.ShowContentTypes.Value          = ClientConfiguration.Shell.ShowContentTypes;
            this.ShowContentTypes.ChosenChanged += new EventHandler(this.ShowContentTypesChanged);
            this.TransportControlStyle           = TransportControlStyle.Music;
            this.PlaybackContext                 = PlaybackContext.Music;
            this._createPlaylistCommand          = new Command(this, Shell.LoadString(StringId.IDS_PLAYLIST_DIALOG_CREATEPLAYLIST), null);
            this._createAutoPlaylistCommand      = new Command(this, Shell.LoadString(StringId.IDS_CREATEAUTOPLAYLIST_BUTTON), null);
            this._albumsChanged                  = new Command(this);
            this._albumEdited                    = new Command(this);
            this._leftItemClicked                = new Command(this);
            this._albumClicked                   = new Command(this);
        }