internal override string GetResourceUri() { string property1 = (string)this.Query.GetProperty("Prefix"); if (!Search.Instance.IsValidKeyword(property1)) { return(null); } string endPointUri = Microsoft.Zune.Service.Service.GetEndPointUri(this._endPoint); StringBuilder stringBuilder = new StringBuilder(128); stringBuilder.Append(endPointUri); stringBuilder.Append("/?prefix="); stringBuilder.Append(Uri.EscapeDataString(property1)); if ((bool)this.Query.GetProperty("OnlyIncludeZuneRadioArtists")) { if (FeatureEnablement.IsFeatureEnabled(Features.eMusic)) { stringBuilder.Append("&includeZuneRadioArtists=true"); } } else { if (FeatureEnablement.IsFeatureEnabled(Features.eMusic)) { stringBuilder.Append("&includeTracks=true"); stringBuilder.Append("&includeAlbums=true"); stringBuilder.Append("&includeArtists=true"); } if (FeatureEnablement.IsFeatureEnabled(Features.eVideos)) { stringBuilder.Append("&includeMovies=true"); stringBuilder.Append("&includeVideoShorts=true"); } if (FeatureEnablement.IsFeatureEnabled(Features.eTV)) { stringBuilder.Append("&includeTVSeries=true"); } if (FeatureEnablement.IsFeatureEnabled(Features.eMusicVideos)) { stringBuilder.Append("&includeMusicVideos=true"); } if (FeatureEnablement.IsFeatureEnabled(Features.ePodcasts)) { stringBuilder.Append("&includePodcasts=true"); } if (FeatureEnablement.IsFeatureEnabled(Features.eApps)) { stringBuilder.Append("&includeApplications=true"); } } string property2 = (string)this.Query.GetProperty("ClientType"); if (!string.IsNullOrEmpty(property2)) { stringBuilder.Append("&clientType="); stringBuilder.Append(property2); } return(stringBuilder.ToString()); }
private static string GetViewUri(string id, string type) { string endPointUri = Microsoft.Zune.Service.Service.GetEndPointUri(Microsoft.Zune.Service.EServiceEndpointId.SEID_Lynx); string str = FeatureEnablement.IsFeatureEnabled(Features.eSocial) ? "View" : "ViewUnsupportedMarket"; return("Web\\" + UrlHelper.MakeUrlEx(endPointUri + "/redirect", nameof(type), type, nameof(id), id, "target", "web", "action", str)); }
protected override void OnEndActivationRequests(object args) { if (args == null) { this.NavigateToErrorHandler(); } else { this.InitializeSettings(); AccountUser accountUser = (AccountUser)args; this.CommittedSettings = accountUser.AccountSettings; if (this.ShowSettings != PrivacyInfoSettings.None) { return; } if (accountUser.AccountUserType == AccountUserType.Adult) { this.ShowSettings = PrivacyInfoSettings.SocialSettings; } else if (accountUser.AccountUserType == AccountUserType.ChildWithSocial) { this.ShowSettings = FeatureEnablement.IsFeatureEnabled(Features.eSocial) ? PrivacyInfoSettings.CreateChildAccountWithSocial : PrivacyInfoSettings.CreateChildAccount; } else { this.ShowSettings = PrivacyInfoSettings.CreateChildAccount; } } }
internal Right GetOfferRight( MediaRightsEnum right, VideoDefinitionEnum definition, PriceTypeEnum priceType) { if (FeatureEnablement.IsFeatureEnabled(Features.eMarketplace) && this.IsAssociatedFeatureEnabled(right)) { if (definition == VideoDefinitionEnum.None) { Right right1 = (this.GetOfferRight(right, VideoDefinitionEnum.HD, priceType) ?? this.GetOfferRight(right, VideoDefinitionEnum.SD, priceType)) ?? this.GetOfferRight(right, VideoDefinitionEnum.XD, priceType); if (right1 != null) { return(right1); } } if (this.Rights != null) { foreach (Right right1 in Rights) { if (right == right1.RightEnum && priceType == right1.PriceTypeEnum && (definition == right1.VideoDefinitionEnum || definition == VideoDefinitionEnum.None) && (right1.VideoResolutionEnum != VideoResolutionEnum.VR_1080P || right1.RightEnum != MediaRightsEnum.Purchase)) { return(right1); } } } } return(null); }
private void UpdateDeviceDependentPivots() { UIDevice currentDevice = SyncControls.Instance.CurrentDevice; if (this.NodesList.Contains(Applications)) { this.NodesList.Remove(Applications); } if (this.NodesList.Contains(Friends)) { this.NodesList.Remove(Friends); } if (this.NodesList.Contains(Channels)) { this.NodesList.Remove(Channels); } if (FeatureEnablement.IsFeatureEnabled(Features.eSocial) && currentDevice.SupportsUserCards) { this.NodesList.Add(Friends); } if (FeatureEnablement.IsFeatureEnabled(Features.eChannels) && currentDevice.SupportsChannels) { this.NodesList.Add(Channels); } if (!FeatureEnablement.IsFeatureEnabled(Features.eGames) || !currentDevice.SupportsSyncApplications) { return; } this.NodesList.Add(Applications); }
internal override void Activate() { if (!this._activated) { this._activated = true; ZuneShell.DefaultInstance.Management.MediaInfoChoice.Value = FeatureEnablement.IsFeatureEnabled(Features.eOptIn); } base.Activate(); }
public override void UpdateState() { base.UpdateState(); if (this.TrackModel == null || this.CanFindInCollection || this.CanFindInHiddenCollection) { return; } if (!this.Downloading) { if (this.TrackModel.CanPurchaseFree) { this.Description = Shell.LoadString(StringId.IDS_FREE); this.Available = true; } else if (this.TrackModel.CanDownload) { this.Description = Shell.LoadString(StringId.IDS_DOWNLOAD); this.Available = !this.DownloadingHidden; } else if (this.TrackModel.CanPurchaseSubscriptionFree) { this.Description = Shell.LoadString(StringId.IDS_PURCHASE_BUTTON); this.Available = true; } else if (this.TrackModel.CanPurchaseAlbumOnly) { this.Description = Shell.LoadString(StringId.IDS_ALBUM_ONLY); this.Available = false; } else if (this.TrackModel.CanPurchase) { this.Description = string.Format(Shell.LoadString(StringId.IDS_BUY), TrackModel.PointsPrice); this.Available = true; this.HasPoints = this.TrackModel.HasPoints; } else if (this.TrackModel.CanSubscriptionPlay) { this.Description = Shell.LoadString(StringId.IDS_PLAY_SONG); this.Available = true; } else if (this.TrackModel.CanPreview) { this.Description = Shell.LoadString(StringId.IDS_PREVIEW_SONG); this.Available = true; } else if (this.CanFindInZuneDotNet && !FeatureEnablement.IsFeatureEnabled(Features.eMusic)) { this.Description = Shell.LoadString(StringId.IDS_MORE_INFO); this.Available = true; } } if (this.TrackModel.CanPurchase || !(Download.Instance.GetErrorCode(this.Id) == HRESULT._NS_E_MEDIA_NOT_PURCHASED)) { return; } Download.Instance.SetErrorCode(this.Id, HRESULT._S_OK.Int); }
private bool IsAssociatedFeatureEnabled(MediaRightsEnum right) { bool flag = true; if (right == MediaRightsEnum.RentStream && !FeatureEnablement.IsFeatureEnabled(Features.eMBRRental) || right == MediaRightsEnum.PreviewStream && !FeatureEnablement.IsFeatureEnabled(Features.eMBRPreview) || right == MediaRightsEnum.PurchaseStream && !FeatureEnablement.IsFeatureEnabled(Features.eMBRPurchase)) { flag = false; } return(flag); }
internal bool HasRights(MediaRightsEnum right, ClientTypeEnum clientType) { if (FeatureEnablement.IsFeatureEnabled(Features.eMarketplace) && this.Rights != null) { foreach (Right right1 in Rights) { if (right == right1.RightEnum && clientType == right1.ClientTypeEnum) { return(true); } } } return(false); }
internal bool HasAnyRights() { if (FeatureEnablement.IsFeatureEnabled(Features.eMarketplace) && this.Rights != null) { foreach (Right right in Rights) { if (this.IsAssociatedFeatureEnabled(right.RightEnum)) { return(true); } } } return(false); }
internal Right GetOfferRight(ClientTypeEnum clientType, PriceTypeEnum priceType) { if (FeatureEnablement.IsFeatureEnabled(Features.eMarketplace) && this.Rights != null) { foreach (Right right in Rights) { if (clientType == right.ClientTypeEnum && priceType == right.PriceTypeEnum && Guid.Empty != right.OfferId) { return(right); } } } return(null); }
internal bool HasRights(MediaRightsEnum right, AudioEncodingEnum encoding) { if (FeatureEnablement.IsFeatureEnabled(Features.eMusic) && this.Rights != null) { foreach (Right right1 in Rights) { if (right == right1.RightEnum && encoding == right1.AudioEncodingEnum) { return(true); } } } return(false); }
internal bool HasRights(ClientTypeEnum clientType) { if (FeatureEnablement.IsFeatureEnabled(Features.eMarketplace) && this.Rights != null) { foreach (Right right in Rights) { if (clientType == right.ClientTypeEnum) { return(true); } } } return(false); }
public DownloadsPage(bool collection) { this.UI = "res://ZuneMarketplaceResources!DownloadsData.uix#MarketplaceDownloads"; if (collection || !FeatureEnablement.IsFeatureEnabled(Features.eMarketplace)) { this.PivotPreference = Shell.MainFrame.Collection.Downloads; this.UIPath = "Collection\\Downloads"; } else { this.PivotPreference = Shell.MainFrame.Marketplace.Downloads; this.UIPath = "Marketplace\\Downloads\\Home"; } this.IsRootPage = true; }
public FirstLaunchLandPage() { this.UI = "res://ZuneShellResources!SetupLand.uix#FirstLaunch"; if (Fue.Instance.AutoFUE) { this.BackgroundUI = "res://ZuneShellResources!SetupLand.uix#SetupLandBackground"; } else if (FeatureEnablement.IsFeatureEnabled(Features.eFirstLaunchIntroVideo)) { this.BackgroundUI = "res://ZuneShellResources!SetupLand.uix#FirstLaunchBackground"; } else { this.BackgroundUI = "res://ZuneShellResources!SetupLand.uix#FirstLaunchNoVideoBackground"; } }
internal Right GetOfferRight( MediaRightsEnum right, ClientTypeEnum clientType, PriceTypeEnum priceType) { if (FeatureEnablement.IsFeatureEnabled(Features.eMarketplace) && this.Rights != null) { foreach (Right right1 in Rights) { if (right == right1.RightEnum && clientType == right1.ClientTypeEnum && (priceType == right1.PriceTypeEnum && Guid.Empty != right1.OfferId)) { return(right1); } } } return(null); }
internal Right GetOfferRight( MediaRightsEnum right, AudioEncodingEnum encoding, PriceTypeEnum priceType) { if (FeatureEnablement.IsFeatureEnabled(Features.eMusic) && this.Rights != null) { foreach (Right right1 in Rights) { if (right == right1.RightEnum && priceType == right1.PriceTypeEnum && (encoding == right1.AudioEncodingEnum && right1.OfferId != Guid.Empty)) { return(right1); } } } return(null); }
public FirstConnectWizard() { this.AddPage(new FirstConnectDeviceNamePage(this)); if (FeatureEnablement.IsFeatureEnabled(Features.eSocial) || FeatureEnablement.IsFeatureEnabled(Features.eMarketplace)) { this.AddPage(new FirstConnectDeviceMarketplacePage(this)); } this.AddPage(new FirstConnectDeviceSyncOptionsPage(this)); if (this.ActiveDevice.SupportsUsageData) { this.AddPage(new FirstConnectDeviceCustomPrivacyPage(this)); } else { ZuneShell.DefaultInstance.Management.DeviceManagement.PrivacyChoice.Value = false; } ZuneShell.DefaultInstance.Management.DeviceManagement.DevicePartnership = DeviceRelationship.Permanent; }
internal Right GetOfferRight( MediaRightsEnum right, VideoDefinitionEnum definition1, VideoDefinitionEnum definition2, PriceTypeEnum priceType) { if (FeatureEnablement.IsFeatureEnabled(Features.eMarketplace) && this.IsAssociatedFeatureEnabled(right) && this.Rights != null) { foreach (Right right1 in Rights) { if (right == right1.RightEnum && definition1 == right1.VideoDefinitionEnum && priceType == right1.PriceTypeEnum) { foreach (Right right2 in Rights) { if (right1 != right2 && right == right2.RightEnum && (definition2 == right2.VideoDefinitionEnum && priceType == right2.PriceTypeEnum) && right1.OfferId == right2.OfferId) { return(right2); } } } } } return(null); }
public SyncGroupList( IModelItemOwner parent, UIDevice device, SyncRulesView snapshot, bool inOverfill) : base(parent) { this._device = device; this._snapshot = snapshot; this._inOverfill = inOverfill; this._inManagement = parent is DeviceManagement; this._commitDelegate = new ProxySettingDelegate(this.CommitChanges); this._gauge = this._snapshot == null ? new UIGasGauge(this, null) : new UIGasGauge(this, this._snapshot.PredictedGasGauge); this._existingRulesList = new Dictionary <SyncRuleDetails, SyncGroup>(new SyncRuleDetailsHasher()); this._complexRulesList = new Dictionary <int, SyncGroup>(); this._schemas = new List <SchemaSyncGroup>(8); this._music = new DetailsBackedSchemaSyncGroup(this, this._snapshot, SyncCategory.Music, this._inOverfill); this._schemas.Add(this._music); this._video = new DetailsBackedSchemaSyncGroup(this, this._snapshot, SyncCategory.Video, this._inOverfill); this._schemas.Add(this._video); this._photo = new DetailsBackedSchemaSyncGroup(this, this._snapshot, SyncCategory.Photo, this._inOverfill); this._schemas.Add(this._photo); this._podcast = new DetailsBackedSchemaSyncGroup(this, this._snapshot, SyncCategory.Podcast, this._inOverfill); this._schemas.Add(this._podcast); if (this.Device.UserId != 0) { if (FeatureEnablement.IsFeatureEnabled(Features.eSocial) && device.SupportsUserCards) { this._friend = new DetailsBackedSchemaSyncGroup(this, this._snapshot, SyncCategory.Friend, this._inOverfill); this._schemas.Add(this._friend); } if (FeatureEnablement.IsFeatureEnabled(Features.eChannels) && device.SupportsChannels) { this._channel = new DetailsBackedSchemaSyncGroup(this, this._snapshot, SyncCategory.Channel, this._inOverfill); this._schemas.Add(this._channel); } } if (FeatureEnablement.IsFeatureEnabled(Features.eGames) && this.Device.SupportsSyncApplications) { this._application = new DetailsBackedSchemaSyncGroup(this, this._snapshot, SyncCategory.Application, this._inOverfill); this._schemas.Add(this._application); } if (this.InOverfill) { this._guest = new GuestSchemaSyncGroup(this, this.GasGauge.GuestSpace); this._audiobook = new DetailsBackedSchemaSyncGroup(this, this._snapshot, SyncCategory.Audiobook, this._inOverfill); this._schemas.Add(this._audiobook); } if (this._snapshot == null) { return; } this._snapshot.ItemAddedEvent += new SyncRulesViewItemAddedHandler(this.ItemAdded); this._snapshot.ItemUpdatedEvent += new SyncRulesViewItemUpdatedHandler(this.ItemUpdated); if (this._snapshot.Count <= 0) { return; } for (int indexInRulesSnapshot = 0; indexInRulesSnapshot < this._snapshot.Count; ++indexInRulesSnapshot) { this.AddExistingSyncGroup(indexInRulesSnapshot); } }