Initial decomp work

This commit is contained in:
Joshua Askharoun
2021-04-10 12:27:52 -05:00
parent 44f5ecac48
commit 180e272ca8
19 changed files with 873 additions and 97 deletions
@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace ZuneUIXTools.ViewModels
{
public class CompiledUIXDocumentViewModel : DocumentViewModelBase
{
public CompiledUIXDocumentViewModel(string fileName) : base(fileName)
{
Content = File.ReadAllBytes(fileName);
}
private byte[] _content = null;
public byte[] Content
{
get
{
if (FileName != null)
_content = File.ReadAllBytes(FileName);
return _content;
}
set => SetProperty(ref _content, value);
}
private string _uiRoot;
public string UIRoot
{
get => _uiRoot;
set => SetProperty(ref _uiRoot, value);
}
}
}
@@ -0,0 +1,19 @@
using Microsoft.Toolkit.Mvvm.ComponentModel;
namespace ZuneUIXTools.ViewModels
{
public abstract class DocumentViewModelBase : ObservableObject
{
public DocumentViewModelBase(string fileName)
{
FileName = fileName;
}
private string _FileName;
public string FileName
{
get => _FileName;
set => SetProperty(ref _FileName, value);
}
}
}
@@ -8,8 +8,8 @@ namespace ZuneUIXTools.ViewModels
{
public class IrisProjectViewModel : ObservableObject
{
private ObservableCollection<UIXDocumentViewModel> _uixDocuments;
public ObservableCollection<UIXDocumentViewModel> UIXDocuments
private ObservableCollection<DocumentViewModelBase> _uixDocuments;
public ObservableCollection<DocumentViewModelBase> UIXDocuments
{
get => _uixDocuments;
set => SetProperty(ref _uixDocuments, value);
@@ -22,8 +22,8 @@ namespace ZuneUIXTools.ViewModels
set => SetProperty(ref _name, value);
}
private UIXDocumentViewModel _selectedDocument;
public UIXDocumentViewModel SelectedDocument
private DocumentViewModelBase _selectedDocument;
public DocumentViewModelBase SelectedDocument
{
get => _selectedDocument;
set => SetProperty(ref _selectedDocument, value);
@@ -4,21 +4,13 @@ using System.IO;
namespace ZuneUIXTools.ViewModels
{
public class UIXDocumentViewModel : ObservableObject
public class UIXDocumentViewModel : DocumentViewModelBase
{
public UIXDocumentViewModel(string fileName)
public UIXDocumentViewModel(string fileName) : base(fileName)
{
FileName = fileName;
Content = File.ReadAllText(fileName);
}
private string _FileName;
public string FileName
{
get => _FileName;
set => SetProperty(ref _FileName, value);
}
private string _content = null;
public string Content
{
@@ -3,6 +3,16 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>preview</LangVersion>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>uixtools.pfx</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
+3 -3
View File
@@ -15,7 +15,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IrisProjTemplate", "VSIX\Ir
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UIXBuildTask", "VSIX\UIXBuildTask\UIXBuildTask.csproj", "{1FF973F0-C293-439C-83F8-D2C02B624C2D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZuneUIXTools.ViewModels", "ZuneUIXTools.ViewModels\ZuneUIXTools.ViewModels.csproj", "{707AA11C-6D10-4CF2-9852-73FC3D33EF02}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ZuneUIXTools.ViewModels", "ZuneUIXTools.ViewModels\ZuneUIXTools.ViewModels.csproj", "{707AA11C-6D10-4CF2-9852-73FC3D33EF02}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -51,8 +51,8 @@ Global
{B4EEF46A-3235-42BD-9540-7AAA03BAC77D}.Release|x64.Build.0 = Release|Any CPU
{854495B4-B684-47AC-9771-A644BF47B2FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{854495B4-B684-47AC-9771-A644BF47B2FF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{854495B4-B684-47AC-9771-A644BF47B2FF}.Debug|x64.ActiveCfg = Debug|x64
{854495B4-B684-47AC-9771-A644BF47B2FF}.Debug|x64.Build.0 = Debug|x64
{854495B4-B684-47AC-9771-A644BF47B2FF}.Debug|x64.ActiveCfg = Debug|Any CPU
{854495B4-B684-47AC-9771-A644BF47B2FF}.Debug|x64.Build.0 = Debug|Any CPU
{854495B4-B684-47AC-9771-A644BF47B2FF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{854495B4-B684-47AC-9771-A644BF47B2FF}.Release|Any CPU.Build.0 = Release|Any CPU
{854495B4-B684-47AC-9771-A644BF47B2FF}.Release|x64.ActiveCfg = Release|x64
+4
View File
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true"/>
</configuration>
+22 -12
View File
@@ -34,6 +34,11 @@
<Image Source="Images/SaveAs_16x.png" Height="16" Width="16"/>
</syncfusion:MenuItemAdv.Icon>
</syncfusion:MenuItemAdv>
<syncfusion:MenuItemAdv Header="Decompile..." Click="Decompile_Click">
<syncfusion:MenuItemAdv.Icon>
<Image Source="Images/SaveAs_16x.png" Height="16" Width="16"/>
</syncfusion:MenuItemAdv.Icon>
</syncfusion:MenuItemAdv>
</syncfusion:MenuItemAdv>
<syncfusion:MenuItemAdv Header="Edit" />
<syncfusion:MenuItemAdv Header="Build">
@@ -61,12 +66,25 @@
<syncfusion:DockingManager x:Name="DockingManager" Grid.Row="2" ContainerMode="TDI">
<ContentControl x:Name="SolutionExplorer" syncfusion:DockingManager.Header="Solution Explorer"
syncfusion:DockingManager.State="Dock" syncfusion:DockingManager.SideInDockedMode="Right"/>
syncfusion:DockingManager.State="Dock" syncfusion:DockingManager.SideInDockedMode="Right"
syncfusion:DockingManager.DesiredWidthInDockedMode="200">
<syncfusion:TreeViewAdv>
<syncfusion:TreeViewItemAdv Header="Hello">
<syncfusion:TreeViewItemAdv Header="Subhello"/>
</syncfusion:TreeViewItemAdv>
</syncfusion:TreeViewAdv>
</ContentControl>
<ContentControl x:Name="ToolBox" syncfusion:DockingManager.Header="Toolbox"
syncfusion:DockingManager.State="AutoHidden"/>
<ContentControl x:Name="Properties" syncfusion:DockingManager.Header="Properties"
syncfusion:DockingManager.State="AutoHidden"/>
<ContentControl x:Name="ErrorList" syncfusion:DockingManager.Header="Error List"
<ContentControl x:Name="Properties" syncfusion:DockingManager.Header="Properties" syncfusion:DockingManager.State="AutoHidden">
<StackPanel>
<CheckBox x:Name="IncludeInProject" Content="Include in project"/>
</StackPanel>
</ContentControl>
<ContentControl x:Name="ErrorList" syncfusion:DockingManager.Header="Error List" syncfusion:DockingManager.DesiredHeightInDockedMode="200"
syncfusion:DockingManager.State="Dock" syncfusion:DockingManager.SideInDockedMode="Bottom">
<ScrollViewer Grid.Row="3">
<StackPanel Name="ErrorPanel" Margin="4,4,4,0"/>
@@ -74,13 +92,5 @@
</ContentControl>
</syncfusion:DockingManager>
<!--<GridSplitter Grid.Row="2"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
Background="LightGray"
ShowsPreview="True"
Height="5" />-->
</Grid>
</Window>
+94 -43
View File
@@ -4,7 +4,9 @@ using ICSharpCode.AvalonEdit.Highlighting;
using ICSharpCode.AvalonEdit.Highlighting.Xshd;
using ICSharpCode.AvalonEdit.Rendering;
using Microsoft.Iris;
using Microsoft.Iris.Data;
using Microsoft.Iris.Markup;
using Microsoft.Iris.OS;
using Microsoft.Iris.Session;
using System;
using System.Collections;
@@ -34,13 +36,14 @@ namespace ZuneUIXTools
/// </summary>
public partial class MainWindow : Window
{
private const string FILE_FORMAT_FILTER = "Microsoft Iris UI (*.uix)|*.uix|XML files (*.xml)|*.xml";
private const string SOURCE_FILE_FORMAT_FILTER = "Microsoft Iris UI (*.uix)|*.uix|XML files (*.xml)|*.xml";
private const string COMPILED_FILE_FORMAT_FILTER = "Microsoft Iris Compiled UI (*.uib)|*.uib";
private readonly FontFamily CODE_FONT = new FontFamily("JetBrains Mono");
public IrisProjectViewModel IrisProject { get; } = new IrisProjectViewModel
{
Name = "IrisApp1",
UIXDocuments = new System.Collections.ObjectModel.ObservableCollection<UIXDocumentViewModel>()
UIXDocuments = new System.Collections.ObjectModel.ObservableCollection<DocumentViewModelBase>()
};
public MainWindow()
@@ -63,9 +66,12 @@ namespace ZuneUIXTools
}
private void AddDocument(string fileName, bool addToProject = true, bool addToUI = true)
=> AddDocument(new UIXDocumentViewModel(fileName), addToProject, addToUI);
private void AddDocument(DocumentViewModelBase doc, bool addToProject = true, bool addToUI = true)
{
if (addToProject && !IrisProject.UIXDocuments.Any(doc => doc.FileName == fileName))
IrisProject.UIXDocuments.Add(new UIXDocumentViewModel(fileName));
if (addToProject && !IrisProject.UIXDocuments.Any(oldDoc => doc.FileName == oldDoc.FileName))
IrisProject.UIXDocuments.Add(doc);
if (!addToUI)
return;
@@ -73,18 +79,18 @@ namespace ZuneUIXTools
// SyntaxHighlighting="XML" FontFamily="JetBrains Mono" FontSize="10pt" />
var editor = new TextEditor()
{
Tag = fileName,
Tag = doc.FileName,
SyntaxHighlighting = HighlightingManager.Instance.GetDefinition("XML"),
Padding = new Thickness(4),
ShowLineNumbers = true,
FontFamily = CODE_FONT,
FontSize = 10
FontSize = 15
};
editor.Load(fileName);
editor.Load(doc.FileName);
DockingManager.Children.Add(editor);
editor.GotFocus += EditorGotFocus;
Syncfusion.Windows.Tools.Controls.DockingManager.ChangeState(editor, Syncfusion.Windows.Tools.Controls.DockState.Document);
Syncfusion.Windows.Tools.Controls.DockingManager.SetHeader(editor, System.IO.Path.GetFileName(fileName));
Syncfusion.Windows.Tools.Controls.DockingManager.SetHeader(editor, System.IO.Path.GetFileName(doc.FileName));
}
private FrameworkElement GetDocumentUI(string fileName)
@@ -115,22 +121,6 @@ namespace ZuneUIXTools
private void MainWindow_Loaded(object sender, RoutedEventArgs e)
{
IrisProject.UIXDocuments.CollectionChanged += UIXDocuments_CollectionChanged;
}
private void UIXDocuments_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
{
if (e.OldItems != null)
foreach (UIXDocumentViewModel doc in e.OldItems)
RemoveDocument(doc.FileName, removeFromProject: false);
if (e.NewItems != null)
foreach (UIXDocumentViewModel doc in e.NewItems)
AddDocument(doc.FileName, addToProject: false);
}
private void BuildAndRun()
{
Dispatcher.Invoke(() => ErrorPanel.Children.Clear());
MarkupSystem.Startup(true);
ErrorManager.OnErrors += (IList errors) => {
@@ -140,7 +130,6 @@ namespace ZuneUIXTools
#if DEBUG
System.Diagnostics.Debug.WriteLine(err.Message);
//System.Diagnostics.Debugger.Break();
#else
Console.WriteLine(err.Message);
#endif
@@ -155,7 +144,7 @@ namespace ZuneUIXTools
if (err.Line >= 0 && err.Column >= 0)
{
errBlock.MouseDown += (object sender, MouseButtonEventArgs args) =>
errBlock.MouseDown += (object s, MouseButtonEventArgs args) =>
{
try
{
@@ -175,7 +164,21 @@ namespace ZuneUIXTools
});
}
};
}
private void UIXDocuments_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
{
if (e.OldItems != null)
foreach (UIXDocumentViewModel doc in e.OldItems)
RemoveDocument(doc.FileName, removeFromProject: false);
if (e.NewItems != null)
foreach (UIXDocumentViewModel doc in e.NewItems)
AddDocument(doc.FileName, addToProject: false);
}
private void BuildAndRun()
{
string sourceFile = IrisProject.SelectedDocument.FileName;
string compiledFile = System.IO.Path.ChangeExtension(sourceFile, "uib");
bool isSuccess = false;
@@ -223,7 +226,7 @@ namespace ZuneUIXTools
try
{
string uiRoot = IrisProject.SelectedDocument.UIRoot;
string uiRoot = (IrisProject.SelectedDocument as UIXDocumentViewModel)?.UIRoot;
Application.Window.SetBackgroundColor(new WindowColor(0xE6, 0xE6, 0xE6));
Application.Window.RequestLoad("file://" + compiledFile + (string.IsNullOrEmpty(uiRoot) ? string.Empty : "#" + uiRoot));
Application.Window.CloseRequested += (object sender, WindowCloseRequestedEventArgs args) =>
@@ -246,21 +249,41 @@ namespace ZuneUIXTools
}
}
private void Decompile()
{
string compiledFile = IrisProject.SelectedDocument.FileName;
try
{
Application.Initialize();
}
catch { }
try
{
Application.Window.RequestLoad("file://" + compiledFile);// + (string.IsNullOrEmpty(uiRoot) ? string.Empty : "#" + uiRoot));
InterpreterContext.UseDecompile = true;
Application.Run();
InterpreterContext.UseDecompile = false;
File.WriteAllText(System.IO.Path.ChangeExtension(compiledFile, ".decomp.uix"), InterpreterContext.DecompileResult.InnerXml);
}
catch (Exception ex)
{
Dispatcher.Invoke(() =>
{
System.Windows.MessageBox.Show(
$"Failed to decompile '{compiledFile}'",
"Zune UIX Tools", MessageBoxButton.OK, MessageBoxImage.Error
);
});
}
}
private void Build_Click(object sender, RoutedEventArgs e)
{
var doc = IrisProject.SelectedDocument;
if (doc == null)
return;
// Save changes before running
((TextEditor)GetDocumentUI(doc.FileName)).Save(doc.FileName);
// Set UI root
doc.UIRoot = UIRootBox.Text;
var _buildThread = new Thread(new ThreadStart(BuildAndRun));
_buildThread.SetApartmentState(ApartmentState.STA);
_buildThread.IsBackground = true;
_buildThread.Start();
// TODO: Build the project without running it
BuildAndRun_Click(sender, e);
}
private void BuildAndRun_Click(object sender, RoutedEventArgs e)
@@ -271,8 +294,17 @@ namespace ZuneUIXTools
// Save changes before running
((TextEditor)GetDocumentUI(doc.FileName)).Save(doc.FileName);
// Set UI root
doc.UIRoot = UIRootBox.Text;
if (doc is UIXDocumentViewModel uixDoc)
uixDoc.UIRoot = UIRootBox.Text;
else if (doc is CompiledUIXDocumentViewModel uibDoc)
uibDoc.UIRoot = UIRootBox.Text;
else
throw new ArgumentException();
// Clear error list
ErrorPanel.Children.Clear();
var _buildThread = new Thread(new ThreadStart(BuildAndRun));
_buildThread.SetApartmentState(ApartmentState.STA);
@@ -284,7 +316,7 @@ namespace ZuneUIXTools
{
OpenFileDialog openFileDialog = new OpenFileDialog
{
Filter = FILE_FORMAT_FILTER
Filter = SOURCE_FILE_FORMAT_FILTER
};
if (openFileDialog.ShowDialog() != System.Windows.Forms.DialogResult.OK)
return;
@@ -308,7 +340,7 @@ namespace ZuneUIXTools
SaveFileDialog saveFileDialog = new SaveFileDialog
{
Filter = FILE_FORMAT_FILTER,
Filter = SOURCE_FILE_FORMAT_FILTER,
FileName = IrisProject.SelectedDocument.FileName
};
if (saveFileDialog.ShowDialog() != System.Windows.Forms.DialogResult.OK)
@@ -318,5 +350,24 @@ namespace ZuneUIXTools
editor.Save(saveFileDialog.FileName);
AddDocument(saveFileDialog.FileName);
}
private void Decompile_Click(object sender, RoutedEventArgs e)
{
OpenFileDialog openFileDialog = new OpenFileDialog
{
Filter = COMPILED_FILE_FORMAT_FILTER
};
if (openFileDialog.ShowDialog() != System.Windows.Forms.DialogResult.OK)
return;
AddDocument(openFileDialog.FileName, addToUI: false);
IrisProject.SelectedDocument = new CompiledUIXDocumentViewModel(openFileDialog.FileName);
var _decompThread = new Thread(new ThreadStart(Decompile));
_decompThread.SetApartmentState(ApartmentState.STA);
_decompThread.IsBackground = true;
_decompThread.Start();
}
}
}
@@ -0,0 +1,51 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<UseWPF>true</UseWPF>
</PropertyGroup>
<UsingTask AssemblyFile="lib\UIXBuildTask.dll" TaskName="UIXBuild" />
<ItemGroup>
<UIXSources Include="**\*.uix" />
</ItemGroup>
<ItemGroup>
<None Remove="UIX.renderapi.dll" />
<None Remove="UIXrender.dll" />
<None Remove="UIXsup.dll" />
</ItemGroup>
<ItemGroup>
<ContentWithTargetPath Include="lib\UIX.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>UIX.dll</TargetPath>
</ContentWithTargetPath>
<ContentWithTargetPath Include="lib\UIX.renderapi.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>UIX.renderapi.dll</TargetPath>
</ContentWithTargetPath>
<ContentWithTargetPath Include="lib\UIXrender.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>UIXrender.dll</TargetPath>
</ContentWithTargetPath>
<ContentWithTargetPath Include="lib\UIXsup.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>UIXsup.dll</TargetPath>
</ContentWithTargetPath>
<Reference Include="UIX">
<HintPath>lib\UIX.dll</HintPath>
</Reference>
<Reference Include="UIX.RenderApi">
<HintPath>lib\UIX.renderapi.dll</HintPath>
</Reference>
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition="true">
<UIXBuild SourceFiles="@(UIXSources)" CompiledOutputDir="$(TargetDir)Resources" MSBuildArchitecture="x64" />
</Target>
</Project>
+15 -19
View File
@@ -2,9 +2,16 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net48</TargetFramework>
<UseWPF>true</UseWPF>
<ApplicationIcon>Images\VCSIrisProject.ico</ApplicationIcon>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>uixtools.pfx</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<ItemGroup>
@@ -13,10 +20,6 @@
</Content>
</ItemGroup>
<ItemGroup>
<None Remove="Images\VCSIrisProject.png" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AvalonEdit" Version="6.1.1" />
<PackageReference Include="Syncfusion.SfSkinManager.WPF" Version="19.1.0.54" />
@@ -35,21 +38,14 @@
</ItemGroup>
<ItemGroup>
<Reference Include="UIX.RenderApi">
<HintPath>..\lib\UIX.renderapi.dll</HintPath>
</Reference>
<LibFiles Include="lib\**\*.*" />
<None Update="lib\UIX.renderapi.dll" />
<None Update="lib\UIXrender.dll" />
<None Update="lib\UIXsup.dll" />
</ItemGroup>
<ItemGroup>
<None Update="lib\UIX.renderapi.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="lib\UIXrender.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="lib\UIXsup.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<Target Name="CopyCustomContent" AfterTargets="AfterBuild">
<Copy SourceFiles="@(LibFiles)" DestinationFolder="$(OutDir)" SkipUnchangedFiles="true" />
</Target>
</Project>
Binary file not shown.
+97
View File
@@ -0,0 +1,97 @@
<!-- 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">
<UI Name="Default">
<Content>
<me:AboutDialog/>
</Content>
</UI>
<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 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 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:ZuneShell.DefaultInstance.Management.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>
Binary file not shown.
File diff suppressed because it is too large Load Diff
+1
View File
@@ -0,0 +1 @@
<UI Name="Default"><Content><Text Color="A=255, R=255, G=0, B=0" Content="Howdy from Microsoft.Iris!" /></Content></UI>
+1
View File
@@ -0,0 +1 @@
<UI Name="Default" />
BIN
View File
Binary file not shown.
+6 -6
View File
@@ -1,8 +1,8 @@
<UIX xmlns="http://schemas.microsoft.com/2007/uix"
xmlns:me="Me">
<UI Name="TextDisplay">
<!-- This UI displays the other UIs. -->
<UI Name="Default">
<!-- This UI displays the other UIs. TextDisplay -->
<Locals>
<Font Name="SmallFont" Font="Bahnschrift,10" />
@@ -28,7 +28,7 @@
<Content>
<Panel Layout="VerticalFlow" MaximumSize="140,0">
<Children>
<Text HighlightColor="Gold" Font="{me:BigFont}" MaximumLines="3" WordWrap="true" Content="This large text will wrap. This sentence won't be displayed because it exceeds the 3 line maximum." />
<Text HighlightColor="Gold" Font="Bahnschrift" MaximumLines="3" WordWrap="true" Content="This large text will wrap. This sentence won't be displayed because it exceeds the 3 line maximum." />
</Children>
</Panel>
</Content>
@@ -39,8 +39,8 @@
<Content>
<Panel Layout="VerticalFlow">
<Children>
<Text Color="Aquamarine" Font="{me:SmallFont}" Content="You can use margins to create space between text items:" />
<Text Margins="0,20,0,0" Color="SkyBlue" Font="{me:SmallFont}" Content="This sentence has a top margin of 20 pixels." />
<Text Color="Aquamarine" Font="Bahnschrift" Content="You can use margins to create space between text items:" />
<Text Margins="0,20,0,0" Color="SkyBlue" Font="Bahnschrift" Content="This sentence has a top margin of 20 pixels." />
</Children>
</Panel>
</Content>
@@ -51,7 +51,7 @@
<Content>
<Panel Layout="VerticalFlow" MinimumSize="500,40">
<Children>
<Text LineAlignment="Center" Color="Maroon" Font="{me:SmallFont}" Content="This text is placed in a ColorFill view item." />
<Text LineAlignment="Center" Color="Maroon" Font="Bahnschrift" Content="Gig em, Ags!" />
</Children>
</Panel>
</Content>