mirror of
https://github.com/ZuneDev/ZuneUIXTools.git
synced 2026-07-27 13:11:59 -07:00
981 lines
44 KiB
XML
981 lines
44 KiB
XML
<?xml version="1.0" encoding="utf-16"?>
|
|
<UIX xmlns="http://schemas.microsoft.com/2007/uix" xmlns:iris="assembly://UIX/Microsoft.Iris" xmlns:animations="res://ZuneShellResources!Animations.uix" xmlns:zuneUI="assembly://ZuneShell/ZuneUI" xmlns:styles="res://ZuneShellResources!Styles.uix" xmlns:button="res://UIXControls!Button.uix" xmlns:zuneDBApi="assembly://ZuneDBApi/" xmlns:label="res://UIXControls!Label.uix" xmlns:schema="res://ZuneShellResources!LibraryData.schema.xml" xmlns:util="assembly://ZuneDBApi/Microsoft.Zune.Util" xmlns:collections="assembly://System.Private.CoreLib/System.Collections" xmlns:mixManager="res://ZuneShellResources!MixManager.uix" xmlns:nowPlayingStyles="res://ZuneShellResources!NowPlayingStyles.uix" xmlns:nowPlayingEffects="res://ZuneShellResources!NowPlayingEffects.uix" xmlns:nowPlayingClips="res://ZuneShellResources!NowPlayingClips.uix" xmlns:moreInfoActions="res://ZuneShellResources!MoreInfoActions.uix" xmlns:nowPlayingAlbumGridDefs="res://ZuneShellResources!NowPlayingAlbumGridDefs.uix" xmlns:nowPlayingLand="res://ZuneShellResources!NowPlayingLand.uix" xmlns:nowPlayingNotification="res://ZuneShellResources!NowPlayingNotification.uix" xmlns:nowPlayingMusicBackground="res://ZuneShellResources!NowPlayingMusicBackground.uix" xmlns:nonClientControls="res://UIXControls!NonClientControls.uix">
|
|
<Class Name="NowPlayingBackgroundHelper" Shared="true">
|
|
<Properties>
|
|
<Boolean Name="Visible" />
|
|
</Properties>
|
|
</Class>
|
|
<UI Name="NowPlayingMusicBackground">
|
|
<Properties>
|
|
<zuneUI:PlaybackPage Name="Page" PlaybackPage="{null}" />
|
|
<Boolean Name="LaunchedAsScreenSaver" />
|
|
</Properties>
|
|
<Locals>
|
|
<nowPlayingLand:NowPlayingInfo Name="NowPlayingInfo" />
|
|
<zuneUI:TransportControls Name="TransportControls" TransportControls="{zuneUI:SingletonModelItem`1[ZuneUI.TransportControls].Instance}" />
|
|
<Timer Name="GridDisplayedTimer" Interval="3000" AutoRepeat="false" Enabled="true" />
|
|
<Boolean Name="GridDisplayed" />
|
|
<Image Name="FirstAnimationClipImage" Image="{null}" />
|
|
<Image Name="NextAnimationClipImage" Image="{null}" />
|
|
<Int32 Name="NextAnimationClipImageIndex" />
|
|
<String Name="ArtistName" />
|
|
<List Name="ArtistImages" />
|
|
<Command Name="OnAnimationClipComplete" />
|
|
<nowPlayingMusicBackground:NowPlayingBackgroundHelper Name="NowPlayingBackgroundHelper" />
|
|
</Locals>
|
|
<Scripts>
|
|
<Script>NowPlayingBackgroundHelper.Visible = true;</Script>
|
|
<Script>[DeclareTrigger(NowPlayingInfo.ArtistBio)]
|
|
AnimationClips.ArtistBio = zuneUI:StringParserHelper.StripHtmlTags(#NowPlayingInfo.ArtistBio #);</Script>
|
|
<Script>[DeclareTrigger(NowPlayingInfo.ArtistBioAuthor)]
|
|
AnimationClips.ArtistBioAuthor = #NowPlayingInfo.ArtistBioAuthor #;</Script>
|
|
<Script>[DeclareTrigger(AnimationClips.Visible)]
|
|
Background.Visible = !#AnimationClips.Visible #;</Script>
|
|
<Script>[FinalEvaluate]
|
|
NowPlayingBackgroundHelper.Visible = false;</Script>
|
|
<Script>[DeclareTrigger(NowPlayingInfo.ArtistImages), DeclareTrigger(TransportControls.Playing)]
|
|
/* UIB_0033 */
|
|
if (!#TransportControls.Playing #)
|
|
goto UIB_0060;
|
|
/* UIB_0045 */
|
|
if (NowPlayingInfo.ArtistName != ArtistName)
|
|
goto UIB_0058;
|
|
/* UIB_0060 */
|
|
if (!!TransportControls.Playing && !!NowPlayingInfo.ArtistName == ArtistName && !string.IsNullOrEmpty(ArtistName))
|
|
goto UIB_00ED;
|
|
/* UIB_0070 */
|
|
if (#NowPlayingInfo.ArtistImages # == null)
|
|
goto UIB_0089;
|
|
/* UIB_0089 */
|
|
if ((NowPlayingInfo.ArtistImages == null) || (NowPlayingInfo.ArtistImages.Count <= 0))
|
|
goto UIB_00D3;
|
|
ArtistName = NowPlayingInfo.ArtistName;
|
|
ArtistImages = NowPlayingInfo.ArtistImages;
|
|
NextAnimationClipImage = null;
|
|
NextAnimationClipImageIndex = 0;
|
|
FirstAnimationClipImage = (Image)ArtistImages[0];
|
|
ImageHolder.Content = FirstAnimationClipImage;
|
|
FirstAnimationClipImage.Load();
|
|
goto UIB_00ED;
|
|
/* UIB_00DE */
|
|
if (NowPlayingInfo.ArtistImages != null)
|
|
goto UIB_00ED;
|
|
FirstAnimationClipImage = null;
|
|
NextAnimationClipImage = null;</Script>
|
|
<Script>[DeclareTrigger(TransportControls.Playing), DeclareTrigger(FirstAnimationClipImage.Status)]
|
|
/* UIB_00FB */
|
|
if (!#TransportControls.Playing # || !GridDisplayed)
|
|
goto UIB_0111;
|
|
/* UIB_0111 */
|
|
if ((!(TransportControls.Playing) || !(GridDisplayed)) || (NowPlayingInfo.ArtistName != ArtistName))
|
|
goto UIB_0124;
|
|
/* UIB_0124 */
|
|
if ((!(TransportControls.Playing) || !(GridDisplayed)) || (NowPlayingInfo.ArtistName != ArtistName) || !!string.IsNullOrEmpty(ArtistName))
|
|
goto UIB_0135;
|
|
/* UIB_0135 */
|
|
if (((!(TransportControls.Playing) || !(GridDisplayed)) || (NowPlayingInfo.ArtistName != ArtistName) || !(!string.IsNullOrEmpty(ArtistName))) || (FirstAnimationClipImage == null))
|
|
goto UIB_014B;
|
|
/* UIB_014B */
|
|
if ((((!(TransportControls.Playing) || !(GridDisplayed)) || (NowPlayingInfo.ArtistName != ArtistName) || !(!string.IsNullOrEmpty(ArtistName))) || (FirstAnimationClipImage == null)) || (#FirstAnimationClipImage.Status # != ImageStatus.Complete))
|
|
goto UIB_01E2;
|
|
AnimationClips.Image = FirstAnimationClipImage;
|
|
AnimationClips.Text = NowPlayingInfo.ExtendedPlayInfo;
|
|
AnimationClips.PlayNextAnimationClip.Invoke();
|
|
AnimationClips.Visible = true;
|
|
AlbumGrid.ShowState.ChosenValue = "Faded";
|
|
/* UIB_018F */
|
|
if (ArtistImages == null)
|
|
goto UIB_01A5;
|
|
/* UIB_01A5 */
|
|
if ((ArtistImages == null) || (ArtistImages.Count <= 1))
|
|
goto UIB_01E2;
|
|
NextAnimationClipImageIndex = NextAnimationClipImageIndex + 1 % ArtistImages.Count;
|
|
NextAnimationClipImage = (Image)ArtistImages[NextAnimationClipImageIndex];
|
|
ImageHolder.Content = NextAnimationClipImage;
|
|
NextAnimationClipImage.Load();</Script>
|
|
<Script>[DeclareTrigger(OnAnimationClipComplete.Invoked)]
|
|
/* UIB_01E9 */
|
|
if (!TransportControls.Playing)
|
|
goto UIB_02B5;
|
|
/* UIB_01FB */
|
|
if (NowPlayingInfo.ArtistName != ArtistName)
|
|
goto UIB_020E;
|
|
/* UIB_020E */
|
|
if (NowPlayingInfo.ArtistName != ArtistName || !!string.IsNullOrEmpty(ArtistName))
|
|
goto UIB_021F;
|
|
/* UIB_021F */
|
|
if ((NowPlayingInfo.ArtistName != ArtistName || !(!string.IsNullOrEmpty(ArtistName))) || (NextAnimationClipImage == null))
|
|
goto UIB_0235;
|
|
/* UIB_0235 */
|
|
if (((NowPlayingInfo.ArtistName != ArtistName || !(!string.IsNullOrEmpty(ArtistName))) || (NextAnimationClipImage == null)) || (NextAnimationClipImage.Status != ImageStatus.Complete))
|
|
goto UIB_029F;
|
|
AnimationClips.Image = NextAnimationClipImage;
|
|
/* UIB_024C */
|
|
if (ArtistImages == null)
|
|
goto UIB_0262;
|
|
/* UIB_0262 */
|
|
if ((ArtistImages == null) || (ArtistImages.Count <= 1))
|
|
goto UIB_029F;
|
|
NextAnimationClipImageIndex = NextAnimationClipImageIndex + 1 % ArtistImages.Count;
|
|
NextAnimationClipImage = (Image)ArtistImages[NextAnimationClipImageIndex];
|
|
ImageHolder.Content = NextAnimationClipImage;
|
|
NextAnimationClipImage.Load();
|
|
AnimationClips.Text = NowPlayingInfo.ExtendedPlayInfo;
|
|
AnimationClips.PlayNextAnimationClip.Invoke();</Script>
|
|
<Script>[DeclareTrigger(GridDisplayedTimer.Tick)]
|
|
AlbumGrid.ShowState.ChosenValue = "Normal";
|
|
AnimationClips.Visible = false;
|
|
GridDisplayed = true;</Script>
|
|
<Script>[DeclareTrigger(NowPlayingInfo.ExtendedPlayInfo), DeclareTrigger(TransportControls.Playing)]
|
|
/* UIB_02E0 */
|
|
if (#NowPlayingInfo.ExtendedPlayInfo # == null)
|
|
goto UIB_0378;
|
|
/* UIB_02FC */
|
|
if (!#TransportControls.Playing # || NowPlayingInfo.ArtistName != ArtistName)
|
|
goto UIB_030F;
|
|
/* UIB_030F */
|
|
if (!TransportControls.Playing || NowPlayingInfo.ArtistName != ArtistName || !!string.IsNullOrEmpty(ArtistName))
|
|
goto UIB_031F;
|
|
OnAnimationClipComplete.Invoke();
|
|
goto UIB_0378;
|
|
/* UIB_032F */
|
|
if (AlbumGrid.ShowState.ChosenValue != "Faded")
|
|
goto UIB_0378;
|
|
AlbumGrid.ShowState.ChosenValue = "Normal";
|
|
GridDisplayed = false;
|
|
GridDisplayedTimer.Enabled = true;
|
|
ArtistName = null;
|
|
FirstAnimationClipImage = null;
|
|
NextAnimationClipImage = null;
|
|
/* UIB_0369 */
|
|
if (Page == null)
|
|
goto UIB_0378;
|
|
Page.ShowingArtistBio = false;</Script>
|
|
</Scripts>
|
|
<Content>
|
|
<Panel Layout="Form">
|
|
<Animations>
|
|
<Null Null="{null}" />
|
|
</Animations>
|
|
<Children>
|
|
<nowPlayingMusicBackground:AlbumGrid Name="AlbumGrid" LaunchedAsScreenSaver="{LaunchedAsScreenSaver}" />
|
|
<nowPlayingMusicBackground:AnimationClips Name="AnimationClips" Visible="false" Page="{Page}" ShowArtistBioClips="{Page != null}" OnAnimationClipComplete="{OnAnimationClipComplete}" NowPlayingInfo="{NowPlayingInfo}" />
|
|
<Graphic Name="Background" Content="{styles:Styles.NowPlayingBackground}" StretchingPolicy="UniformToFill" SizingPolicy="SizeToConstraint" />
|
|
<Graphic Name="ImageHolder" Visible="false" />
|
|
</Children>
|
|
</Panel>
|
|
</Content>
|
|
</UI>
|
|
<UI Name="AlbumGrid">
|
|
<Properties>
|
|
<iris:Choice Name="ShowState">
|
|
<Options>
|
|
<String String="Intro" />
|
|
<String String="Normal" />
|
|
<String String="Faded" />
|
|
</Options>
|
|
</iris:Choice>
|
|
<Boolean Name="LaunchedAsScreenSaver" Boolean="false" />
|
|
</Properties>
|
|
<Scripts>
|
|
<Script>ShowState.ChosenValue = "Intro";
|
|
GridArt.LayoutInput = GridArt.AnchorInput;</Script>
|
|
<Script>[DeclareTrigger(animations:AnimationState.InMixView.Value)]
|
|
/* UIB_0620 */
|
|
if (iris:Application.RenderingQuality != iris:RenderingQuality.MaxQuality)
|
|
goto UIB_0647;
|
|
/* UIB_062B */
|
|
if (!#animations:AnimationState.InMixView.Value #)
|
|
goto UIB_063E;
|
|
GridInfo.PlayAnimation(animations:Animations.MixClientShrink);
|
|
goto UIB_0647;
|
|
GridInfo.PlayAnimation(animations:Animations.MixClientRestore);</Script>
|
|
</Scripts>
|
|
<Content>
|
|
<Panel Layout="Form">
|
|
<Children>
|
|
<nowPlayingMusicBackground:AlbumGridInfo Name="GridInfo" ShowState="{ShowState}" LaunchedAsScreenSaver="{LaunchedAsScreenSaver}">
|
|
<LayoutInput>
|
|
<FormLayoutInput Left="Parent,0,105" Right="Parent,1,-20" Bottom="Parent,1,-115" />
|
|
</LayoutInput>
|
|
</nowPlayingMusicBackground:AlbumGridInfo>
|
|
<nowPlayingMusicBackground:AlbumGridArt Name="GridArt" ShowState="{ShowState}" />
|
|
</Children>
|
|
</Panel>
|
|
</Content>
|
|
</UI>
|
|
<Class Name="AnimationClipDef">
|
|
<Properties>
|
|
<Type Name="Type" Type="$Required" />
|
|
<Single Name="Duration" Single="$Required" />
|
|
<Int32 Name="ArtistBioMaxLength" Int32="$Required" />
|
|
<String Name="DebugName" />
|
|
</Properties>
|
|
</Class>
|
|
<UI Name="AnimationClips">
|
|
<Properties>
|
|
<zuneUI:PlaybackPage Name="Page" PlaybackPage="$Required" />
|
|
<Boolean Name="ShowArtistBioClips" Boolean="$Required" />
|
|
<nowPlayingLand:NowPlayingInfo Name="NowPlayingInfo" NowPlayingInfo="$Required" />
|
|
<Command Name="OnAnimationClipComplete" Command="$Required" />
|
|
<List Name="Text" List="{null}" />
|
|
<Image Name="Image" Image="{null}" />
|
|
<String Name="ArtistBio" String="{null}" />
|
|
<String Name="ArtistBioAuthor" String="{null}" />
|
|
<Command Name="PlayNextAnimationClip" />
|
|
</Properties>
|
|
<Locals>
|
|
<iris:ArrayListDataSet Name="AnimationClipDefs">
|
|
<Source>
|
|
<nowPlayingMusicBackground:AnimationClipDef Type="{typeof(nowPlayingClips:AnimationClip_1)}" DebugName="Clip 1" Duration="32" ArtistBioMaxLength="0" />
|
|
<nowPlayingMusicBackground:AnimationClipDef Type="{typeof(nowPlayingClips:AnimationClip_2)}" DebugName="Clip 2" Duration="32" ArtistBioMaxLength="0" />
|
|
<nowPlayingMusicBackground:AnimationClipDef Type="{typeof(nowPlayingClips:AnimationClip_3)}" DebugName="Clip 3" Duration="32" ArtistBioMaxLength="1000" />
|
|
<nowPlayingMusicBackground:AnimationClipDef Type="{typeof(nowPlayingClips:WallOTextClip)}" DebugName="Mood 1" Duration="32" ArtistBioMaxLength="1000" />
|
|
<nowPlayingMusicBackground:AnimationClipDef Type="{typeof(nowPlayingClips:TextClustersClip)}" DebugName="Mood 5" Duration="32" ArtistBioMaxLength="0" />
|
|
<nowPlayingMusicBackground:AnimationClipDef Type="{typeof(nowPlayingClips:LyricsClip)}" DebugName="Mood 4" Duration="32" ArtistBioMaxLength="1000" />
|
|
<nowPlayingMusicBackground:AnimationClipDef Type="{typeof(nowPlayingClips:AngledTextClip)}" DebugName="Mood 2" Duration="32" ArtistBioMaxLength="0" />
|
|
</Source>
|
|
</iris:ArrayListDataSet>
|
|
<Int32 Name="PreviousClipIndex" Int32="-1" />
|
|
<Random Name="Random" />
|
|
<Timer Name="Timer" AutoRepeat="false" Enabled="false" />
|
|
<nowPlayingClips:AnimationClipModel Name="Model" />
|
|
<nowPlayingStyles:TimedPalettePicker Name="PalettePicker" />
|
|
</Locals>
|
|
<Scripts>
|
|
<Script>[DeclareTrigger(NowPlayingInfo.ArtistMoods)]
|
|
PalettePicker.CurrentMoods = #NowPlayingInfo.ArtistMoods #;</Script>
|
|
<Script>[DeclareTrigger(NowPlayingInfo.ArtistGenres)]
|
|
PalettePicker.CurrentGenres = #NowPlayingInfo.ArtistGenres #;</Script>
|
|
<Script>[DeclareTrigger(NowPlayingInfo.TrackTitle)]
|
|
PalettePicker.ChangeMood.Invoke();</Script>
|
|
<Script>Model.Text = Text;</Script>
|
|
<Script>Model.Image = Image;</Script>
|
|
<Script>Model.ArtistBio = ArtistBio;</Script>
|
|
<Script>Model.ArtistBioAuthor = ArtistBioAuthor;</Script>
|
|
<Script>[DeclareTrigger(NowPlayingInfo.TrackPlayCount)]
|
|
Model.TrackPlayCount = #NowPlayingInfo.TrackPlayCount #;</Script>
|
|
<Script>[DeclareTrigger(NowPlayingInfo.ArtistName)]
|
|
Model.ArtistName = #NowPlayingInfo.ArtistName #;</Script>
|
|
<Script>[DeclareTrigger(NowPlayingInfo.AlbumTitle)]
|
|
Model.AlbumTitle = #NowPlayingInfo.AlbumTitle #;</Script>
|
|
<Script>[DeclareTrigger(NowPlayingInfo.TrackTitle)]
|
|
Model.TrackTitle = #NowPlayingInfo.TrackTitle #;</Script>
|
|
<Script>[DeclareTrigger(PlayNextAnimationClip.Invoked)]
|
|
/* UIB_070B */
|
|
if (Image == null)
|
|
goto UIB_071C;
|
|
/* UIB_071C */
|
|
if (Image == null || Text == null)
|
|
goto UIB_0982;
|
|
Null previousClip = null;
|
|
/* UIB_0730 */
|
|
if (PreviousClipIndex < 0)
|
|
goto UIB_0745;
|
|
nowPlayingMusicBackground:AnimationClipDef previousClip = (nowPlayingMusicBackground:AnimationClipDef)AnimationClipDefs.get_Item(PreviousClipIndex);
|
|
object applicableClips = new List();
|
|
/* UIB_0755 */
|
|
if (!AnimationClipDefs.GetEnumerator().MoveNext())
|
|
goto UIB_0812;
|
|
nowPlayingMusicBackground:AnimationClipDef potentialAnimationClip = (nowPlayingMusicBackground:AnimationClipDef)AnimationClipDefs.GetEnumerator().Current;
|
|
/* UIB_076A */
|
|
if (!!ShowArtistBioClips)
|
|
goto UIB_0780;
|
|
/* UIB_0780 */
|
|
if (!ShowArtistBioClips && potentialAnimationClip.ArtistBioMaxLength > 0)
|
|
goto UIB_07A5;
|
|
/* UIB_0792 */
|
|
if (potentialAnimationClip.ArtistBioMaxLength <= 0)
|
|
goto UIB_07A1;
|
|
/* UIB_07A5 */
|
|
if (!ShowArtistBioClips && potentialAnimationClip.ArtistBioMaxLength > 0 || potentialAnimationClip.ArtistBioMaxLength > 0 && string.IsNullOrEmpty(ArtistBio))
|
|
goto UIB_07B8;
|
|
/* UIB_07B8 */
|
|
if ((!ShowArtistBioClips && potentialAnimationClip.ArtistBioMaxLength > 0 || potentialAnimationClip.ArtistBioMaxLength > 0 && string.IsNullOrEmpty(ArtistBio)) || (previousClip == potentialAnimationClip))
|
|
goto UIB_07F5;
|
|
/* UIB_07C5 */
|
|
if (previousClip == null)
|
|
goto UIB_07DB;
|
|
/* UIB_07DB */
|
|
if (previousClip == null || previousClip.ArtistBioMaxLength == 0)
|
|
goto UIB_07F1;
|
|
/* UIB_07F5 */
|
|
if (((!(!ShowArtistBioClips) || potentialAnimationClip.ArtistBioMaxLength <= 0 && potentialAnimationClip.ArtistBioMaxLength <= 0 || !(string.IsNullOrEmpty(ArtistBio))) && (previousClip != potentialAnimationClip)) && ((previousClip == null || previousClip.ArtistBioMaxLength == 0) || (potentialAnimationClip.ArtistBioMaxLength == 0)))
|
|
goto UIB_0804;
|
|
goto UIB_0752;
|
|
goto UIB_080D;
|
|
applicableClips.Add(potentialAnimationClip);
|
|
goto UIB_0752;
|
|
AnimationClipDefs.GetEnumerator();
|
|
/* UIB_0823 */
|
|
if (applicableClips.Count != 0)
|
|
goto UIB_0834;
|
|
/* UIB_0834 */
|
|
if ((applicableClips.Count != 0) || (previousClip == null))
|
|
goto UIB_0842;
|
|
applicableClips.Add(previousClip);
|
|
object clipIndex = Random.Next(0, applicableClips.Count);
|
|
nowPlayingMusicBackground:AnimationClipDef animationClip = (nowPlayingMusicBackground:AnimationClipDef)applicableClips[clipIndex];
|
|
PreviousClipIndex = clipIndex;
|
|
/* UIB_0874 */
|
|
if (Page == null)
|
|
goto UIB_088D;
|
|
Page.ShowingArtistBio = animationClip.ArtistBioMaxLength > 0;
|
|
/* UIB_0895 */
|
|
if (Model == null)
|
|
goto UIB_08A8;
|
|
UI.DisposeOwnedObject(Model);
|
|
Model = null;
|
|
// Unsupported instruction: INIT 605
|
|
;
|
|
Model = new nowPlayingClips:AnimationClipModel();
|
|
Model.Text = Text;
|
|
Model.Image = Image;
|
|
Model.ArtistBio = ArtistBio;
|
|
Model.ArtistBioAuthor = ArtistBioAuthor;
|
|
Model.ArtistBioMaxLength = animationClip.ArtistBioMaxLength;
|
|
Model.TrackPlayCount = NowPlayingInfo.TrackPlayCount;
|
|
Model.ArtistName = NowPlayingInfo.ArtistName;
|
|
Model.AlbumTitle = NowPlayingInfo.AlbumTitle;
|
|
Model.TrackTitle = NowPlayingInfo.TrackTitle;
|
|
Host.RequestSource(animationClip.Type, "Model", Model, "PalettePicker", PalettePicker, "Duration", animationClip.Duration);
|
|
DebugName.Content = animationClip.DebugName;
|
|
Timer.Interval = ((int)(animationClip.Duration * 1000));
|
|
Timer.Enabled = false;
|
|
Timer.Enabled = true;</Script>
|
|
<Script>[DeclareTrigger(Timer.Tick)]
|
|
/* UIB_0A15 */
|
|
if (Page == null)
|
|
goto UIB_0A24;
|
|
Page.ShowingArtistBio = false;
|
|
OnAnimationClipComplete.Invoke();</Script>
|
|
</Scripts>
|
|
<Content>
|
|
<Panel>
|
|
<Children>
|
|
<label:Label Name="DebugName" Visible="{zuneUI:Shell.PreRelease}" />
|
|
<Host Name="Host">
|
|
<Animations>
|
|
<Animation Animation="{animations:Animations.NowPlayingAnimationClipChange}" />
|
|
<Animation Animation="{animations:Animations.NowPlayingKeepVisibleDuringHide}" />
|
|
</Animations>
|
|
</Host>
|
|
</Children>
|
|
</Panel>
|
|
</Content>
|
|
</UI>
|
|
<UI Name="AlbumGridInfo">
|
|
<Properties>
|
|
<iris:Choice Name="ShowState" Choice="$Required" />
|
|
<Boolean Name="LaunchedAsScreenSaver" Boolean="false" />
|
|
</Properties>
|
|
<Locals>
|
|
<nonClientControls:WindowState Name="WindowState" />
|
|
<nowPlayingLand:NowPlayingInfo Name="NowPlayingInfo" />
|
|
<zuneUI:PlaybackTrack Name="CurrentTrack" PlaybackTrack="{null}" />
|
|
<Boolean Name="IsFaded" />
|
|
<mixManager:CurrentlyPlayingTrackMixAvailability Name="CurrentlyPlayingTrackMixAvailability" />
|
|
</Locals>
|
|
<Scripts>
|
|
<Script>IsFaded = ShowState.ChosenValue == "Faded";</Script>
|
|
<Script>[DeclareTrigger(zuneUI:SingletonModelItem`1[ZuneUI.TransportControls].Instance.CurrentTrack)]
|
|
CurrentTrack = #zuneUI:SingletonModelItem`1[ZuneUI.TransportControls].Instance.CurrentTrack #;</Script>
|
|
<Script>Form.Visible = CurrentTrack != null;</Script>
|
|
<Script>[DeclareTrigger(NowPlayingInfo.AlbumTitle)]
|
|
AlbumTitle.Content = #NowPlayingInfo.AlbumTitle #;</Script>
|
|
<Script>[DeclareTrigger(NowPlayingInfo.TrackTitle)]
|
|
TrackTitle.Content = #NowPlayingInfo.TrackTitle #;</Script>
|
|
<Script>[DeclareTrigger(NowPlayingInfo.ArtistName)]
|
|
ArtistName.Content = #NowPlayingInfo.ArtistName #;</Script>
|
|
<Script>[DeclareTrigger(NowPlayingInfo.BigAlbumArt)]
|
|
AlbumArt.Content = #NowPlayingInfo.BigAlbumArt #;
|
|
AlbumArtShadow.Visible = AlbumArt.Content != null;</Script>
|
|
<Script>[DeclareTrigger(CurrentlyPlayingTrackMixAvailability.Available)]
|
|
MixViewButton.Visible = util:FeatureEnablement.IsFeatureEnabled(zuneDBApi:Features.eMixview) && #CurrentlyPlayingTrackMixAvailability.Available #;</Script>
|
|
<Script>/* UIB_0E57 */
|
|
if (CurrentTrack == null)
|
|
goto UIB_0E6D;
|
|
MoreInfoButton.Visible = CurrentTrack != null && !zuneUI:GuidHelper.IsEmpty(CurrentTrack.ZuneMediaId);</Script>
|
|
<Script>AlbumArtShadow.ForceContentChange();
|
|
LabelRoot.ForceContentChange();</Script>
|
|
<Script>[DeclareTrigger(ShowState.ChosenValue), DeclareTrigger(WindowState.InputActive)]
|
|
bool fadeOut = false;
|
|
bool fadeIn = false;
|
|
/* UIB_0D9D */
|
|
if (!IsFaded)
|
|
goto UIB_0DCF;
|
|
/* UIB_0DA8 */
|
|
if (#WindowState.InputActive #)
|
|
goto UIB_0DBE;
|
|
/* UIB_0DBE */
|
|
if (!WindowState.InputActive && #ShowState.ChosenValue # == "Faded")
|
|
goto UIB_0DCA;
|
|
bool fadeIn = true;
|
|
goto UIB_0DFB;
|
|
/* UIB_0DDC */
|
|
if (ShowState.ChosenValue != "Faded")
|
|
goto UIB_0DEF;
|
|
/* UIB_0DEF */
|
|
if (ShowState.ChosenValue != "Faded" || !!WindowState.InputActive)
|
|
goto UIB_0DFB;
|
|
bool fadeOut = true;
|
|
/* UIB_0DFE */
|
|
if (!fadeOut)
|
|
goto UIB_0E18;
|
|
IsFaded = true;
|
|
Form.PlayAnimation(animations:Animations.NowPlayingGridFadeOut);
|
|
goto UIB_0E30;
|
|
/* UIB_0E1B */
|
|
if (!fadeIn)
|
|
goto UIB_0E30;
|
|
IsFaded = false;
|
|
Form.PlayAnimation(animations:Animations.NowPlayingGridFadeIn);</Script>
|
|
</Scripts>
|
|
<Content>
|
|
<Panel Name="Form" Layout="Form" MaximumSize="0, 200">
|
|
<Children>
|
|
<Panel Name="AlbumArtPanel">
|
|
<LayoutInput>
|
|
<FormLayoutInput Left="Parent,0" Bottom="Parent,1,-20" />
|
|
</LayoutInput>
|
|
<Children>
|
|
<Graphic Name="AlbumArtShadow" Content="{styles:Styles.NowPlayingBoxShadow}" SizingPolicy="SizeToChildren" Margins="-18, -20, -19, -17" Padding="18, 20, 19, 17">
|
|
<Animations>
|
|
<TransformAnimation TransformAnimation="{animations:Animations.NowPlayingAlbumArtShow}" />
|
|
<Animation Animation="{animations:Animations.NowPlayingAlbumArtContentShow}" />
|
|
</Animations>
|
|
<Children>
|
|
<Panel Background="255, 0, 0, 0" Margins="5">
|
|
<Children>
|
|
<Graphic Name="AlbumArt" VerticalAlignment="Center" Margins="-1" Alignment="Center" SizingPolicy="SizeToConstraint" StretchingPolicy="Uniform" MinimumSize="140, 140" MaximumSize="{nowPlayingLand:NowPlayingInfo.BigSize}" />
|
|
</Children>
|
|
</Panel>
|
|
</Children>
|
|
</Graphic>
|
|
</Children>
|
|
</Panel>
|
|
<Panel Name="LabelRoot" Layout="Anchor">
|
|
<Animations>
|
|
<TransformAnimation TransformAnimation="{animations:Animations.NowPlayingAlbumArtShow}" />
|
|
<TransformAnimation TransformAnimation="{animations:Animations.NowPlayingTitleContentShow}" />
|
|
<Animation Animation="{animations:Animations.NowPlayingTitleContentHide}" />
|
|
<Animation Animation="{animations:Animations.MoveNow}" />
|
|
</Animations>
|
|
<LayoutInput>
|
|
<FormLayoutInput Left="AlbumArtPanel,1,18" Top="AlbumArtPanel,0,10" Bottom="Parent,1,30" />
|
|
</LayoutInput>
|
|
<Children>
|
|
<label:Label Name="ArtistName" Style="{styles:SharedStyles.NowPlayingPrimaryLabel}" ShowToolTipWhenClipped="true">
|
|
<LayoutInput>
|
|
<FormLayoutInput Left="Parent,0" Top="Parent,0" />
|
|
</LayoutInput>
|
|
</label:Label>
|
|
<label:Label Name="AlbumTitle" Style="{styles:SharedStyles.NowPlayingSecondaryLabel}" ShowToolTipWhenClipped="true">
|
|
<LayoutInput>
|
|
<FormLayoutInput Left="Parent,0" Top="ArtistName,1,-6" />
|
|
</LayoutInput>
|
|
</label:Label>
|
|
<label:Label Name="TrackTitle" Style="{styles:SharedStyles.NowPlayingTertiaryLabel}" ShowToolTipWhenClipped="true">
|
|
<LayoutInput>
|
|
<FormLayoutInput Left="Parent,0" Top="AlbumTitle,1,10" />
|
|
</LayoutInput>
|
|
</label:Label>
|
|
<Graphic Name="ArtistShadow" Content="{styles:Styles.NowPlayingShadow}" Margins="-10" Alpha="0.5">
|
|
<LayoutInput>
|
|
<AnchorLayoutInput Left="ArtistName,0,-5" Right="ArtistName,1,10" Top="ArtistName,0" Bottom="ArtistName,1" ContributesToHeight="false" ContributesToWidth="false" />
|
|
</LayoutInput>
|
|
</Graphic>
|
|
<Graphic Name="AlbumShadow" Content="{styles:Styles.NowPlayingShadow}" Margins="-12" Alpha="0.5">
|
|
<LayoutInput>
|
|
<AnchorLayoutInput Left="AlbumTitle,0,-5" Right="AlbumTitle,1,10" Top="AlbumTitle,0" Bottom="AlbumTitle,1" ContributesToHeight="false" ContributesToWidth="false" />
|
|
</LayoutInput>
|
|
</Graphic>
|
|
<Graphic Name="TrackShadow" Content="{styles:Styles.NowPlayingShadow}" Margins="-12" Alpha="0.5">
|
|
<LayoutInput>
|
|
<AnchorLayoutInput Left="TrackTitle,0,-5" Right="TrackTitle,1,10" Top="TrackTitle,0" Bottom="TrackTitle,1" ContributesToHeight="false" ContributesToWidth="false" />
|
|
</LayoutInput>
|
|
</Graphic>
|
|
<Panel Layout="HorizontalFlow" Visible="{!LaunchedAsScreenSaver}">
|
|
<LayoutInput>
|
|
<FormLayoutInput Left="Parent,0,-3" Top="TrackTitle,1,4" />
|
|
</LayoutInput>
|
|
<Children>
|
|
<nowPlayingMusicBackground:MixViewButton Name="MixViewButton" Margins="0, 0, -3, 0" />
|
|
<nowPlayingMusicBackground:MoreInfoButton Name="MoreInfoButton" Margins="0, 0, -3, 0" />
|
|
<nowPlayingMusicBackground:RatingButton Name="RatingButton" />
|
|
</Children>
|
|
</Panel>
|
|
</Children>
|
|
</Panel>
|
|
</Children>
|
|
</Panel>
|
|
</Content>
|
|
</UI>
|
|
<UI Name="MixViewButton" Base="button:IconButton">
|
|
<Properties>
|
|
<String Name="TooltipText" String="{zuneUI:Shell.LoadString(zuneUI:StringId.IDS_OVERLAY_MIXVIEW_TOOLTIP)}" />
|
|
<iris:Command Name="Model" />
|
|
<Image Name="Image" Image="res://ZuneShellResources!Mix.Mix.Default.png" />
|
|
<Image Name="PressedImage" Image="res://ZuneShellResources!Mix.Mix.Pressed.png" />
|
|
<Image Name="HoverImage" Image="res://ZuneShellResources!Mix.Mix.Hover.png" />
|
|
<Image Name="DisabledImage" Image="{Image}" />
|
|
<Image Name="FocusImage" Image="{PressedImage}" />
|
|
</Properties>
|
|
<Locals>
|
|
<mixManager:CurrentlyPlayingTrackMixAvailability Name="CurrentlyPlayingTrackMixAvailability" />
|
|
</Locals>
|
|
<Scripts>
|
|
<Script>Model.Description = TooltipText;</Script>
|
|
<Script>[DeclareTrigger(CurrentlyPlayingTrackMixAvailability.Available)]
|
|
Model.Available = #CurrentlyPlayingTrackMixAvailability.Available #;</Script>
|
|
<Script>[DeclareTrigger(Model.Invoked)]
|
|
/* UIB_12A9 */
|
|
if (!Model.Available)
|
|
goto UIB_12C4;
|
|
CurrentlyPlayingTrackMixAvailability.UpdateMixSeed.Invoke();
|
|
zuneUI:ZuneShell.DefaultInstance.CurrentPage.OverlayUI = mixManager:MixLayerManager.MixUI;</Script>
|
|
<Script>[DeclareTrigger(zuneUI:SingletonModelItem`1[ZuneUI.TransportControls].Instance.CurrentTrack)]
|
|
object track = #zuneUI:SingletonModelItem`1[ZuneUI.TransportControls].Instance.CurrentTrack #;
|
|
/* UIB_12D7 */
|
|
if (track == null)
|
|
goto UIB_12EA;
|
|
/* UIB_12EA */
|
|
if (track == null || !!track.IsMusic)
|
|
goto UIB_12FA;
|
|
zuneUI:ZuneShell.DefaultInstance.CurrentPage.OverlayUI = null;</Script>
|
|
</Scripts>
|
|
</UI>
|
|
<UI Name="MoreInfoButton" Base="button:IconButton">
|
|
<Properties>
|
|
<String Name="TooltipText" String="{zuneUI:Shell.LoadString(zuneUI:StringId.IDS_LIBRARY_FINDALBUMINFO_MENU_ITEM)}" />
|
|
<iris:Command Name="Model" />
|
|
<Image Name="Image" Image="res://ZuneShellResources!Mix.Info.Default.png" />
|
|
<Image Name="PressedImage" Image="res://ZuneShellResources!Mix.Info.Pressed.png" />
|
|
<Image Name="HoverImage" Image="res://ZuneShellResources!Mix.Info.Hover.png" />
|
|
<Image Name="DisabledImage" Image="{styles:Styles.RatingBlank}" />
|
|
<Image Name="FocusImage" Image="{PressedImage}" />
|
|
</Properties>
|
|
<Locals>
|
|
<zuneUI:PlaybackTrack Name="CurrentTrack" PlaybackTrack="{null}" />
|
|
<moreInfoActions:TrackMoreInfoActions Name="MoreInfoActions" />
|
|
</Locals>
|
|
<Scripts>
|
|
<Script>[DeclareTrigger(zuneUI:SingletonModelItem`1[ZuneUI.TransportControls].Instance.CurrentTrack)]
|
|
CurrentTrack = #zuneUI:SingletonModelItem`1[ZuneUI.TransportControls].Instance.CurrentTrack #;</Script>
|
|
<Script>[DeclareTrigger(MoreInfoActions.PrimaryLinkCommand)]
|
|
Model = #MoreInfoActions.PrimaryLinkCommand #;</Script>
|
|
<Script>/* UIB_13F7 */
|
|
if (CurrentTrack == null)
|
|
goto UIB_140D;
|
|
/* UIB_140D */
|
|
if (CurrentTrack == null || !!zuneUI:GuidHelper.IsEmpty(CurrentTrack.ZuneMediaId))
|
|
goto UIB_1423;
|
|
/* UIB_1423 */
|
|
if ((CurrentTrack == null || !(!zuneUI:GuidHelper.IsEmpty(CurrentTrack.ZuneMediaId))) || (CurrentTrack.MediaType != zuneUI:MediaType.Track))
|
|
goto UIB_143A;
|
|
MoreInfoActions.ZuneMediaId = CurrentTrack.ZuneMediaId;
|
|
goto UIB_1444;
|
|
MoreInfoActions.ZuneMediaId = zuneUI:GuidHelper.Empty;</Script>
|
|
</Scripts>
|
|
</UI>
|
|
<UI Name="RatingButton" Base="nowPlayingNotification:RatingSelector">
|
|
<Properties>
|
|
<Boolean Name="FadeWhenNoFocus" Boolean="false" />
|
|
<Image Name="UnratedImage" Image="{styles:Styles.RatingUnratedMixView}" />
|
|
<Image Name="UnratedHoverImage" Image="{styles:Styles.RatingUnratedHoverMixView}" />
|
|
<Image Name="UnratedPressedImage" Image="{styles:Styles.RatingUnratedPressedMixView}" />
|
|
<Image Name="LoveItImage" Image="{styles:Styles.RatingLoveItMixView}" />
|
|
<Image Name="LoveItHoverImage" Image="{styles:Styles.RatingLoveItHoverMixView}" />
|
|
<Image Name="LoveItPressedImage" Image="{styles:Styles.RatingLoveItPressedMixView}" />
|
|
<Image Name="HateItImage" Image="{styles:Styles.RatingHateItMixView}" />
|
|
<Image Name="HateItHoverImage" Image="{styles:Styles.RatingHateItHoverMixView}" />
|
|
<Image Name="HateItPressedImage" Image="{styles:Styles.RatingHateItPressedMixView}" />
|
|
</Properties>
|
|
</UI>
|
|
<UI Name="AlbumGridArt">
|
|
<Properties>
|
|
<iris:Choice Name="ShowState" Choice="$Required" />
|
|
<AnchorLayoutInput Name="AnchorInput" Left="Parent,0" Right="Parent,0,100" Top="Parent,0" Bottom="Parent,0,100" />
|
|
</Properties>
|
|
<Locals>
|
|
<Window Name="Window" />
|
|
<nowPlayingAlbumGridDefs:GridDefs Name="C" />
|
|
<nowPlayingMusicBackground:AlbumArtMachine Name="ArtMachine" />
|
|
<zuneUI:TransportControls Name="TransportControls" TransportControls="{zuneUI:SingletonModelItem`1[ZuneUI.TransportControls].Instance}" />
|
|
<Int32 Name="DesiredHorizontalBlocks" />
|
|
<Int32 Name="DesiredVerticalBlocks" />
|
|
<Random Name="Random" />
|
|
<Int32 Name="NextAlbumToSwap" />
|
|
<iris:BooleanChoice Name="HideState">
|
|
<Options>
|
|
<String String="Normal" />
|
|
<String String="Fade" />
|
|
</Options>
|
|
</iris:BooleanChoice>
|
|
<List Name="CellList" />
|
|
<Size Name="BackgroundOffset" Size="-144, -200" />
|
|
<Boolean Name="UseEffects" Boolean="{(iris:Application.RenderingType != iris:RenderingType.GDI) && (iris:Application.RenderingQuality == iris:RenderingQuality.MaxQuality)}" />
|
|
<Boolean Name="IsFaded" />
|
|
<Timer Name="SwitchArtTimer" Interval="2000" AutoRepeat="true" Enabled="true" />
|
|
<iris:Command Name="ResetHideState" />
|
|
<Int32 Name="NextBlockRowToAdd" Int32="0" />
|
|
<Int32 Name="NextBlockColumnToAdd" Int32="0" />
|
|
</Locals>
|
|
<Scripts>
|
|
<Script>/* UIB_15B9 */
|
|
if (!UseEffects)
|
|
goto UIB_15C7;
|
|
EffectsHost.RequestSource(typeof(nowPlayingMusicBackground:BlendedLightGraphic));</Script>
|
|
<Script>[DeclareTrigger(Window.ClientSize)]
|
|
Size currentSize = #Window.ClientSize #;
|
|
object widthOfFirstBlock = C.BlockSizeInPixels.Width + BackgroundOffset.Width;
|
|
object heightOfFirstBlock = C.BlockSizeInPixels.Height + BackgroundOffset.Height;
|
|
object fitHorizontalBlocks = (float)(currentSize.Width - widthOfFirstBlock) / (float)(C.BlockSizeInPixels.Width);
|
|
((float)(currentSize.Width - widthOfFirstBlock)) / ((float)(C.BlockSizeInPixels.Width));
|
|
object fitVerticalBlocks = (float)(currentSize.Height - heightOfFirstBlock) / (float)(C.BlockSizeInPixels.Height);
|
|
((float)(currentSize.Height - heightOfFirstBlock)) / ((float)(C.BlockSizeInPixels.Height));
|
|
object roundedFitHorizontalBlocks = (int)(fitHorizontalBlocks + 1) + 1;
|
|
((int)(fitHorizontalBlocks + 1)) + 1;
|
|
object roundedFitVerticalBlocks = (int)(fitVerticalBlocks + 1) + 1;
|
|
((int)(fitVerticalBlocks + 1)) + 1;
|
|
/* UIB_168E */
|
|
if (roundedFitHorizontalBlocks <= DesiredHorizontalBlocks)
|
|
goto UIB_169A;
|
|
DesiredHorizontalBlocks = roundedFitHorizontalBlocks;
|
|
/* UIB_16A4 */
|
|
if (roundedFitVerticalBlocks <= DesiredVerticalBlocks)
|
|
goto UIB_16B0;
|
|
DesiredVerticalBlocks = roundedFitVerticalBlocks;
|
|
/* UIB_16C0 */
|
|
if (DesiredHorizontalBlocks <= C.MaximumBlocks.Width)
|
|
goto UIB_16D2;
|
|
DesiredHorizontalBlocks = C.MaximumBlocks.Width;
|
|
/* UIB_16E2 */
|
|
if (DesiredVerticalBlocks <= C.MaximumBlocks.Height)
|
|
goto UIB_16F4;
|
|
DesiredVerticalBlocks = C.MaximumBlocks.Height;</Script>
|
|
<Script></Script>
|
|
<Script>[DeclareTrigger(ArtMachine.EnoughAlbums)]
|
|
/* UIB_1711 */
|
|
if (!#ArtMachine.EnoughAlbums #)
|
|
goto UIB_18C8;
|
|
ArtMachine.DesiredNumberOfAlbums = DesiredHorizontalBlocks * DesiredVerticalBlocks * C.CellsPerBlock;
|
|
object size = new Size(DesiredHorizontalBlocks + 1 * C.BlockSizeInPixels.Width, DesiredVerticalBlocks + 1 * C.BlockSizeInPixels.Height);
|
|
AnchorInput.Right.Offset = size.Width;
|
|
AnchorInput.Bottom.Offset = size.Height;
|
|
int y = NextBlockRowToAdd;
|
|
/* UIB_1799 */
|
|
if (y >= DesiredVerticalBlocks)
|
|
goto UIB_180D;
|
|
int x = 0;
|
|
/* UIB_17AF */
|
|
if (x >= NextBlockColumnToAdd)
|
|
goto UIB_17F7;
|
|
/* UIB_17C0 */
|
|
if (!C.BlockDefinition.GetEnumerator().MoveNext())
|
|
goto UIB_17E0;
|
|
nowPlayingAlbumGridDefs:GridAlbumInfo info = (nowPlayingAlbumGridDefs:GridAlbumInfo)C.BlockDefinition.GetEnumerator().Current;
|
|
this.CreateCellAt(x, y, info);
|
|
goto UIB_17BD;
|
|
C.BlockDefinition.GetEnumerator();
|
|
object x = x + 1;
|
|
goto UIB_17A5;
|
|
object y = y + 1;
|
|
goto UIB_178F;
|
|
int x = NextBlockColumnToAdd;
|
|
/* UIB_1821 */
|
|
if (x >= DesiredHorizontalBlocks)
|
|
goto UIB_1895;
|
|
int y = 0;
|
|
/* UIB_1837 */
|
|
if (y >= DesiredVerticalBlocks)
|
|
goto UIB_187F;
|
|
/* UIB_1848 */
|
|
if (!C.BlockDefinition.GetEnumerator().MoveNext())
|
|
goto UIB_1868;
|
|
nowPlayingAlbumGridDefs:GridAlbumInfo info = (nowPlayingAlbumGridDefs:GridAlbumInfo)C.BlockDefinition.GetEnumerator().Current;
|
|
this.CreateCellAt(x, y, info);
|
|
goto UIB_1845;
|
|
C.BlockDefinition.GetEnumerator();
|
|
object y = y + 1;
|
|
goto UIB_182D;
|
|
object x = x + 1;
|
|
goto UIB_1817;
|
|
NextBlockColumnToAdd = DesiredHorizontalBlocks;
|
|
NextBlockRowToAdd = DesiredVerticalBlocks;
|
|
/* UIB_18B1 */
|
|
if (CellRepeater.Source != null)
|
|
goto UIB_18C0;
|
|
CellRepeater.Source = CellList;
|
|
goto UIB_18D0;
|
|
CellRepeater.Source = null;</Script>
|
|
<Script>[DeclareTrigger(ShowState.ChosenValue)]
|
|
/* UIB_18D4 */
|
|
if (!UseEffects)
|
|
goto UIB_1926;
|
|
/* UIB_18E6 */
|
|
if (#ShowState.ChosenValue # != "Faded")
|
|
goto UIB_18F6;
|
|
/* UIB_18F6 */
|
|
if (ShowState.ChosenValue != "Faded" || !!IsFaded)
|
|
goto UIB_190E;
|
|
IsFaded = true;
|
|
EffectsHost.RequestSource(null);
|
|
goto UIB_1926;
|
|
/* UIB_1911 */
|
|
if (!IsFaded)
|
|
goto UIB_1926;
|
|
IsFaded = false;
|
|
EffectsHost.RequestSource(typeof(nowPlayingMusicBackground:BlendedLightGraphic));</Script>
|
|
<Script>[DeclareTrigger(SwitchArtTimer.Tick)]
|
|
/* UIB_192F */
|
|
if (CellList == null)
|
|
goto UIB_1945;
|
|
/* UIB_1945 */
|
|
if ((CellList == null) || (CellList.Count <= 0))
|
|
goto UIB_1983;
|
|
object switchCell = Random.Next(0, CellList.Count - 1);
|
|
nowPlayingAlbumGridDefs:CellModel model = (nowPlayingAlbumGridDefs:CellModel)CellList[switchCell];
|
|
model.SwitchArt.Invoke();</Script>
|
|
<Script>[DeclareTrigger(ResetHideState.Invoked)]
|
|
HideState.Value = false;</Script>
|
|
</Scripts>
|
|
<Methods><![CDATA[
|
|
int CalculateCellLeft(nowPlayingAlbumGridDefs:CellModel model)
|
|
{
|
|
object blockOffset = model.BlockCoords.X * C.BlockSizeInPixels.Width;
|
|
object cellOffset = model.Info.X * C.CellSizeInPixels.Width;
|
|
return blockOffset + cellOffset;
|
|
}
|
|
|
|
int CalculateCellTop(nowPlayingAlbumGridDefs:CellModel model)
|
|
{
|
|
object blockOffset = model.BlockCoords.Y * C.BlockSizeInPixels.Height;
|
|
object cellOffset = model.Info.Y * C.CellSizeInPixels.Height;
|
|
return blockOffset + cellOffset;
|
|
}
|
|
|
|
void CreateCellAt(int x, int y, nowPlayingAlbumGridDefs:GridAlbumInfo info)
|
|
{
|
|
// Unsupported instruction: INIT 624
|
|
;
|
|
object cell = new nowPlayingAlbumGridDefs:CellModel();
|
|
cell.BlockCoords = new Point(x, y);
|
|
cell.Info = info;
|
|
CellList.Add(cell);
|
|
}
|
|
]]></Methods>
|
|
<Content>
|
|
<Panel>
|
|
<Children>
|
|
<Host Name="EffectsHost" />
|
|
<Repeater Name="CellRepeater" Layout="Form" ContentName="#InlineContent0.0">
|
|
<Margins>
|
|
<Inset Left="{BackgroundOffset.Width}" Top="{BackgroundOffset.Height}" />
|
|
</Margins>
|
|
</Repeater>
|
|
</Children>
|
|
</Panel>
|
|
</Content>
|
|
</UI>
|
|
<UI Name="BlendedLightGraphic">
|
|
<Locals>
|
|
<nowPlayingStyles:TimedPalettePicker Name="PalettePicker" Moods="{nowPlayingStyles:Moods.AllMoods}" PaletteChangeTime="20" />
|
|
<nowPlayingEffects:BackgroundLightingWithBlend Name="BackgroundLighting" PalettePicker="{PalettePicker}" />
|
|
</Locals>
|
|
<Scripts>
|
|
<Script>Background.Effect = BackgroundLighting;
|
|
PalettePicker.ChangeMood.Invoke();</Script>
|
|
</Scripts>
|
|
<Content>
|
|
<Graphic Name="Background" SizingPolicy="SizeToConstraint" StretchingPolicy="Fill" Content="{styles:Styles.TransparentPixel}">
|
|
<Animations>
|
|
<Animation Animation="{animations:Animations.NowPlayingGridFadeIn}" />
|
|
<Animation Animation="{animations:Animations.NowPlayingGridFadeOut}" />
|
|
</Animations>
|
|
</Graphic>
|
|
</Content>
|
|
</UI>
|
|
<UI Name="NowPlayingGridCell">
|
|
<Properties>
|
|
<nowPlayingAlbumGridDefs:CellModel Name="Model" CellModel="$Required" />
|
|
<Random Name="Random" Random="$Required" />
|
|
<iris:Choice Name="ShowState" Choice="$Required" />
|
|
<iris:BooleanChoice Name="HideState" BooleanChoice="$Required" />
|
|
<nowPlayingMusicBackground:AlbumArtMachine Name="ArtMachine" AlbumArtMachine="$Required" />
|
|
<iris:Command Name="ResetHideState" Command="{null}" />
|
|
</Properties>
|
|
<Locals>
|
|
<nowPlayingAlbumGridDefs:GridDefs Name="C" />
|
|
<TransformAnimation Name="ShowIntroAnimation" Delay="{((float)(Random.Next(0, animations:Animations.NowPlayingGrid_DelaySlices))) * 0.1 + animations:Animations.NowPlayingGrid_MinDelay}" Source="{animations:Animations.NowPlayingGridShow}" />
|
|
<TransformAnimation Name="FadeInAnimation" Delay="{((float)(Random.Next(0, animations:Animations.NowPlayingGrid_DelaySlices))) * 0.1 + animations:Animations.NowPlayingGrid_MinDelay}" Source="{animations:Animations.NowPlayingGridFadeIn}" />
|
|
<TransformAnimation Name="FadeOutAnimation" Delay="{((float)(Random.Next(0, animations:Animations.NowPlayingGrid_DelaySlices))) * 0.1 + animations:Animations.NowPlayingGrid_MinDelay}" Source="{animations:Animations.NowPlayingGridFadeOut}" />
|
|
<Animation Name="ShowFadedAnimation" Type="Show">
|
|
<Keyframes>
|
|
<AlphaKeyframe Time="0" Value="0" />
|
|
<AlphaKeyframe Time="0" Value="0" />
|
|
</Keyframes>
|
|
</Animation>
|
|
<Boolean Name="IsFaded" />
|
|
<schema:Album Name="Album" Album="{null}" />
|
|
<nowPlayingEffects:DesaturateEffect Name="MyEffect" />
|
|
</Locals>
|
|
<Scripts>
|
|
<Script>/* UIB_1D14 */
|
|
if (iris:Application.RenderingType == iris:RenderingType.GDI)
|
|
goto UIB_1D27;
|
|
/* UIB_1D27 */
|
|
if ((iris:Application.RenderingType == iris:RenderingType.GDI) || (iris:Application.RenderingQuality != iris:RenderingQuality.MaxQuality))
|
|
goto UIB_1D45;
|
|
AlbumArt.Effect = MyEffect;
|
|
AlbumArt.Alpha = 0.35;
|
|
goto UIB_1D4F;
|
|
GDIFader.Visible = true;</Script>
|
|
<Script>[DeclareTrigger(ArtMachine.Ready)]
|
|
/* UIB_1DA6 */
|
|
if (!#ArtMachine.Ready #)
|
|
goto UIB_1DB5;
|
|
Album = ArtMachine.OneMorePlease();</Script>
|
|
<Script>[DeclareTrigger(Album.AlbumArtSmall), DeclareTrigger(Album.AlbumArtLarge), DeclareTrigger(Album.AlbumArtSuperLarge)]
|
|
/* UIB_1DBE */
|
|
if (Album == null)
|
|
goto UIB_1DCD;
|
|
/* UIB_1DCD */
|
|
if (Album == null || !Album.HasAlbumArt)
|
|
goto UIB_1E4B;
|
|
/* UIB_1DE5 */
|
|
if (Model.Info.Size != C.OneByOne)
|
|
goto UIB_1DFC;
|
|
AlbumArt.Content = #Album.AlbumArtSmall #;
|
|
goto UIB_1E4B;
|
|
/* UIB_1E0F */
|
|
if (Model.Info.Size != C.ThreeByThree)
|
|
goto UIB_1E26;
|
|
AlbumArt.Content = #Album.AlbumArtLarge #;
|
|
goto UIB_1E4B;
|
|
/* UIB_1E39 */
|
|
if (Model.Info.Size != C.FourByFour)
|
|
goto UIB_1E4B;
|
|
AlbumArt.Content = #Album.AlbumArtSuperLarge #;</Script>
|
|
<Script>[DeclareTrigger(ShowState.ChosenValue)]
|
|
/* UIB_1D5D */
|
|
if (#ShowState.ChosenValue # != "Faded")
|
|
goto UIB_1D6D;
|
|
/* UIB_1D6D */
|
|
if (ShowState.ChosenValue != "Faded" || !!IsFaded)
|
|
goto UIB_1D87;
|
|
IsFaded = true;
|
|
CellPanel.PlayAnimation(FadeOutAnimation);
|
|
goto UIB_1D9F;
|
|
/* UIB_1D8A */
|
|
if (!IsFaded)
|
|
goto UIB_1D9F;
|
|
IsFaded = false;
|
|
CellPanel.PlayAnimation(FadeInAnimation);</Script>
|
|
<Script>[DeclareTrigger(Model.SwitchArt.Invoked)]
|
|
/* UIB_1E59 */
|
|
if (ShowState.ChosenValue == "Faded")
|
|
goto UIB_1E94;
|
|
Album = ArtMachine.OneMorePlease();
|
|
/* UIB_1E6E */
|
|
if (!Album.HasAlbumArt)
|
|
goto UIB_1E94;
|
|
HideState.Value = true;
|
|
/* UIB_1E85 */
|
|
if (ResetHideState == null)
|
|
goto UIB_1E94;
|
|
ResetHideState.Invoke(iris:InvokePolicy.AsynchronousLowPri);</Script>
|
|
</Scripts>
|
|
<Methods><![CDATA[
|
|
Size CalculateTileSize()
|
|
{
|
|
object width = C.CellSizeInPixels.Width * Model.Info.Size;
|
|
object height = C.CellSizeInPixels.Height * Model.Info.Size;
|
|
return new Size(width, height);
|
|
}
|
|
]]></Methods>
|
|
<Content>
|
|
<Panel Name="CellPanel" Padding="1" Layout="Form" Background="255, 0, 0, 0" MaximumSize="{this.CalculateTileSize()}">
|
|
<Animations>
|
|
<SwitchAnimation Type="Show" Expression="{ShowState}">
|
|
<Options>
|
|
<TransformAnimation Name="Intro" TransformAnimation="{ShowIntroAnimation}" />
|
|
<Animation Name="Faded" Animation="{ShowFadedAnimation}" />
|
|
</Options>
|
|
</SwitchAnimation>
|
|
<SwitchAnimation Type="Hide" Expression="{HideState}">
|
|
<Options>
|
|
<Animation Name="Fade" Animation="{animations:Animations.NowPlayingGridSwapAlbumOut}" />
|
|
</Options>
|
|
</SwitchAnimation>
|
|
</Animations>
|
|
<Children>
|
|
<Panel Name="GDIFader" Layout="Form" Visible="false" Background="255, 0, 0, 0" Alpha="0.65" />
|
|
<Graphic Name="AlbumArt" SizingPolicy="SizeToConstraint" StretchingPolicy="UniformToFill" AcquiringImage="{null}" ErrorImage="{null}">
|
|
<Animations>
|
|
<SwitchAnimation Type="ContentChangeShow" Expression="{ShowState}">
|
|
<Options>
|
|
<Animation Name="Normal" Animation="{animations:SpinAniminations.NowPlayingSpinClockwiseContentShow}" />
|
|
</Options>
|
|
</SwitchAnimation>
|
|
<SwitchAnimation Type="ContentChangeHide" Expression="{HideState}">
|
|
<Options>
|
|
<Animation Name="Fade" Animation="{animations:SpinAniminations.NowPlayingSpinClockwiseContentHide}" />
|
|
</Options>
|
|
</SwitchAnimation>
|
|
</Animations>
|
|
</Graphic>
|
|
</Children>
|
|
</Panel>
|
|
</Content>
|
|
</UI>
|
|
<Class Name="AlbumArtMachine">
|
|
<Properties>
|
|
<Int32 Name="MinimumAlbumsNeeded" Int32="5" />
|
|
<Int32 Name="DesiredNumberOfAlbums" Int32="20" />
|
|
<Boolean Name="EnoughAlbums" Boolean="false" />
|
|
<Boolean Name="Ready" Boolean="false" />
|
|
</Properties>
|
|
<Locals>
|
|
<Int32 Name="Index" Int32="0" />
|
|
<schema:LibraryAlbumQuery Name="AlbumQuery" />
|
|
<List Name="LocalAlbumArt" List="{null}" />
|
|
<zuneUI:TransportControls Name="TransportControls" TransportControls="{zuneUI:SingletonModelItem`1[ZuneUI.TransportControls].Instance}" />
|
|
</Locals>
|
|
<Scripts>
|
|
<Script>[DeclareTrigger(AlbumQuery.Status), DeclareTrigger(#AlbumQuery.Result #.IsEmpty), DeclareTrigger(AlbumQuery.Result.Items.Count)]
|
|
/* UIB_218A */
|
|
if (!zuneUI:QueryHelper.HasCompleted(#AlbumQuery.Status #) || !!#AlbumQuery.Result #.IsEmpty #)
|
|
goto UIB_21A6;
|
|
/* UIB_21A6 */
|
|
if ((!(zuneUI:QueryHelper.HasCompleted(AlbumQuery.Status)) || !(!AlbumQuery.Result.IsEmpty)) || (#AlbumQuery.Result.Items #.Count # <= 0))
|
|
goto UIB_21F2;
|
|
LocalAlbumArt = TransportControls.CreateAlbumListForBackground(AlbumQuery.Result.Items, DesiredNumberOfAlbums);
|
|
/* UIB_21C9 */
|
|
if (LocalAlbumArt == null)
|
|
goto UIB_21DF;
|
|
/* UIB_21DF */
|
|
if ((LocalAlbumArt == null) || (LocalAlbumArt.Count <= MinimumAlbumsNeeded))
|
|
goto UIB_21EB;
|
|
EnoughAlbums = true;
|
|
Ready = true;</Script>
|
|
</Scripts>
|
|
<Methods><![CDATA[
|
|
schema:Album OneMorePlease()
|
|
{
|
|
Null album = null;
|
|
/* UIB_2294 */
|
|
if (!!List.IsNullOrEmpty(LocalAlbumArt))
|
|
goto UIB_22DA;
|
|
/* UIB_22A6 */
|
|
if (Index < LocalAlbumArt.Count)
|
|
goto UIB_22B2;
|
|
Index = 0;
|
|
schema:Album album = (schema:Album)LocalAlbumArt[Index];
|
|
TransportControls.DisableSlowDataThumbnailExtraction(album);
|
|
Index = Index + 1;
|
|
return album;
|
|
}
|
|
]]></Methods>
|
|
</Class>
|
|
</UIX> |