Add UIX source samples from Zune Software v2.1

This commit is contained in:
Joshua Askharoun
2021-04-05 12:42:50 -05:00
parent 77ddf0360b
commit 4df9264e6d
121 changed files with 44242 additions and 1 deletions
+1 -1
View File
@@ -80,7 +80,7 @@ namespace ZuneUIXTools
{
// Highlight the error in the code editor
int offset = textEditor.Document.GetOffset(err.Line, err.Column);
textEditor.SelectionStart = offset + 1;
textEditor.SelectionStart = offset;
textEditor.SelectionLength = 1;
textEditor.ScrollTo(err.Line, err.Column);
};
+122
View File
@@ -0,0 +1,122 @@
<!-- Copyright (C) Microsoft Corporation. All rights reserved. -->
<UIX
xmlns="http://schemas.microsoft.com/2007/uix"
xmlns:iris="assembly://UIX/Microsoft.Iris"
xmlns:zune="assembly://ZuneShell/ZuneUI"
xmlns:styles="res://ZuneShellResources!Styles.uix"
xmlns:dialog="res://ZuneShellResources!Dialog.uix"
xmlns:core="res://ZuneShellResources!Controls.uix"
xmlns:linkButtons="res://ZuneShellResources!LinkButtons.uix"
xmlns:me="Me"
>
<Class Name="AboutDialog" Base="dialog:Dialog">
<Properties>
<String Name="ContentUI" String="res://ZuneShellResources!AboutDialog.uix#AboutDialogContentUI"/>
<iris:Command Name="Cancel" Description="{zune:Shell.LoadString(zune:StringId.IDS_DIALOG_OK)}"/>
<zune:WebHelpCommand Name="TechSupportLink"
Description="{zune:Shell.LoadString(zune:StringId.IDS_ABOUTDIALOG_TECHNICAL_SUPPORT_INFORMATION)}"
Url="http://www.zune.net/support/"
/>
<String Name="AccessibleDescription" String="{zune:Shell.LoadString(zune:StringId.IDS_ABOUTDIALOG_TITLE)}"/>
</Properties>
</Class>
<UI Name="AboutDialogContentUI" Base="dialog:DialogContentUI">
<Properties>
<me:AboutDialog Name="Dialog" AboutDialog="$Required"/>
</Properties>
<Scripts>
<Script>
if (iris:Application.RenderingType == iris:RenderingType.GDI)
{
GDIModeLabel.Visible = true;
GDIModeLabel.Content = zune:Shell.LoadString(zune:StringId.IDS_ABOUTDIALOG_GDI_MODE_NOTICE);
}
</Script>
</Scripts>
<Content>
<Panel Navigation="ContainAll,WrapAll" MaximumSize="360,0" Margins="10">
<Layout>
<FlowLayout ItemAlignment="Near" Orientation="Vertical"/>
</Layout>
<Children>
<core:Label Content="{zune:Shell.LoadString(zune:StringId.IDS_ABOUTDIALOG_TITLE)}" Style="{styles:SharedStyles.DialogHeaderStyle}" WordWrap="true"/>
<Panel Margins="10">
<Layout>
<FlowLayout Orientation="Horizontal"/>
</Layout>
<Children>
<Graphic Content="res://ZuneShellResources!ZuneColorLogo.png" StretchingPolicy="Uniform" SizingPolicy="SizeToContent"/>
<Panel Margins="10">
<Layout>
<DockLayout SizeToChildren="true" DefaultLayoutInput="Top"/>
</Layout>
<Children>
<core:Label Content="{zune:Shell.LoadString(zune:StringId.IDS_ABOUTDIALOG_COPYRIGHT_LINE1)}" Style="{styles:SharedStyles.DialogTextStyle}"/>
<core:Label Content="{zune:Shell.LoadString(zune:StringId.IDS_ABOUTDIALOG_COPYRIGHT_LINE2)}" Style="{styles:SharedStyles.DialogTextStyle}"/>
<core:Label Content="{zune:Shell.LoadString(zune:StringId.IDS_ABOUTDIALOG_COPYRIGHT_LINE3)}" Style="{styles:SharedStyles.DialogTextStyle}"/>
<Panel Layout="HorizontalFlow">
<Children>
<core:Label Content="{zune:Shell.LoadString(zune:StringId.IDS_ABOUTDIALOG_VERSION_HEADER)}" Style="{styles:SharedStyles.DialogTextStyle}"/>
<core:Label Content="{zune:Management.Instance.BuildNumber}" Margins="5,0,0,0" Style="{styles:SharedStyles.DialogTextStyle}"/>
</Children>
</Panel>
<Panel Layout="HorizontalFlow">
<Children>
<core:Label Content="{zune:Shell.LoadString(zune:StringId.IDS_ABOUTDIALOG_PRODUCT_ID)}" Style="{styles:SharedStyles.DialogTextStyle}"/>
<core:Label Content="{zune:SoftwareUpdates.PID}" Margins="5,0,0,0" Style="{styles:SharedStyles.DialogTextStyle}"/>
</Children>
</Panel>
<core:Label Name="GDIModeLabel" Visible="false" Style="{styles:SharedStyles.DialogTextStyle}"/>
</Children>
</Panel>
</Children>
</Panel>
<core:Label Content="{zune:Shell.LoadString(zune:StringId.IDS_ABOUTDIALOG_WARNING)}" Style="{styles:SharedStyles.DialogTextStyle}" WordWrap="true"/>
<Panel Layout ="VerticalFlow" Margins="0,10,0,0">
<Children>
<linkButtons:ExternalLink Model="{Dialog.TechSupportLink}" ToolTipEnabled="false" TileMinSize="160,16"/>
<core:BigActionButton Model="{Dialog.Cancel}" Margins="0,10,0,0" ToolTipEnabled="false" FocusOrder="0"/>
</Children>
</Panel>
</Children>
</Panel>
</Content>
</UI>
</UIX>
+160
View File
@@ -0,0 +1,160 @@
<!-- Copyright (C) Microsoft Corporation. All rights reserved. -->
<UIX
xmlns="http://schemas.microsoft.com/2007/uix"
xmlns:style="res://ZuneShellResources!Style.uix"
xmlns:styles="res://ZuneShellResources!Styles.uix"
xmlns:button="res://ZuneShellResources!Button.uix"
xmlns:core="res://ZuneShellResources!Controls.uix"
xmlns:zune="assembly://ZuneShell/ZuneUI"
xmlns:iris="assembly://UIX/Microsoft.Iris">
<UI Name="ActionProgressButton" Base="button:LabelButtonBase">
<Properties>
<Single Name="Progress" Single="-1.0"/>
<Image Name="Image" Image="{styles:Styles.Button}"/>
<Image Name="HoverImage" Image="{styles:Styles.ButtonHover}"/>
<Image Name="FocusImage" Image="{HoverImage}"/>
<Image Name="PressedImage" Image="{styles:Styles.ButtonPressed}"/>
<Image Name="DisabledImage" Image="{styles:Styles.ButtonDisabled}"/>
<Image Name="ProgressImage" Image="{styles:Styles.ButtonProgress}"/>
<Image Name="ProgressBackgroundImage" Image="{styles:Styles.ButtonProgressBackground}"/>
<style:Style Name="BaseStyle" Style="{styles:SharedStyles.ActionButtonStyle}"/>
<style:Style Name="ShadowStyle" Style="{styles:SharedStyles.ActionButtonShadowStyle}"/>
<style:Style Name="ProgressStyle" Style="{styles:SharedStyles.ActionButtonProgressStyle}"/>
<Inset Name="ButtonInset" Inset="10,1,9,1"/>
<Image Name="Icon" Image="{null}"/>
<iris:Command Name="Model" Command="$Required"/>
<button:CommandButtonProvider Name="Provider"/>
<Size Name="FixedHeight" Size="0,21"/>
<Size Name="ButtonFixedSize" Size="99,21" />
</Properties>
<Scripts>
<Script>Provider.Model = [Model];</Script>
<Script>IconGraphic.Content = [Icon];</Script>
<Script>
if (Model is zune:ProgressCommand)
{
Progress = [((zune:ProgressCommand)Model).Progress];
}
</Script>
<Script>
if ([Progress] &lt; 0.0 || [Progress] &gt; 1.0 || iris:Application.RenderingType == iris:RenderingType.GDI)
{
Label.Style = [Style];
ShadowLabel.Style = [ShadowStyle];
ShadowLabel.Visible = true;
if (![UI.FullyEnabled])
{
Background.Content = DisabledImage;
}
else
{
if ([Clicker.Clicking] &amp;&amp; [PressedImage] != null)
{
Background.Content = PressedImage;
}
else if ([UI.DeepMouseFocus] &amp;&amp; [HoverImage] != null)
{
Background.Content = HoverImage;
}
else if ([UI.DeepKeyFocus] &amp;&amp; [FocusImage] != null)
{
Background.Content = FocusImage;
}
else
{
Background.Content = [Image];
}
}
}
else
{
Background.Content = [ProgressBackgroundImage];
Label.Style = [ProgressStyle];
ShadowLabel.Visible = false;
}
</Script>
<Script>
if (iris:Application.RenderingType != iris:RenderingType.GDI)
{
float amountToHide = (1.0 - [Progress]) * (Single)(ButtonFixedSize.Width);
Clip.FarOffset = amountToHide * -1.0;
}
else
{
Clip.FarOffset = (Single)(ButtonFixedSize.Width) * -1.0;
}
</Script>
<Script>
ShadowLabel.Content = [Label.Content];
</Script>
</Scripts>
<Content>
<Panel MaximumSize="{ButtonFixedSize}">
<Children>
<Graphic Name="Background"
StretchingPolicy="Fill" SizingPolicy="SizeToChildren"
MinimumSize="{FixedHeight}" MaximumSize="{FixedHeight}"
Content="{Image}" ErrorImage="{null}" AcquiringImage="{null}"
Layout="Anchor">
<Children>
<Panel Name="LabelPanel" Layout="Anchor" Padding="{ButtonInset}">
<LayoutInput>
<AnchorLayoutInput Horizontal="Center" Vertical="Center"/>
</LayoutInput>
<Children>
<core:Label Name="Label" Style="{Style}">
<LayoutInput>
<AnchorLayoutInput Vertical="Center"/>
</LayoutInput>
</core:Label>
<core:Label Name="ShadowLabel" Style="{ShadowStyle}">
<LayoutInput>
<AnchorLayoutInput Left="Label,0,1" Top="Label,0,1"/>
</LayoutInput>
</core:Label>
<Graphic Name="IconGraphic" Margins="0,1,0,0">
<LayoutInput>
<AnchorLayoutInput Left="Label,1,2" Vertical="Center"/>
</LayoutInput>
</Graphic>
</Children>
</Panel>
<Clip Name="Clip" Orientation="Horizontal" ShowFar="true" FadeSize="0.1">
<Children>
<Graphic Content="{ProgressImage}" SizingPolicy="SizeToConstraint"/>
</Children>
</Clip>
</Children>
</Graphic>
</Children>
</Panel>
</Content>
</UI>
</UIX>
+150
View File
@@ -0,0 +1,150 @@
<!-- Copyright (C) Microsoft Corporation. All rights reserved. -->
<UIX
xmlns="http://schemas.microsoft.com/2007/uix"
xmlns:iris="assembly://UIX/Microsoft.Iris"
xmlns:zune="assembly://ZuneShell/ZuneUI"
xmlns:col="assembly://mscorlib/System.Collections"
xmlns:svc="assembly://ZuneDBApi/Microsoft.Zune.Service"
xmlns:data="res://ZuneMarketplaceResources!MarketplaceData.schema.xml"
xmlns:buy="res://ZuneMarketplaceResources!PurchaseDialog.uix"
xmlns:signin="res://ZuneShellResources!SignInDialog.uix"
>
<Class Name="AddToPlaylist">
<Properties>
<List Name="Items" List="{null}"/>
<Int32 Name="PlaylistId" Int32="-1"/>
<iris:Command Name="Start"/>
</Properties>
<Locals>
<signin:SignInDialog Name="SignInDialog" SignInDialog ="{null}"/>
<buy:PurchaseDialog Name="PurchaseDialog" PurchaseDialog="{null}"/>
<Command Name="PurchasePhase"/>
<Command Name="DownloadPhase"/>
<Boolean Name="ContentNotInLibrary" Boolean="false"/>
</Locals>
<Scripts>
<Script>
[DeclareTrigger(Start.Invoked)]
if (!List.IsNullOrEmpty(Items) &amp;&amp; Items.GetItem(0) is data:Track)
{
foreach(data:Track track in Items)
{
if (!ContentNotInLibrary &amp;&amp; (!track.InCollection &amp;&amp; !track.IsDownloading))
{
ContentNotInLibrary = true;
}
}
}
if (ContentNotInLibrary)
{
if (!zune:SignIn.Instance.SignedIn)
{
if (SignInDialog == null) SignInDialog = new signin:SignInDialog();
SignInDialog.OnSuccess = PurchasePhase;
SignInDialog.Helper.Show(SignInDialog);
}
else
{
PurchasePhase.Invoke();
}
}
else
{
DownloadPhase.Invoke();
}
</Script>
<Script>
[DeclareTrigger(PurchasePhase.Invoked)]
if (PurchaseDialog != null) Class.DisposeOwnedObject(PurchaseDialog);
PurchaseDialog = new buy:PurchaseDialog();
PurchaseDialog.Instance = PurchaseDialog;
if (ContentNotInLibrary)
{
foreach(data:Track track in Items)
{
if (!track.InCollection &amp;&amp; !track.CanDownload &amp;&amp; track.CanPurchase)
{
PurchaseDialog.TrackIds.Add(track.Id);
}
}
}
if (PurchaseDialog.TrackIds.Count > 0)
{
PurchaseDialog.OnSuccess = DownloadPhase;
PurchaseDialog.Helper.Show(PurchaseDialog);
}
else
{
DownloadPhase.Invoke();
}
</Script>
<Script>
[DeclareTrigger(DownloadPhase.Invoked)]
if (ContentNotInLibrary)
{
col:ArrayList trackGuids = new col:ArrayList(Items.Count);
foreach(data:Track track in Items)
{
if (track.CanDownload)
{
trackGuids.Add(track.Id);
}
}
if (trackGuids.Count > 0)
{
zune:Download.Instance.DownloadContent(null, trackGuids, null, svc:EContentRights.SubscriptionDownload);
}
ContentNotInLibrary = false;
}
zune:PlaylistManager.Instance.AddToPlaylist(PlaylistId, Items);
Items = null;
</Script>
</Scripts>
</Class>
</UIX>
+192
View File
@@ -0,0 +1,192 @@
<!-- Copyright (C) Microsoft Corporation. All rights reserved. -->
<UIX
xmlns="http://schemas.microsoft.com/2007/uix"
xmlns:iris="assembly://UIX/Microsoft.Iris"
xmlns:zune="assembly://ZuneShell/ZuneUI"
xmlns:zuneshell="assembly://ZuneShell/Microsoft.Zune.Shell"
xmlns:col="assembly://mscorlib/System.Collections"
xmlns:svc="assembly://ZuneDBApi/Microsoft.Zune.Service"
xmlns:data="res://ZuneMarketplaceResources!MarketplaceData.schema.xml"
xmlns:buy="res://ZuneMarketplaceResources!PurchaseDialog.uix"
xmlns:signin="res://ZuneShellResources!SignInDialog.uix"
>
<Class Name="AddToSync">
<Properties>
<List Name="Items" List="{null}"/>
<String Name="PlaylistName" String="{null}"/>
<iris:Command Name="Start"/>
</Properties>
<Locals>
<signin:SignInDialog Name="SignInDialog" SignInDialog ="{null}"/>
<buy:PurchaseDialog Name="PurchaseDialog" PurchaseDialog="{null}"/>
<iris:Command Name="PurchasePhase"/>
<iris:Command Name="DownloadPhase"/>
<Boolean Name="fContentNotInLibrary" Boolean="false"/>
</Locals>
<Scripts>
<Script>
[DeclareTrigger(Start.Invoked)]
if ( !List.IsNullOrEmpty( Items ) )
{
if ( Items.GetItem(0) is data:Track )
{
foreach(data:Track track in Items)
{
if (!fContentNotInLibrary &amp;&amp; (!track.InCollection &amp;&amp; !track.IsDownloading))
{
fContentNotInLibrary = true;
}
}
}
else if ( Items.GetItem(0) is data:Album )
{
fContentNotInLibrary = true;
}
}
if ( fContentNotInLibrary &amp;&amp; !zune:SignIn.Instance.SignedIn )
{
if (SignInDialog == null) SignInDialog = new signin:SignInDialog();
SignInDialog.OnSuccess = PurchasePhase;
SignInDialog.Helper.Show( SignInDialog );
}
else
{
PurchasePhase.Invoke();
}
</Script>
<Script>
[DeclareTrigger(PurchasePhase.Invoked)]
if (PurchaseDialog != null) Class.DisposeOwnedObject(PurchaseDialog);
PurchaseDialog = new buy:PurchaseDialog();
PurchaseDialog.Instance = PurchaseDialog;
if ( fContentNotInLibrary )
{
if (Items.GetItem(0) is data:Track)
{
foreach(data:Track track in Items)
{
if (!track.InCollection &amp;&amp; !track.IsDownloading &amp;&amp; !track.CanDownload &amp;&amp; track.CanPurchase)
{
PurchaseDialog.TrackIds.Add( track.Id );
}
}
}
if (Items.GetItem(0) is data:Album &amp;&amp; !zuneshell:ZuneApplication.Service.CanDownloadSubscriptionContent())
{
foreach(data:Album album in Items)
{
if (album.CanPurchase)
{
PurchaseDialog.AlbumIds.Add( album.Id );
}
}
}
}
if (PurchaseDialog.TrackIds.Count > 0 || PurchaseDialog.AlbumIds.Count > 0)
{
PurchaseDialog.OnSuccess = DownloadPhase;
PurchaseDialog.Helper.Show( PurchaseDialog );
}
else
{
DownloadPhase.Invoke();
}
</Script>
<Script>
[DeclareTrigger(DownloadPhase.Invoked)]
if ( PlaylistName != null )
{
zune:PlaylistResult result = zune:PlaylistManager.Instance.CreateAndAddToUniquePlaylist(PlaylistName, Items);
if (result.Error == zune:PlaylistError.Success)
{
zune:SyncControls.Instance.AddPlaylistSyncRule(result.PlaylistId);
}
}
else
{
zune:SyncControls.Instance.AddSyncRule(Items);
}
if ( fContentNotInLibrary )
{
col:ArrayList trackGuids = new col:ArrayList(Items.Count);
if (Items.GetItem(0) is data:Track)
{
foreach(data:Track track in Items)
{
if (track.CanDownload)
{
trackGuids.Add( track.Id );
}
}
}
col:ArrayList albumGuids = new col:ArrayList(Items.Count);
if (Items.GetItem(0) is data:Album &amp;&amp; zuneshell:ZuneApplication.Service.CanDownloadSubscriptionContent())
{
foreach(data:Album album in Items)
{
albumGuids.Add( album.Id );
}
}
if (trackGuids.Count > 0 || albumGuids.Count > 0)
{
zune:Download.Instance.DownloadContent( albumGuids, trackGuids, null, svc:EContentRights.SubscriptionDownload );
}
}
</Script>
</Scripts>
</Class>
</UIX>
File diff suppressed because it is too large Load Diff
+57
View File
@@ -0,0 +1,57 @@
<!-- Copyright (C) Microsoft Corporation. All rights reserved. -->
<UIX
xmlns="http://schemas.microsoft.com/2007/uix"
xmlns:iris="assembly://UIX/Microsoft.Iris"
xmlns:button="res://ZuneShellResources!Button.uix">
<UI Name="AnimatedIconButton" Base="button:IconButton">
<Properties>
<Boolean Name="Active" Boolean="False"/>
<Animation Name="IconActiveAnimation" Animation="{null}"/>
<Animation Name="IconIdleAnimation" Animation="{null}"/>
</Properties>
<Locals>
<iris:Choice Name="IconAnimationChoice">
<Options>
<String String="Active"/>
<String String="None"/>
</Options>
</iris:Choice>
<SwitchAnimation Name="ContentChangeAnimation" Type="ContentChangeShow" Expression="{IconAnimationChoice}">
<Options>
<Animation Name="Active" Animation="{IconActiveAnimation}"/>
</Options>
</SwitchAnimation>
<SwitchAnimation Name="IdleAnimation" Type="Idle" Expression="{IconAnimationChoice}">
<Options>
<Animation Name="Active" Animation="{IconIdleAnimation}"/>
</Options>
</SwitchAnimation>
</Locals>
<Scripts>
<Script>
IconAnimationChoice.Chosen = "None";
Background.AttachAnimation(ContentChangeAnimation);
Background.AttachAnimation(IdleAnimation);
</Script>
<Script>
[DeclareTrigger(Background.Content)]
IconAnimationChoice.Chosen = "None";
</Script>
<Script>
if ([Active])
IconAnimationChoice.Chosen = "Active";
else
IconAnimationChoice.Chosen = "None";
</Script>
</Scripts>
</UI>
</UIX>
File diff suppressed because it is too large Load Diff
+221
View File
@@ -0,0 +1,221 @@
<!-- Copyright (C) Microsoft Corporation. All rights reserved. -->
<UIX
xmlns="http://schemas.microsoft.com/2007/uix"
xmlns:zune="assembly://ZuneShell/ZuneUI"
xmlns:iris="assembly://UIX/Microsoft.Iris"
xmlns:sys="assembly://mscorlib/System"
xmlns:data="res://ZuneShellResources!LibraryData.schema.xml"
xmlns:core="res://ZuneShellResources!Controls.uix"
xmlns:panels="res://ZuneShellResources!LibraryPanels.uix"
xmlns:spreadsheet="res://ZuneShellResources!SpreadSheetViewBase.uix"
xmlns:lv="res://ZuneShellResources!ListViewPanel.uix"
xmlns:lib="res://ZuneShellResources!Library.uix"
xmlns:styles="res://ZuneShellResources!Styles.uix"
xmlns:me="Me">
<Class Name="ArtistPanelData" Shared="true">
<Properties>
<spreadsheet:ColumnData Name="ColumnData">
<Columns>
<spreadsheet:ColumnInfo HeaderType="{typeof(me:ArtistHeader)}"
CellType="{typeof(me:ArtistCell)}"
CellEditType="{typeof(me:ArtistEditCell)}"
Resizable="false"
CellPadding="26,0,5,0">
<LayoutInput>
<DockLayoutInput Position="Top"/>
</LayoutInput>
</spreadsheet:ColumnInfo>
</Columns>
</spreadsheet:ColumnData>
<iris:ArrayListDataSet Name="SortOptions">
<Source>
<zune:SortCommand Description="{zune:Shell.LoadString(zune:StringId.IDS_ASCENDING_SORT)}" Sort="+WM/AlbumArtist" SupportsJumpInList="true"/>
<zune:SortCommand Description="{zune:Shell.LoadString(zune:StringId.IDS_DESCENDING_SORT)}" Sort="-WM/AlbumArtist" SupportsJumpInList="true"/>
</Source>
</iris:ArrayListDataSet>
<panels:SortData Name="Sorts" Options="{SortOptions}" SaveKey="ArtistSort"/>
</Properties>
</Class>
<UI Name="ArtistsPanel" Base="panels:LibraryPanelBase">
<Properties>
<zune:MusicLibraryPage Name="Page" MusicLibraryPage="$Required"/>
<zune:ArtistsPanel Name="Model" ArtistsPanel="$Required"/>
<panels:SortData Name="SortData" SortData="{me:ArtistPanelData.Sorts}"/>
<spreadsheet:ColumnData Name="ColumnData" ColumnData="{me:ArtistPanelData.ColumnData}"/>
<Inset Name="ColumnMargin" Inset="18,0,0,0"/>
</Properties>
<Locals>
<data:LibraryArtistQuery Name="ArtistQuery" Enabled="false"
ShowDeviceContents="{Page.ShowDeviceContents}"/>
<List Name="LibraryContextMenuOptions">
<Source>
<iris:Command Command="{Play}"/>
<iris:Command Command="{AddToNowPlaying}"/>
<iris:Command Command="{AddToPlaylist}"/>
<iris:Command Command="{AddToBurnList}"/>
<core:MenuDivider/>
<iris:Command Command="{Edit}"/>
<iris:Command Command="{Delete}"/>
<core:MenuDivider MenuDivider="{SyncDivider}"/>
<iris:Command Command="{Sync}"/>
<iris:Command Command="{SyncAllUnexclude}"/>
</Source>
</List>
<List Name="DeviceContextMenuOptions">
<Source>
<iris:Command Command="{ReverseSync}"/>
<iris:Command Command="{DeleteFromDevice}"/>
</Source>
</List>
</Locals>
<Scripts>
<Script>
if (Page.ShowDeviceContents)
{
ArtistQuery.DeviceId = [Page.DeviceId];
}
</Script>
<Script>
if (Page.ShowDeviceContents)
{
ContextMenu.Options = DeviceContextMenuOptions;
DeleteKey.Command = DeleteFromDevice;
MinimumWidth = 65;
Worker.Margins = ColumnMargin;
}
else
{
ContextMenu.Options = LibraryContextMenuOptions;
Worker.ExecuteCommand = Play;
}
</Script>
<Script>
zune:SortCommand sort = (zune:SortCommand)[SortData.Sorts.Chosen];
ArtistQuery.Sort = sort.Sort;
SupportsJumpInList = sort.SupportsJumpInList;
</Script>
<Script>
Worker.SupportsJumpInList = [SupportsJumpInList];
</Script>
<Script>
ArtistQuery.Enabled = true;
</Script>
<Script>
Model.Content = [ArtistQuery.Result.Items];
</Script>
<Script>
Page.IsEmpty = [ArtistQuery.Result.IsEmpty];
</Script>
<Script>Worker.Content = [Model.Content];</Script>
<Script>
ToggleSelectAllCommand.Description = sys:String.Format(zune:Shell.LoadString(zune:StringId.IDS_ARTISTS_HEADER), [ArtistQuery.Result.Items.Count]);
</Script>
<Script>
[DeclareTrigger(SelectionManager.SelectedItems)]
if (SelectionManager.Count == 1)
{
data:Artist artist = (data:Artist)SelectionManager.SelectedItem;
Page.SetSelectedArtist(artist.Title, artist.MediaId);
}
else if (SelectionManager.SourceList != null)
{
Page.SetSelectedArtist("", "");
}
</Script>
<Script>
Page.AllArtistsSelected = [SelectionManager.Count] == [ArtistQuery.Result.Items.Count];
</Script>
</Scripts>
<Content>
<spreadsheet:SpreadSheet Name="Worker"
ListModel="{ListModel}"
Content="{Model.Content}"
ColumnData="{ColumnData}"
NavigateIntoArgs="{NavigateIntoArgs}"
SelectionManager="{SelectionManager}"
ContextMenu="{ContextMenu}"
EditContext="{EditContext}"
AllowHorizontalScrolling="false"
HeaderSpacing="22"
SelectedItemClicked="{Page.ArtistClicked}"
Margins="-24,0,-2,0"
ScrollbarMargins="0,0,11,0"
LayoutSpacing="{styles:Styles.LibraryListLayoutSpacing}"
RowSize="{styles:Styles.LibraryListItemSize}"
RowPadding="{styles:Styles.LibraryListItemMargins}"
/>
</Content>
</UI>
<UI Name="ArtistHeader" Base="spreadsheet:Cell">
<Properties>
<lib:LibraryListModel Name="ListModel" LibraryListModel="$Required"/>
</Properties>
<Content>
<lv:ColumnPanelHeader ToggleSelectAll="{ListModel.ToggleSelectAllCommand}" Sorts="{ListModel.Sorts}"
SizeToChildren="false"/>
</Content>
</UI>
<UI Name="ArtistCell" Base="spreadsheet:LabelCell">
<Scripts>
<Script>Content = [((data:Artist)Model).Title];</Script>
</Scripts>
</UI>
<UI Name="ArtistEditCell" Base="spreadsheet:LabelEditCell">
<Scripts>
<Script>
EditableText.Value = ((data:Artist)Model).Title;
</Script>
<Script>
[DeclareTrigger(CommitValue.Invoked)]
((data:Artist)Model).Title = EditableText.Value;
</Script>
</Scripts>
</UI>
</UIX>
File diff suppressed because it is too large Load Diff
+1183
View File
File diff suppressed because it is too large Load Diff
+282
View File
@@ -0,0 +1,282 @@
<!-- Copyright (C) Microsoft Corporation. All rights reserved. -->
<UIX xmlns="http://schemas.microsoft.com/2007/uix"
xmlns:iris="assembly://UIX/Microsoft.Iris"
xmlns:zune="assembly://ZuneShell/ZuneUI"
xmlns:sys="assembly://mscorlib/System"
xmlns:col="assembly://mscorlib/System.Collections"
xmlns:data="res://ZuneShellResources!LibraryData.schema.xml"
xmlns:me="Me">
<Class Name="CD">
<Properties>
<data:Album Name="DataAlbum" Album="{null}" />
<zune:CDAlbumCommand Name="CodeAlbum" CDAlbumCommand="{null}" />
<List Name="Tracks" List="{null}" />
<iris:Command Name="Play" />
<iris:Command Name="StartRip" Description="{zune:Shell.LoadString(zune:StringId.IDS_START_RIP_BUTTON)}"/>
<iris:Command Name="StopRip" Description="{zune:Shell.LoadString(zune:StringId.IDS_STOP_RIP_BUTTON)}"/>
<bool Name="Unknown" />
</Properties>
<Locals>
<data:LibraryAlbumByTOCQuery Name="AlbumQuery" Enabled="false"/>
<data:LibraryTrackQuery Name="TrackQuery" Enabled="false" DiscMediaView="true" Sort="+WM/TrackNumber" />
</Locals>
<Scripts>
<Script>
[InitialEvaluate(false)]
AlbumQuery.Enabled = false;
AlbumQuery.TOC = [CodeAlbum].TOC;
AlbumQuery.Enabled = true;
</Script>
<Script>
[DeclareTrigger(AlbumQuery.Result.Items.Count)]
if ((AlbumQuery.Result != null) &amp;&amp; !List.IsNullOrEmpty(AlbumQuery.Result.Items) &amp;&amp; (DataAlbum == null))
{
data:Album dataAlbum = (data:Album) AlbumQuery.Result.Items.get_Item(0);
CodeAlbum.LibraryID = dataAlbum.LibraryId;
DataAlbum = dataAlbum;
}
</Script>
<Script>
if (DataAlbum != null)
{
TrackQuery.Enabled = false;
TrackQuery.AlbumId = [DataAlbum.LibraryId];
TrackQuery.Enabled = true;
Tracks = TrackQuery.Result.Items;
}
</Script>
<Script>
if ((Tracks != null) &amp;&amp; ([Tracks.Count] > 0))
{
CodeAlbum.TrackCount = Tracks.Count;
int i = 0;
bool hasTracksToRip = false;
foreach(data:Track dataTrack in Tracks)
{
zune:CDAlbumTrack track = CodeAlbum.GetTrack(i);
i = i + 1;
if (dataTrack.InLibrary)
{
track.RipState = zune:RipState.InLibrary;
}
else
{
track.RipTrack = true;
hasTracksToRip = true;
}
}
if (hasTracksToRip &amp;&amp; CodeAlbum.InsertedDuringSession &amp;&amp; zune:Management.Instance.AutoCopyCD.Value)
{
StartRip.Invoke();
}
}
</Script>
<Script>
[DeclareTrigger(CodeAlbum.AutoPlayAction)]
[DeclareTrigger(Tracks.Count)]
if (Tracks != null &amp;&amp; Tracks.Count > 0)
{
if (CodeAlbum.AutoPlayAction == zune:CDAction.Rip)
{
StartRip.Invoke();
}
else if (CodeAlbum.AutoPlayAction == zune:CDAction.Play)
{
Play.Invoke();
}
CodeAlbum.ClearAutoPlayAction();
}
</Script>
<Script>
StartRip.Available = (CodeAlbum != null) &amp;&amp; ([CodeAlbum.RipCount] > 0);
</Script>
<Script>
[DeclareTrigger(Play.Invoked)]
if (Tracks != null &amp;&amp; Tracks.Count > 0)
{
zune:TransportControls.Instance.PlayItems(Tracks, 0);
}
</Script>
<Script>
[DeclareTrigger(StartRip.Invoked)]
if (CodeAlbum.RipCount > 0)
{
CodeAlbum.StartRip();
}
</Script>
<Script>
[DeclareTrigger(StopRip.Invoked)]
CodeAlbum.StopRip();
</Script>
<Script>
if (DataAlbum != null)
{
if ((DataAlbum.Title != null) &amp;&amp; DataAlbum.Title.StartsWith(me:Strings.UnknownAlbumPrefix))
{
CodeAlbum.Description = me:Strings.UnknownAlbum;
Unknown = true;
}
else
{
CodeAlbum.Description = [DataAlbum.Title];
}
}
</Script>
</Scripts>
</Class>
<Class Name="BurnList">
<Properties>
<String Name="Title"/>
<Int32 Name="PlaylistId" Int32="-1"/>
<Boolean Name="CanPlay"/>
<sys:TimeSpan Name="TotalTime"/>
<Int64 Name="TotalSize" Int64="{(Int64)0}"/>
</Properties>
<Scripts>
<Script>
[DeclareTrigger(PlaylistId)]
Title = zune:Shell.LoadString(zune:StringId.IDS_PLAYLIST_BURN_LIST);
</Script>
</Scripts>
</Class>
<Class Name="CDState" Shared="True">
<Properties>
<zune:CDAccess Name="CDAccess" CDAccess="{zune:CDAccess.Instance}"/>
<me:BurnList Name="TheBurnList" BurnList="{null}"/>
<bool Name="HasMedia"/>
<col:Hashtable Name="AlbumToCD"/>
</Properties>
<Locals>
<me:CD Name="PendingPlay" CD="{null}"/>
<me:CD Name="PendingRip" CD="{null}"/>
</Locals>
<Scripts>
<Script>
int burnListId = [CDAccess.BurnListId];
if (burnListId >= 0)
{
if (TheBurnList == null)
{
TheBurnList = new me:BurnList();
}
TheBurnList.PlaylistId = -1;
TheBurnList.PlaylistId = burnListId;
}
else if (TheBurnList != null)
{
Class.DisposeOwnedObject(TheBurnList);
TheBurnList = null;
}
</Script>
<Script>
[InitialEvaluate(true)]
[DeclareTrigger(zune:CDAccess.Instance.MediaChanged)]
List nodes = (List) zune:Shell.MainFrame.Disc.NodesList;
bool hasMedia = false;
if (nodes != null)
{
foreach(zune:CDAlbumCommand album in nodes)
{
if ((album != zune:Shell.MainFrame.Disc.NoCD) &amp;&amp; (album != zune:Shell.MainFrame.Disc.BurnList))
{
if (!AlbumToCD.Contains(album))
{
me:CD cd = new me:CD();
cd.CodeAlbum = album;
AlbumToCD.set_Item(album, cd);
}
hasMedia = true;
}
}
}
List discardedCDs = zune:CDAccess.Instance.DiscardedCDs;
if (discardedCDs != null)
{
foreach(zune:CDAlbumCommand album in discardedCDs)
{
me:CD cd = (me:CD)AlbumToCD.get_Item(album);
if (cd != null)
{
Class.DisposeOwnedObject(cd);
}
AlbumToCD.Remove(album);
}
zune:CDAccess.Instance.DiscardedCDs = null;
}
HasMedia = hasMedia;
</Script>
</Scripts>
</Class>
<Class Name="Strings" Shared="true">
<Properties>
<string Name="UnknownAlbum" string="{zune:Shell.LoadString(zune:StringId.IDS_MEDIASTORE_UNKNOWN_ALBUM)}"/>
<string Name="UnknownAlbumPrefix" string="{zune:Shell.LoadString(zune:StringId.IDS_MEDIASTORE_UNKNOWN_ALBUM_PREFIX)}"/>
</Properties>
</Class>
</UIX>
+1907
View File
File diff suppressed because it is too large Load Diff
+179
View File
@@ -0,0 +1,179 @@
<!-- Copyright (C) Microsoft Corporation. All rights reserved. -->
<UIX
xmlns="http://schemas.microsoft.com/2007/uix"
xmlns:iris="assembly://UIX/Microsoft.Iris"
xmlns:styles="res://ZuneShellResources!Styles.uix"
xmlns:me="Me">
<UI Name="Default">
<Content>
<me:CheckBox>
<Model>
<iris:BooleanChoice Description="Hello"/>
</Model>
</me:CheckBox>
</Content>
</UI>
<UI Name="CheckBox">
<Properties>
<iris:BooleanChoice Name="Model" BooleanChoice="$Required"/>
<Boolean Name="Available" Boolean="true"/>
<Boolean Name="WordWrap" Boolean="true"/>
<Size Name="BoxSize" Size="18,18"/>
<Boolean Name="KeyInteractive" Boolean="true"/>
<Image Name="BoxFocusImage" Source="res://ZuneShellResources!CheckBoxFocus.png"/>
<Image Name="BoxNonFocusImage" Source="res://ZuneShellResources!CheckBoxNonFocus.png"/>
<Image Name="BoxCheckedImage" Source="res://ZuneShellResources!CheckBoxChecked.png"/>
<Image Name="BoxDisabledImage" Image="res://ZuneShellResources!CheckBoxDisabled.png"/>
<Color Name="LabelColor" Color="{styles:Styles.TextActive}"/>
<Color Name="LabelFocusedColor" Color="{styles:Styles.TextActive}"/>
<Color Name="LabelHoverColor" Color="{styles:Styles.TextActive}"/>
<Color Name="LabelPressedColor" Color="{styles:Styles.TextActive}"/>
<Color Name="LabelDisabledColor" Color="{styles:Styles.TextInactive}"/>
<Font Name="LabelFont" Font="{styles:Styles.StandardSubHeaderText}"/>
<String Name="AccessibleDescription" String="{null}"/>
</Properties>
<Input>
<ClickHandler Name="Clicker" ClickType="LeftMouse, SpaceKey" />
</Input>
<Locals>
<Accessible Name="Accessible"/>
</Locals>
<Scripts>
<Script>
if (!KeyInteractive) Clicker.ClickType = ClickType.LeftMouse;
</Script>
<Script>UI.AllowDoubleClicks = false;</Script>
<Script>
if (Model != null)
{
Check.Visible = [Model.Value];
}
</Script>
<Script>
if (Model != null)
{
Label.Content = [Model.Description];
}
</Script>
<Script>
[DeclareTrigger(Clicker.Invoked)]
if (Model != null)
{
Model.Value = !Model.Value;
}
</Script>
<Script>
UI.Enabled = [Available];
</Script>
<Script>
if (![UI.FullyEnabled])
{
Box.Content = BoxDisabledImage;
Label.Color = LabelDisabledColor;
Check.Alpha = 0.5;
}
else
{
Check.Alpha = 1.0;
if ([Clicker.Clicking])
{
Label.Color = LabelPressedColor;
Box.Content = BoxFocusImage;
}
else if ([UI.MouseFocus])
{
Label.Color = LabelHoverColor;
Box.Content = BoxFocusImage;
}
else if ([UI.KeyFocus])
{
Label.Color = LabelFocusedColor;
Box.Content = BoxFocusImage;
}
else
{
Label.Color = LabelColor;
Box.Content = BoxNonFocusImage;
}
}
</Script>
<Script>
if ([Accessible.Enabled])
{
if (AccessibleDescription != null)
{
Accessible.Name = [AccessibleDescription];
}
else
{
Accessible.Name = [Label.Content];
}
if (Model != null)
{
Accessible.IsChecked = [Model.Value];
}
Accessible.Role = AccessibleRole.CheckButton;
}
</Script>
</Scripts>
<Content>
<Panel MouseInteractive="true">
<Layout>
<FlowLayout Orientation="Horizontal" ItemAlignment="Center"/>
</Layout>
<Children>
<Graphic Name="Box" Content="{BoxNonFocusImage}" MaximumSize="{BoxSize}" Layout="Form">
<Children>
<Graphic Name="Check" Content="{BoxCheckedImage}">
<LayoutInput>
<FormLayoutInput Left="Parent,0" Top="Parent,0"/>
</LayoutInput>
</Graphic>
</Children>
</Graphic>
<Text Name="Label" Color="{LabelColor}" Font="{LabelFont}" WordWrap="{WordWrap}" Margins="5,0,0,0"/>
</Children>
</Panel>
</Content>
</UI>
</UIX>
+60
View File
@@ -0,0 +1,60 @@
<!-- Copyright (C) Microsoft Corporation. All rights reserved. -->
<UIX
xmlns="http://schemas.microsoft.com/2007/uix"
xmlns:zune="assembly://ZuneShell/ZuneUI">
<Class Name="Navigation" Shared="true">
<Properties>
<zune:DictionaryCommandHandler Name="Root">
<Handlers>
<zune:MusicNavigationCommandHandler Name="Music"/>
<zune:VideoNavigationCommandHandler Name="Videos"/>
<zune:PodcastNavigationCommandHandler Name="Podcasts"/>
<zune:PlaylistNavigationCommandHandler Name="Playlists"/>
<zune:PhotoNavigationCommandHandler Name="Photos"/>
</Handlers>
</zune:DictionaryCommandHandler>
</Properties>
</Class>
<Class Name="DeviceNavigation" Shared="true">
<Properties>
<zune:DictionaryCommandHandler Name="Root">
<Handlers>
<zune:StatusNavigationCommandHandler Name="Status" />
<zune:MusicNavigationCommandHandler Name="Music" ShowDeviceContents="true" />
<zune:VideoNavigationCommandHandler Name="Videos" ShowDeviceContents="true" />
<zune:PodcastNavigationCommandHandler Name="Podcasts" ShowDeviceContents="true" />
<zune:PlaylistNavigationCommandHandler Name="Playlists" ShowDeviceContents="true" />
<zune:PhotoNavigationCommandHandler Name="Photos" ShowDeviceContents="true" />
</Handlers>
</zune:DictionaryCommandHandler>
</Properties>
</Class>
</UIX>
File diff suppressed because it is too large Load Diff
+367
View File
@@ -0,0 +1,367 @@
<!-- Copyright (C) Microsoft Corporation. All rights reserved. -->
<UIX
xmlns="http://schemas.microsoft.com/2007/uix"
xmlns:iris="assembly://UIX/Microsoft.Iris"
xmlns:zune="assembly://ZuneShell/ZuneUI"
xmlns:style="res://ZuneShellResources!Style.uix"
xmlns:styles="res://ZuneShellResources!Styles.uix"
xmlns:anim="res://ZuneShellResources!Animations.uix"
xmlns:popup="res://ZuneShellResources!Popup.uix"
xmlns:button="res://ZuneShellResources!Button.uix"
xmlns:me="Me"
>
<Class Name="ContextMenu" Base="popup:Popup">
<Properties>
<PopupLayoutInput Name="LayoutInput" Placement="MouseOrigin" />
<String Name="PopupUI" String="res://ZuneShellResources!ContextMenu.uix#ContextMenuUI"/>
<String Name="Title"/>
<List Name="Options"/>
<Object Name="SelectedItem" Object="{null}"/>
<Boolean Name="HideIfAllDisabled" Boolean="true"/>
</Properties>
<Scripts>
<Script>
Helper.IsModal = true;
Helper.DismissOnWindowDeactivate = true;
</Script>
<Script>
if ([Helper.IsVisible] &amp;&amp; HideIfAllDisabled)
{
bool anyEnabled = false;
if (Options != null)
{
foreach (object item in Options)
{
if (item is Command)
{
Command command = (Command)item;
if (command.Available)
{
if (!(command is zune:MenuItemCommand) || !((zune:MenuItemCommand)command).Hidden)
{
anyEnabled = true;
}
}
}
}
}
if (!anyEnabled)
{
Helper.Hide();
}
}
</Script>
</Scripts>
</Class>
<Class Name="MenuDivider" Shared="True">
<Properties>
<Boolean Name="Visible" Boolean="true"/>
</Properties>
</Class>
<Class Name="MenuIcon">
<Properties>
<Image Name="Icon" Image="$Required"/>
</Properties>
</Class>
<UI Name="ContextMenuUI" Base="popup:PopupUI">
<Properties>
<me:ContextMenu Name="Popup" ContextMenu="{null}" />
<Size Name="MinimumItemSize" Size="150,0"/>
<Boolean Name="StealFocusOnOpen" Boolean="true"/>
</Properties>
<Locals>
<SharedSize Name="SharedSize" MinimumSize="150,0" MaximumSize="250,0"/>
</Locals>
<Input>
<ClickHandler Name="Clicker" ClickType="LeftMouse,RightMouse"/>
<KeyHandler Name="Escape" Key="Escape" HandlerStage="Bubbled"/>
</Input>
<Scripts>
<Script>
if (StealFocusOnOpen)
{
Root.NavigateInto();
}
</Script>
<Script>
[DeclareTrigger(UI.DeepKeyFocus)]
if (!UI.DeepKeyFocus)
{
Popup.Helper.Hide();
}
</Script>
<Script>
[DeclareTrigger(Escape.Invoked)]
Popup.Helper.Hide();
</Script>
<Script>
string title = [Popup.Title];
Header.Content = title;
bool showHeader = !String.IsNullOrEmpty(title);
HeaderDivider.Visible = showHeader;
Header.Visible = showHeader;
</Script>
</Scripts>
<Content>
<Graphic Name="Root" Content="{styles:Styles.ContextMenuDropShadow}" Margins="-8,-8,-12,-12" Padding="8,8,12,12" SizingPolicy="SizeToChildren">
<Animations>
<Animation Animation="{anim:Animations.MenuFadeIn}"/>
<Animation Animation="{anim:Animations.MenuFadeOut}"/>
</Animations>
<Children>
<Panel MouseInteractive="true" Padding="0,6,0,10" MinimumSize="150,0" MaximumSize="250,0">
<Layout>
<DockLayout SizeToChildren="true" DefaultLayoutInput="Top,Near"/>
</Layout>
<Children>
<me:DefaultFocus/>
<button:Label Name="Header" SharedSize="{SharedSize}" SharedSizePolicy="SharesWidth,ContributesToWidth" Style="{styles:SharedStyles.MenuItemHeaderStyle}" Padding="10,0,10,0"/>
<me:DividerUI Name="HeaderDivider" SharedSize="{SharedSize}" SharedSizePolicy="SharesWidth,ContributesToWidth" Padding="6,6,6,6"/>
<Repeater Name="Repeater" Source="{Popup.Options}" Navigation="ContainAll,WrapVertical,WrapTabOrder">
<Layout>
<DockLayout SizeToChildren="true" DefaultLayoutInput="Top,Near"/>
</Layout>
<ContentSelectors>
<TypeSelector Type="{typeof(iris:Command)}" ContentName="CommandItem"/>
<TypeSelector Type="{typeof(me:MenuDivider)}" ContentName="DividerItem"/>
<TypeSelector Type="{typeof(me:MenuIcon)}" ContentName="IconItem"/>
</ContentSelectors>
</Repeater>
</Children>
</Panel>
</Children>
</Graphic>
</Content>
<Content Name="CommandItem">
<me:ContextMenuItem SharedSize="{SharedSize}" SharedSizePolicy="SharesWidth,ContributesToWidth" Model="{(iris:Command)RepeatedItem}" ContextMenu="{Popup}" MinimumSize="{MinimumItemSize}">
<Visible>
<Script>
if (RepeatedItem is zune:MenuItemCommand)
return !((zune:MenuItemCommand)RepeatedItem).Hidden;
return true;
</Script>
</Visible>
</me:ContextMenuItem>
</Content>
<Content Name="DividerItem">
<me:DividerUI
SharedSize="{SharedSize}"
SharedSizePolicy="SharesWidth,ContributesToWidth"
Padding="6,6,6,6"
Visible="{((me:MenuDivider)RepeatedItem).Visible}"
/>
</Content>
<Content Name="IconItem">
<me:IconUI SharedSize="{SharedSize}" Icon="{((me:MenuIcon)RepeatedItem).Icon}" SharedSizePolicy="SharesWidth,ContributesToWidth"/>
</Content>
</UI>
<UI Name="DividerUI">
<Content>
<ColorFill MinimumSize="50,1" Content="{styles:Styles.ColumnDivider}">
</ColorFill>
</Content>
</UI>
<UI Name="IconUI">
<Properties>
<Image Name="Icon" Image="$Required"/>
</Properties>
<Content>
<Graphic Content="{Icon}" StretchingPolicy="None"/>
</Content>
</UI>
<UI Name="DefaultFocus">
<Scripts>
<Script>
UI.KeyInteractive = true;
UI.CreateInterestOnFocus = false;
</Script>
</Scripts>
<Content>
<Panel MinimumSize="1,1"/>
</Content>
</UI>
<UI Name="ContextMenuItem" Base="me:ContextMenuItemBase">
<Properties>
<iris:Command Name="Model" Command="$Required"/>
<button:CommandButtonProvider Name="Provider"/>
</Properties>
<Scripts>
<Script>Provider.Model = [Model];</Script>
</Scripts>
</UI>
<UI Name="ContextMenuItemBase" Base="button:LabelButtonWithBackground">
<Properties>
<Object Name="Model" Object="$Required"/>
<me:ContextMenu Name="ContextMenu" ContextMenu="$Required"/>
<Color Name="BackgroundSelectedColor" Color="{styles:Styles.LightGray}"/>
<style:Style Name="BaseStyle" Style="{styles:SharedStyles.MenuItemStyle}"/>
<Inset Name="LabelMargins" Inset="10,1,10,1"/>
<Boolean Name="ShowToolTipWhenClipped" Boolean="true"/>
</Properties>
<Scripts>
<Script> Clicker.ClickType = (ClickType)"LeftMouse,RightMouse,Key"; </Script>
<Script>
UI.KeyFocusOnMouseEnter = true;
UI.CreateInterestOnFocus = false;
</Script>
<Script>
if ([UI.DeepMouseFocus])
{
ContextMenu.SelectedItem = Model;
}
else
{
ContextMenu.SelectedItem = null;
}
</Script>
<Script>
if ([UI.DeepKeyFocus])
{
ContextMenu.SelectedItem = Model;
}
</Script>
<Script>
Style.State.Disabled = ![Provider.Available];
</Script>
<Script>
bool selected = ([ContextMenu.SelectedItem] == Model);
Provider.Selected = selected;
if (selected)
{
Background.Content = BackgroundSelectedColor;
}
else
{
Background.Content = BackgroundColor;
}
Clicker.Enabled = selected;
</Script>
<Script>
[DeclareTrigger(Clicker.Invoked)]
ContextMenu.Helper.Hide();
</Script>
</Scripts>
</UI>
</UIX>
+77
View File
@@ -0,0 +1,77 @@
<!-- Copyright (C) Microsoft Corporation. All rights reserved. -->
<UIX
xmlns="http://schemas.microsoft.com/2007/uix"
xmlns:core="res://ZuneShellResources!CoreControls.uix"
xmlns:filter="res://ZuneShellResources!FilterList.uix"
xmlns:listcore="res://ZuneShellResources!ContentList.uix"
xmlns:list="res://ZuneShellResources!ListView.uix"
xmlns:gallery="res://ZuneShellResources!GalleryView.uix">
<UI Name="Label" Base="core:Label"/>
<UI Name="AnimatedLabel" Base="core:AnimatedLabel"/>
<UI Name="Button" Base="core:Button"/>
<UI Name="MenuButton" Base="core:MenuButton"/>
<UI Name="InputButton" Base="core:InputButton"/>
<UI Name="IconButton" Base="core:IconButton"/>
<UI Name="PressAndHoldIconButton" Base="core:PressAndHoldIconButton"/>
<UI Name="AnimatedIconButton" Base="core:AnimatedIconButton"/>
<UI Name="ToggleIconButton" Base="core:ToggleIconButton"/>
<UI Name="ButtonWithIcon" Base="core:ButtonWithIcon"/>
<UI Name="ActionButtonWithIcon" Base="core:ActionButtonWithIcon"/>
<UI Name="ThumbnailButton" Base="core:ThumbnailButton"/>
<UI Name="ThumbnailButtonOverlay" Base="core:ThumbnailButtonOverlay"/>
<UI Name="ThumbnailCaptionArea" Base="core:ThumbnailCaptionArea"/>
<UI Name="ThumbnailIconCaptionArea" Base="core:ThumbnailIconCaptionArea"/>
<UI Name="ActionButton" Base="core:ActionButton"/>
<UI Name="ToggleActionButton" Base="core:ToggleActionButton"/>
<UI Name="BigActionButton" Base="core:BigActionButton"/>
<Class Name="ModelButtonProvider" Base="core:ModelButtonProvider"/>
<Class Name="Icon" Base="core:Icon"/>
<UI Name="Editbox" Base="core:Editbox"/>
<UI Name="CheckBox" Base="core:CheckBox"/>
<UI Name="RadioGroup" Base="core:RadioGroup"/>
<UI Name="MCRadioGroup" Base="core:MCRadioGroup"/>
<UI Name="RadioButton" Base="core:RadioButton"/>
<UI Name="ScrollBar" Base="core:ScrollBar"/>
<UI Name="ContentListBase" Base="listcore:ContentListBase"/>
<UI Name="ScrollingContentListBase" Base="listcore:ScrollingContentListBase"/>
<UI Name="ListItemBase" Base="listcore:ListItemBase"/>
<UI Name="LabelListItemBase" Base="listcore:LabelListItemBase"/>
<UI Name="ThumbnailListItemBase" Base="listcore:ThumbnailListItemBase"/>
<Class Name="ListItemContext" Base="listcore:ListItemContext"/>
<Class Name="NavigateIntoIndexRequest" Base="listcore:NavigateIntoIndexRequest"/>
<UI Name="ReorderableListBase" Base="listcore:ReorderableListBase"/>
<UI Name="DropZone" Base="listcore:DropZone"/>
<UI Name="ItemDropZone" Base="listcore:ItemDropZone"/>
<UI Name="Indicator" Base="listcore:Indicator"/>
<UI Name="FilterList" Base="filter:FilterList"/>
<UI Name="ListView" Base="list:ListView"/>
<UI Name="GalleryView" Base="gallery:GalleryView"/>
<UI Name="ScrollBar" Base="core:ScrollBar"/>
<UI Name="Slider" Base="core:Slider"/>
<UI Name="ChoiceSlider" Base="core:ChoiceSlider"/>
<UI Name="LabeledChoiceSlider" Base="core:LabeledChoiceSlider"/>
<UI Name="PagingControl" Base="core:PagingControl"/>
<UI Name="PrevNextArrows" Base="core:PrevNextArrows"/>
<UI Name="SplitPanel" Base="core:SplitPanel"/>
<UI Name="Splitter" Base="core:Splitter"/>
<Class Name="SplitterPositions" Base="core:SplitterPositions"/>
<Class Name="ContextMenu" Base="core:ContextMenu"/>
<Class Name="MenuDivider" Base="core:MenuDivider"/>
<UI Name="TextArea" Base="core:TextArea" />
<UI Name="ToolbarIconBase" Base="core:ToolbarIconBase"/>
</UIX>
+74
View File
@@ -0,0 +1,74 @@
<!-- Copyright (C) Microsoft Corporation. All rights reserved. -->
<UIX
xmlns="http://schemas.microsoft.com/2007/uix"
xmlns:button="res://ZuneShellResources!Button.uix"
xmlns:thumbnail="res://ZuneShellResources!ThumbnailButton.uix"
xmlns:edit="res://ZuneShellResources!EditBox.uix"
xmlns:check="res://ZuneShellResources!Checkbox.uix"
xmlns:radio="res://ZuneShellResources!RadioButton.uix"
xmlns:scroll="res://ZuneShellResources!ScrollBar.uix"
xmlns:pager="res://ZuneShellResources!PagingControl.uix"
xmlns:slider="res://ZuneShellResources!Slider.uix"
xmlns:splitter="res://ZuneShellResources!Splitter.uix"
xmlns:contextmenu="res://ZuneShellResources!ContextMenu.uix"
xmlns:textarea="res://ZuneShellResources!TextArea.uix"
xmlns:toolbaricon="res://ZuneShellResources!ToolbarIcon.uix"
xmlns:animatedIconButton="res://ZuneShellResources!AnimatedIconButton.uix"
>
<UI Name="ButtonBase" Base="button:ButtonBase"/>
<UI Name="LabelButtonBase" Base="button:LabelButtonBase"/>
<UI Name="LabelButtonWithBackground" Base="button:LabelButtonWithBackground"/>
<UI Name="Button" Base="button:Button"/>
<UI Name="MenuButton" Base="button:MenuButton"/>
<UI Name="InputButton" Base="button:InputButton"/>
<UI Name="IconButton" Base="button:IconButton"/>
<UI Name="PressAndHoldIconButton" Base="button:PressAndHoldIconButton"/>
<UI Name="AnimatedIconButton" Base="animatedIconButton:AnimatedIconButton"/>
<UI Name="ToggleIconButton" Base="button:ToggleIconButton"/>
<UI Name="Label" Base="button:Label"/>
<UI Name="AnimatedLabel" Base="button:AnimatedLabel"/>
<UI Name="ButtonWithIcon" Base="button:ButtonWithIcon"/>
<UI Name="ActionButtonWithIcon" Base="button:ActionButtonWithIcon"/>
<UI Name="ActionButton" Base="button:ActionButton"/>
<UI Name="ToggleActionButton" Base="button:ToggleActionButton"/>
<UI Name="BigActionButton" Base="button:BigActionButton"/>
<Class Name="ModelButtonProvider" Base="button:ModelButtonProvider"/>
<Class Name="Icon" Base="button:Icon"/>
<UI Name="ThumbnailButton" Base="thumbnail:ThumbnailButton"/>
<UI Name="ThumbnailButtonBase" Base="thumbnail:ThumbnailButtonBase"/>
<UI Name="ThumbnailButtonOverlay" Base="thumbnail:ThumbnailButtonOverlay"/>
<UI Name="ThumbnailCaptionArea" Base="thumbnail:ThumbnailCaptionArea"/>
<UI Name="ThumbnailIconCaptionArea" Base="thumbnail:ThumbnailIconCaptionArea"/>
<UI Name="Editbox" Base="edit:Editbox"/>
<UI Name="CheckBox" Base="check:CheckBox"/>
<UI Name="RadioGroup" Base="radio:RadioGroup"/>
<UI Name="MCRadioGroup" Base="radio:MCRadioGroup"/>
<UI Name="RadioButton" Base="radio:RadioButton"/>
<UI Name="ScrollControl" Base="scroll:ScrollControl"/>
<UI Name="ScrollBar" Base="scroll:ScrollBar"/>
<UI Name="Slider" Base="slider:Slider"/>
<UI Name="ChoiceSlider" Base="slider:ChoiceSlider"/>
<UI Name="LabeledChoiceSlider" Base="slider:LabeledChoiceSlider"/>
<UI Name="SplitPanel" Base="splitter:SplitPanel"/>
<UI Name="Splitter" Base="splitter:Splitter"/>
<Class Name="SplitterPositions" Base="splitter:Positions"/>
<UI Name="PagingControl" Base="pager:PagingControl"/>
<UI Name="PrevNextArrows" Base="pager:PrevNextArrows"/>
<Class Name="ContextMenu" Base="contextmenu:ContextMenu"/>
<Class Name="MenuDivider" Base="contextmenu:MenuDivider"/>
<UI Name="TextArea" Base="textarea:TextArea" />
<UI Name="ToolbarIconBase" Base="toolbaricon:ToolbarIconBase"/>
</UIX>
+361
View File
@@ -0,0 +1,361 @@
<!-- Copyright (C) Microsoft Corporation. All rights reserved. -->
<UIX
xmlns="http://schemas.microsoft.com/2007/uix"
xmlns:iris="assembly://UIX/Microsoft.Iris"
xmlns:zune="assembly://ZuneShell/ZuneUI"
xmlns:core="res://ZuneShellResources!Controls.uix"
xmlns:styles="res://ZuneShellResources!Styles.uix"
xmlns:me="Me"
>
<UI Name="Default">
<Properties>
<zune:CategoryPage Name="Page" CategoryPage="$Required" />
</Properties>
<Locals>
<iris:Command Name="InstallNow" Description="{me:Strings.Install}"/>
<iris:Command Name="CancelUpdate" Description="{me:Strings.Cancel}"/>
<iris:RangedValue Name="ProgressModel" MinValue="0.0" MaxValue="100.0"/>
<Timer AutoRepeat="false" Interval="300000" Name="Timer" Enabled="false"/>
<zune:FirmwareUpdate Name="Model" FirmwareUpdate="{zune:FirmwareUpdate.Instance}"/>
<bool Name="IsAvailable" bool="{Model.IsAvailable}"/>
<bool Name="Updating" bool="false"/>
<styles:LabelStyle Name="TextAreaStyle" Color="{styles:Styles.SettingsTextActive}" Font="{styles:Styles.StandardSubHeaderText}"/>
</Locals>
<Scripts>
<Script>
if (Model.NavigatedToWizardModeInvoked)
{
InstallNow.Invoke();
}
</Script>
<Script>
bool showDeviceOptions = true;
if (!Page.IsWizard)
{
bool currentDeviceConnected = [zune:SyncControls.Instance.CurrentDeviceConnected];
bool connectedViaUSB = [zune:SyncSetupManager.Instance.ConnectedViaUSB];
if (!currentDeviceConnected || !connectedViaUSB)
{
showDeviceOptions = false;
if (!connectedViaUSB)
{
DeviceNotUpdatableText.Content = me:Strings.USBOnly;
}
else
{
DeviceNotUpdatableText.Content = me:Strings.ExistingOnly;
}
}
}
DeviceUpdatable.Visible = showDeviceOptions;
DeviceNotUpdatable.Visible = !showDeviceOptions;
</Script>
<Script>
if (IsAvailable)
{
UpdateHeader.Visible = true;
}
else
{
SuccessHeader.Visible = true;
}
</Script>
<Script>
[DeclareTrigger(InstallNow.Invoked)]
if (!Page.IsWizard)
{
Model.NavigateToWizardMode();
}
else
{
bool success = Model.InvokeFirmwareUpdate();
if (!success)
{
Model.NavigatedToWizardModeInvoked = false;
zune:Shell.DefaultInstance.NavigateBack();
if (Model.Error.IsError)
{
zune:Shell.ShowErrorDialog(Model.Error.Int, me:Strings.Failure);
}
}
else
{
Timer.Start();
Page.CancelButton = CancelUpdate;
Page.CancelButton.Available = false;
Page.AllowAdvance = false;
Updating = true;
}
}
</Script>
<Script>
[DeclareTrigger(CancelUpdate.Invoked)]
Updating = false;
Page.CancelButton = null;
Model.CancelFirmwareUpdate();
Page.CancelButton.Invoke();
</Script>
<Script>
CurrentFirmwareVersion.Content = me:Strings.CurrentVersion.Format(Model.FirmwareVersionOnDevice);
</Script>
<Script>
bool isRequired = Model.IsRequired;
String newVersion = Model.NewFirmwareVersion;
String requiredText;
if( isRequired )
{
requiredText = me:Strings.NewVersionRequired;
}
else
{
requiredText = me:Strings.NewVersionOptional;
}
NewFirmwareVersion.Content = requiredText.Format(newVersion);
UpdateRequired.Visible = isRequired;
Page.AllowAdvance = !isRequired;
Page.AllowSkip = !isRequired &amp;&amp; [IsAvailable];
</Script>
<Script>
[DeclareTrigger(Timer.Tick)]
Page.CancelButton.Available = true;
</Script>
<Script>
ProgressDisplay.Content = [Model.FirmwareUpdateProgressStatus];
</Script>
<Script>
bool inProgress = [Model.UpdateInProgress];
bool available = [IsAvailable];
bool success = false;
if (Updating &amp;&amp; !inProgress)
{
Updating = false;
Page.CancelButton = null;
success = Model.Error.IsSuccess;
if (success)
{
Page.AllowAdvance = true;
Page.AllowSkip = false;
if (Model.NavigatedToWizardModeInvoked)
{
Model.NavigatedToWizardModeInvoked = false;
zune:Shell.DefaultInstance.NavigateBack();
}
}
else
{
zune:Shell.ShowErrorDialog(Model.Error.Int, me:Strings.Failure);
}
}
if (success || !available)
{
SuccessHeader.Visible = true;
Success.Visible = true;
UpdateHeader.Visible = false;
FirmwareVersion.Content = me:Strings.UpdatingVersion.Format(Model.FirmwareVersionOnDevice);
Size.Content = me:Strings.Size.Format(Model.DeviceCapacity);
}
PreInstall.Visible = available &amp;&amp; !inProgress &amp;&amp; !success;
DuringInstall.Visible = inProgress;
</Script>
<Script>
float progressPercentage = (float)[Model.FirmwareUpdateProgressPercentage];
ProgressModel.Value = progressPercentage;
ProgressPercentage.Content = me:Strings.Percentage.Format(progressPercentage);
</Script>
<Script>
ProgressPanel.Visible = [Model.ProgressPercentageInMotion];
</Script>
</Scripts>
<Content>
<Panel>
<Children>
<Panel Name="DeviceUpdatable" Visible="false">
<Layout>
<FlowLayout Orientation="Vertical" Spacing="4,0" StripAlignment="Near"/>
</Layout>
<Children>
<Text Name="SuccessHeader"
Content="{me:Strings.Success}"
Color="{styles:Styles.SettingsTextActive}"
Font="{styles:Styles.SettingsTextSubHeader}"
Visible="false"
WordWrap="false"/>
<Panel Name="UpdateHeader" Visible="false">
<Layout>
<FlowLayout Orientation="Vertical" Spacing="4,0" StripAlignment="Near"/>
</Layout>
<Children>
<Text Name="PreText"
Content="{me:Strings.VersionPreText}"
Color="{styles:Styles.SettingsTextActive}"
Font="{styles:Styles.ZegoeBold12}"
WordWrap="false"/>
<Text Name="CurrentFirmwareVersion"
Color="{styles:Styles.SettingsTextActive}"
Font="{styles:Styles.ZegoeSemiBold10}"
WordWrap="false"/>
<Text Name="NewFirmwareVersion"
Color="{styles:Styles.SettingsTextActive}"
Font="{styles:Styles.ZegoeSemiBold10}"
WordWrap="false"
Padding="0,0,0,15"/>
<core:TextArea Name="FirmwareDescription"
Text="{Model.FirmwareDescription}"
MaximumSize="375,200"
Style="{TextAreaStyle}"
Padding="0,0,0,15"/>
</Children>
</Panel>
<Panel Name="PreInstall" Visible="false">
<Layout>
<FlowLayout Orientation="Vertical" Spacing="4,0" StripAlignment="Near"/>
</Layout>
<Children>
<Text Name="UpdateRequired"
Content="{me:Strings.Required}"
Visible="false"
Color="{styles:Styles.WarningColor}"
Font="{styles:Styles.SettingsText}"
WordWrap="true"
Padding="0,0,0,15"/>
<core:ActionButton Name="InstallButton" Model="{InstallNow}"/>
</Children>
</Panel>
<Panel Name="DuringInstall" Visible="false">
<Layout>
<FlowLayout Orientation="Vertical" Spacing="4,0" StripAlignment="Near"/>
</Layout>
<Children>
<Panel Name="ProgressPanel">
<Layout>
<FlowLayout Orientation="Horizontal" Spacing="4,0" StripAlignment="Near" ItemAlignment="Center"/>
</Layout>
<Children>
<Panel MaximumSize="300,0">
<Children>
<core:Slider Name="ProgressBar"
Model="{ProgressModel}"
FilledBackgroundImage="{styles:Styles.SliderFill}"
MinimumSize="16,16"
ReadOnly="true"/>
</Children>
</Panel>
<Text Name="ProgressPercentage" Color="{styles:Styles.SettingsTextActive}" Font="{styles:Styles.SettingsTextHeader}"/>
</Children>
</Panel>
<Text Content="{me:Strings.Preparing}"
Name="ProgressDisplay"
Color="{styles:Styles.SettingsTextActive}"
Font="{styles:Styles.SettingsText}"
WordWrap="true"
Padding="0,0,0,15"/>
</Children>
</Panel>
<Panel Name="Success" Visible="false">
<Layout>
<FlowLayout Orientation="Vertical" Spacing="4,0" StripAlignment="Near"/>
</Layout>
<Children>
<Text Name="Size"
Color="{styles:Styles.SettingsTextActive}"
Font="{styles:Styles.SettingsText}"
WordWrap="true"/>
<Text Name="FirmwareVersion"
Color="{styles:Styles.SettingsTextActive}"
Font="{styles:Styles.SettingsText}"
WordWrap="true"/>
</Children>
</Panel>
</Children>
</Panel>
<Panel Name="DeviceNotUpdatable" Visible="false">
<Children>
<Text Name="DeviceNotUpdatableText"
Content="{me:Strings.ExistingOnly}" Color="{styles:Styles.SettingsTextActive}"
Font="{styles:Styles.SettingsText}" WordWrap="true"/>
</Children>
</Panel>
</Children>
</Panel>
</Content>
</UI>
<Class Name="Strings" Shared="true">
<Properties>
<string Name="Install" string="{zune:Shell.LoadString(zune:StringId.IDS_INSTALL_BUTTON)}" />
<string Name="Cancel" string="{zune:Shell.LoadString(zune:StringId.IDS_CANCEL_BUTTON)}" />
<string Name="VersionPreText" string="{zune:Shell.LoadString(zune:StringId.IDS_FIRMWARE_VERSION_PRE_TEXT)}" />
<string Name="CurrentVersion" string="{zune:Shell.LoadString(zune:StringId.IDS_FIRMWARE_CURRENT_VERSION)}" />
<string Name="NewVersionRequired" string="{zune:Shell.LoadString(zune:StringId.IDS_FIRMWARE_NEW_VERSION_REQUIRED)}" />
<string Name="NewVersionOptional" string="{zune:Shell.LoadString(zune:StringId.IDS_FIRMWARE_NEW_VERSION_OPTIONAL)}" />
<string Name="UpdatingVersion" string="{zune:Shell.LoadString(zune:StringId.IDS_FIRMWARE_UPDATING_VERSION)}" />
<string Name="Failure" string="{zune:Shell.LoadString(zune:StringId.IDS_FIRMWARE_UPDATE_FAILURE)}" />
<string Name="Percentage" string="{zune:Shell.LoadString(zune:StringId.IDS_FIRMWARE_UPDATE_PROGRESS)}" />
<string Name="Required" string="{zune:Shell.LoadString(zune:StringId.IDS_FIRMWARE_UPDATE_WARNING)}" />
<string Name="Preparing" string="{zune:Shell.LoadString(zune:StringId.IDS_FIRMWARE_UPDATE_PREPARING)}" />
<string Name="Success" string="{zune:Shell.LoadString(zune:StringId.IDS_FIRMWARE_UPDATE_SUCCESS)}" />
<string Name="Size" string="{zune:Shell.LoadString(zune:StringId.IDS_FIRMWARE_UPDATE_SIZE)}" />
<string Name="ExistingOnly" string="{zune:Shell.LoadString(zune:StringId.IDS_OPTION_FOR_EXISTING_ONLY)}" />
<string Name="USBOnly" string="{zune:Shell.LoadString(zune:StringId.IDS_OPTION_FOR_USB_ONLY)}" />
</Properties>
</Class>
</UIX>

Some files were not shown because too many files have changed in this diff Show More