diff --git a/.gitignore b/.gitignore index 4ce6fdd..208f69f 100644 --- a/.gitignore +++ b/.gitignore @@ -337,4 +337,7 @@ ASALocalRun/ .localhistory/ # BeatPulse healthcheck temp database -healthchecksdb \ No newline at end of file +healthchecksdb +/VSIX/IrisProjTemplate/UIXsup.dll +/VSIX/IrisProjTemplate/UIXrender.dll +/VSIX/IrisProjTemplate/UIX.renderapi.dll diff --git a/VSIX/IrisProjTemplate/IrisProjTemplate.csproj b/VSIX/IrisProjTemplate/IrisProjTemplate.csproj new file mode 100644 index 0000000..db54fd9 --- /dev/null +++ b/VSIX/IrisProjTemplate/IrisProjTemplate.csproj @@ -0,0 +1,57 @@ + + + + Exe + netcoreapp3.1 + true + + + + + + + + + + + + + + + + + PreserveNewest + UIX.dll + + + PreserveNewest + UIX.renderapi.dll + + + PreserveNewest + UIXrender.dll + + + PreserveNewest + UIXsup.dll + + + + lib\UIX.dll + + + lib\UIX.renderapi.dll + + + + + + + + + + + \ No newline at end of file diff --git a/VSIX/IrisProjTemplate/Program.cs b/VSIX/IrisProjTemplate/Program.cs new file mode 100644 index 0000000..6aea4e0 --- /dev/null +++ b/VSIX/IrisProjTemplate/Program.cs @@ -0,0 +1,40 @@ +using Microsoft.Iris; +using System.IO; + +namespace IrisProjTemplate +{ + class Program + { + // The name of the UIX file to load on startup (excluding the file extension) + // If left blank, Iris will load "Default" + private const string StartupUIX = "MainPage"; + + // The name of the root UI element + private const string UIRoot = ""; + + static void Main(string[] args) + { + Application.Initialize(); + Application.Window.SetBackgroundColor(new WindowColor(0xE6, 0xE6, 0xE6)); + Load(StartupUIX, UIRoot); + Application.Run(); + + // Any code after this point is run after the main program exits + } + + /// + /// Requests the specified UIX file to be loaded into the application window + /// + /// The name of the UIX file to load on startup (excluding the file extension) + /// The name of the root UI element + static void Load(string startupUIX, string uiRoot) + { + string curDir = Directory.GetCurrentDirectory(); + string uibPath = Path.Combine(curDir, "Resources", startupUIX + ".uib"); + if (!File.Exists(uibPath)) + throw new FileNotFoundException($"File '{uibPath}' could not be loaded because it does not exist"); + + Application.Window.RequestLoad("file://" + uibPath + (string.IsNullOrEmpty(uiRoot) ? string.Empty : "#" + uiRoot)); + } + } +} diff --git a/VSIX/IrisProjTemplate/UI/MainPage.uix b/VSIX/IrisProjTemplate/UI/MainPage.uix new file mode 100644 index 0000000..77bd307 --- /dev/null +++ b/VSIX/IrisProjTemplate/UI/MainPage.uix @@ -0,0 +1,17 @@ + + + + + Howdy from Microsoft.Iris! + + + + + + + + This is some blue text + + + + diff --git a/VSIX/IrisProjTemplate/lib/UIX.dll b/VSIX/IrisProjTemplate/lib/UIX.dll new file mode 100644 index 0000000..4f27a8f Binary files /dev/null and b/VSIX/IrisProjTemplate/lib/UIX.dll differ diff --git a/VSIX/IrisProjTemplate/lib/UIX.dll.config b/VSIX/IrisProjTemplate/lib/UIX.dll.config new file mode 100644 index 0000000..79ca26f --- /dev/null +++ b/VSIX/IrisProjTemplate/lib/UIX.dll.config @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/VSIX/IrisProjTemplate/lib/UIX.renderapi.dll b/VSIX/IrisProjTemplate/lib/UIX.renderapi.dll new file mode 100644 index 0000000..0873fea Binary files /dev/null and b/VSIX/IrisProjTemplate/lib/UIX.renderapi.dll differ diff --git a/VSIX/IrisProjTemplate/lib/UIXBuildTask.dll b/VSIX/IrisProjTemplate/lib/UIXBuildTask.dll new file mode 100644 index 0000000..a416ea8 Binary files /dev/null and b/VSIX/IrisProjTemplate/lib/UIXBuildTask.dll differ diff --git a/VSIX/IrisProjTemplate/lib/UIXrender.dll b/VSIX/IrisProjTemplate/lib/UIXrender.dll new file mode 100644 index 0000000..08989cc Binary files /dev/null and b/VSIX/IrisProjTemplate/lib/UIXrender.dll differ diff --git a/VSIX/IrisProjTemplate/lib/UIXsup.dll b/VSIX/IrisProjTemplate/lib/UIXsup.dll new file mode 100644 index 0000000..d480565 Binary files /dev/null and b/VSIX/IrisProjTemplate/lib/UIXsup.dll differ diff --git a/VSIX/IrisVSIX/IrisVSIX.csproj b/VSIX/IrisVSIX/IrisVSIX.csproj new file mode 100644 index 0000000..b7a8071 --- /dev/null +++ b/VSIX/IrisVSIX/IrisVSIX.csproj @@ -0,0 +1,72 @@ + + + + 16.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + Debug + AnyCPU + 2.0 + {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + {B4EEF46A-3235-42BD-9540-7AAA03BAC77D} + Library + Properties + IrisVSIX + IrisVSIX + v4.7.2 + true + true + true + false + false + true + true + Program + $(DevEnvDir)devenv.exe + /rootsuffix Exp + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + Designer + + + + + + + + + + + + + \ No newline at end of file diff --git a/VSIX/IrisVSIX/IrisVSIXPackage.cs b/VSIX/IrisVSIX/IrisVSIXPackage.cs new file mode 100644 index 0000000..ecab696 --- /dev/null +++ b/VSIX/IrisVSIX/IrisVSIXPackage.cs @@ -0,0 +1,53 @@ +using Microsoft.VisualStudio.Shell; +using System; +using System.Runtime.InteropServices; +using System.Threading; +using Task = System.Threading.Tasks.Task; + +namespace IrisVSIX +{ + /// + /// This is the class that implements the package exposed by this assembly. + /// + /// + /// + /// The minimum requirement for a class to be considered a valid package for Visual Studio + /// is to implement the IVsPackage interface and register itself with the shell. + /// This package uses the helper classes defined inside the Managed Package Framework (MPF) + /// to do it: it derives from the Package class that provides the implementation of the + /// IVsPackage interface and uses the registration attributes defined in the framework to + /// register itself and its components with the shell. These attributes tell the pkgdef creation + /// utility what data to put into .pkgdef file. + /// + /// + /// To get loaded into VS, the package must be referred by <Asset Type="Microsoft.VisualStudio.VsPackage" ...> in .vsixmanifest file. + /// + /// + [PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)] + [Guid(IrisVSIXPackage.PackageGuidString)] + public sealed class IrisVSIXPackage : AsyncPackage + { + /// + /// IrisVSIXPackage GUID string. + /// + public const string PackageGuidString = "dcbeab68-84e2-4338-bd7f-330aebb43454"; + + #region Package Members + + /// + /// Initialization of the package; this method is called right after the package is sited, so this is the place + /// where you can put all the initialization code that rely on services provided by VisualStudio. + /// + /// A cancellation token to monitor for initialization cancellation, which can occur when VS is shutting down. + /// A provider for progress updates. + /// A task representing the async work of package initialization, or an already completed task if there is none. Do not return null from this method. + protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress progress) + { + // When initialized asynchronously, the current thread may be a background thread at this point. + // Do any initialization that requires the UI thread after switching to the UI thread. + await this.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); + } + + #endregion + } +} diff --git a/VSIX/IrisVSIX/Properties/AssemblyInfo.cs b/VSIX/IrisVSIX/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..f9c0350 --- /dev/null +++ b/VSIX/IrisVSIX/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("IrisVSIX")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("IrisVSIX")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/VSIX/IrisVSIX/source.extension.vsixmanifest b/VSIX/IrisVSIX/source.extension.vsixmanifest new file mode 100644 index 0000000..f736896 --- /dev/null +++ b/VSIX/IrisVSIX/source.extension.vsixmanifest @@ -0,0 +1,21 @@ + + + + + Iris UI Development + Adds development tools and templates for creating apps that utilize Microsoft's Iris UI Framework. + true + + + + + + + + + + + + + + diff --git a/VSIX/UIXBuildTask/Properties/AssemblyInfo.cs b/VSIX/UIXBuildTask/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..fee2b65 --- /dev/null +++ b/VSIX/UIXBuildTask/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("UIXBuildTask")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("UIXBuildTask")] +[assembly: AssemblyCopyright("Copyright © 2021")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("1ff973f0-c293-439c-83f8-d2c02b624c2d")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/VSIX/UIXBuildTask/UIXBuild.cs b/VSIX/UIXBuildTask/UIXBuild.cs new file mode 100644 index 0000000..987f6bb --- /dev/null +++ b/VSIX/UIXBuildTask/UIXBuild.cs @@ -0,0 +1,115 @@ +using Microsoft.Build.Utilities; +using Microsoft.Build.Framework; +using System; +using System.Linq; +using System.IO; +using Microsoft.Iris.Markup; +using Microsoft.Iris; +using Microsoft.Iris.Session; +using System.Collections; + +namespace UIXBuildTask +{ + public class UIXBuild : Task + { + private readonly string[] RequiredDlls = new[] + { + "UIXrender.dll", "UIX.renderapi.dll", "UIXsup.dll" + }; + + private ITaskItem[] _sourcefiles; + private string[] _compiledFiles; + private string _compiledOutputDir; + + /// + /// A list of all UIX source files to compile. + /// + [Required] + public ITaskItem[] SourceFiles + { + get => _sourcefiles; + set => _sourcefiles = value; + } + + /// + /// Directory to output compiled files to. + /// + [Required] + public string CompiledOutputDir + { + get => _compiledOutputDir; + set => _compiledOutputDir = value; + } + + /// + /// A list of all UIB files generated. + /// + [Output] + public string[] CompiledFiles + { + get => _compiledFiles; + set => _compiledFiles = value; + } + + public override bool Execute() + { + if (SourceFiles.Length == 0) + return true; + + // The task is run from the project directory, not the output directory, + // so the Iris library will fail to find UIXrender.dll unless we move it. + foreach (string dll in RequiredDlls) + File.Copy( + Path.Combine(Directory.GetCurrentDirectory(), "lib", dll), + Path.Combine(Directory.GetCurrentDirectory(), dll), + true); + + bool isSuccess = true; + try + { + // Initialize UIX compiler + MarkupSystem.Startup(true); + ErrorManager.OnErrors += (IList errors) => { + foreach (object obj in errors) + { + if (obj is ErrorRecord err) + Log.LogError("", "", "", err.Context, err.Line, err.Column, err.Line, err.Column, err.Message); + else + Log.LogError(obj.ToString()); + } + }; + + foreach (ITaskItem item in SourceFiles) + { + string sourceFile = item.GetMetadata("FullPath"); + string compiledFile = Path.Combine(CompiledOutputDir, Path.GetFileNameWithoutExtension(sourceFile) + ".uib"); + Directory.CreateDirectory(CompiledOutputDir); + + // Compile sourePath + isSuccess &= MarkupCompiler.Compile( + new[] + { + new CompilerInput() + { + SourceFileName = sourceFile, + OutputFileName = compiledFile + } + }, + new CompilerInput() + ); + + if (!isSuccess) + Log.LogError($"Failed to compile {sourceFile}"); + } + } + finally + { + // TODO: Don't leave random DLLs in the project directory + //foreach (string dll in RequiredDlls) + // File.Delete(Path.Combine(Directory.GetCurrentDirectory(), dll)); + } + + return isSuccess; + } + } +} diff --git a/VSIX/UIXBuildTask/UIXBuildTask.csproj b/VSIX/UIXBuildTask/UIXBuildTask.csproj new file mode 100644 index 0000000..680d332 --- /dev/null +++ b/VSIX/UIXBuildTask/UIXBuildTask.csproj @@ -0,0 +1,60 @@ + + + + + Debug + AnyCPU + {1FF973F0-C293-439C-83F8-D2C02B624C2D} + Library + Properties + UIXBuildTask + UIXBuildTask + v4.8 + 512 + true + false + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AnyCPU + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + + + + + + + + + + + + + + + + + {5681a1bd-b3ec-450b-bf6e-38187204b6be} + UIX + + + + \ No newline at end of file diff --git a/ZuneUIXTools.sln b/ZuneUIXTools.sln index 259b5af..e981338 100644 --- a/ZuneUIXTools.sln +++ b/ZuneUIXTools.sln @@ -3,28 +3,75 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.30907.101 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZuneUIXTools", "ZuneUIXTools\ZuneUIXTools.csproj", "{3F8F7428-4FC3-41B8-BE59-E6F25C11019A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ZuneUIXTools", "ZuneUIXTools\ZuneUIXTools.csproj", "{3F8F7428-4FC3-41B8-BE59-E6F25C11019A}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UIX", "..\ZuneShell\UIX\UIX.csproj", "{5681A1BD-B3EC-450B-BF6E-38187204B6BE}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "VSIX", "VSIX", "{0CB0EB34-BA9C-4D36-AE45-380F3F0D12ED}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IrisVSIX", "VSIX\IrisVSIX\IrisVSIX.csproj", "{B4EEF46A-3235-42BD-9540-7AAA03BAC77D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IrisProjTemplate", "VSIX\IrisProjTemplate\IrisProjTemplate.csproj", "{854495B4-B684-47AC-9771-A644BF47B2FF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UIXBuildTask", "VSIX\UIXBuildTask\UIXBuildTask.csproj", "{1FF973F0-C293-439C-83F8-D2C02B624C2D}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {3F8F7428-4FC3-41B8-BE59-E6F25C11019A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3F8F7428-4FC3-41B8-BE59-E6F25C11019A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3F8F7428-4FC3-41B8-BE59-E6F25C11019A}.Debug|x64.ActiveCfg = Debug|Any CPU + {3F8F7428-4FC3-41B8-BE59-E6F25C11019A}.Debug|x64.Build.0 = Debug|Any CPU {3F8F7428-4FC3-41B8-BE59-E6F25C11019A}.Release|Any CPU.ActiveCfg = Release|Any CPU {3F8F7428-4FC3-41B8-BE59-E6F25C11019A}.Release|Any CPU.Build.0 = Release|Any CPU + {3F8F7428-4FC3-41B8-BE59-E6F25C11019A}.Release|x64.ActiveCfg = Release|Any CPU + {3F8F7428-4FC3-41B8-BE59-E6F25C11019A}.Release|x64.Build.0 = Release|Any CPU {5681A1BD-B3EC-450B-BF6E-38187204B6BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5681A1BD-B3EC-450B-BF6E-38187204B6BE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5681A1BD-B3EC-450B-BF6E-38187204B6BE}.Debug|x64.ActiveCfg = Debug|Any CPU + {5681A1BD-B3EC-450B-BF6E-38187204B6BE}.Debug|x64.Build.0 = Debug|Any CPU {5681A1BD-B3EC-450B-BF6E-38187204B6BE}.Release|Any CPU.ActiveCfg = Release|Any CPU {5681A1BD-B3EC-450B-BF6E-38187204B6BE}.Release|Any CPU.Build.0 = Release|Any CPU + {5681A1BD-B3EC-450B-BF6E-38187204B6BE}.Release|x64.ActiveCfg = Release|Any CPU + {5681A1BD-B3EC-450B-BF6E-38187204B6BE}.Release|x64.Build.0 = Release|Any CPU + {B4EEF46A-3235-42BD-9540-7AAA03BAC77D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B4EEF46A-3235-42BD-9540-7AAA03BAC77D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B4EEF46A-3235-42BD-9540-7AAA03BAC77D}.Debug|x64.ActiveCfg = Debug|Any CPU + {B4EEF46A-3235-42BD-9540-7AAA03BAC77D}.Debug|x64.Build.0 = Debug|Any CPU + {B4EEF46A-3235-42BD-9540-7AAA03BAC77D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B4EEF46A-3235-42BD-9540-7AAA03BAC77D}.Release|Any CPU.Build.0 = Release|Any CPU + {B4EEF46A-3235-42BD-9540-7AAA03BAC77D}.Release|x64.ActiveCfg = Release|Any CPU + {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}.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 + {854495B4-B684-47AC-9771-A644BF47B2FF}.Release|x64.Build.0 = Release|x64 + {1FF973F0-C293-439C-83F8-D2C02B624C2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1FF973F0-C293-439C-83F8-D2C02B624C2D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1FF973F0-C293-439C-83F8-D2C02B624C2D}.Debug|x64.ActiveCfg = Debug|Any CPU + {1FF973F0-C293-439C-83F8-D2C02B624C2D}.Debug|x64.Build.0 = Debug|Any CPU + {1FF973F0-C293-439C-83F8-D2C02B624C2D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1FF973F0-C293-439C-83F8-D2C02B624C2D}.Release|Any CPU.Build.0 = Release|Any CPU + {1FF973F0-C293-439C-83F8-D2C02B624C2D}.Release|x64.ActiveCfg = Release|Any CPU + {1FF973F0-C293-439C-83F8-D2C02B624C2D}.Release|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {B4EEF46A-3235-42BD-9540-7AAA03BAC77D} = {0CB0EB34-BA9C-4D36-AE45-380F3F0D12ED} + {854495B4-B684-47AC-9771-A644BF47B2FF} = {0CB0EB34-BA9C-4D36-AE45-380F3F0D12ED} + {1FF973F0-C293-439C-83F8-D2C02B624C2D} = {0CB0EB34-BA9C-4D36-AE45-380F3F0D12ED} + EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {4FFAF324-5FC4-4AAF-A0D7-BAA0D81C2B4C} EndGlobalSection diff --git a/ZuneUIXTools/MainWindow.xaml.cs b/ZuneUIXTools/MainWindow.xaml.cs index 74507e9..1252100 100644 --- a/ZuneUIXTools/MainWindow.xaml.cs +++ b/ZuneUIXTools/MainWindow.xaml.cs @@ -22,6 +22,7 @@ using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; +using Application = Microsoft.Iris.Application; using Window = System.Windows.Window; namespace ZuneUIXTools @@ -130,20 +131,20 @@ namespace ZuneUIXTools try { - Microsoft.Iris.Application.Initialize(); + Application.Initialize(); } catch { } try { - Microsoft.Iris.Application.Window.SetBackgroundColor(new WindowColor(0xE6, 0xE6, 0xE6)); - Microsoft.Iris.Application.Window.RequestLoad("file://" + compiledFile + (string.IsNullOrEmpty(UIRoot) ? string.Empty : "#" + UIRoot)); - Microsoft.Iris.Application.Window.CloseRequested += (object sender, WindowCloseRequestedEventArgs args) => + 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) => { args.BlockCloseRequest(); - Microsoft.Iris.Application.Window.Visible = false; + Application.Window.Visible = false; }; - Microsoft.Iris.Application.Run(); + Application.Run(); } catch (Exception ex) { diff --git a/ZuneUIXTools/ZuneUIXTools.csproj b/ZuneUIXTools/ZuneUIXTools.csproj index d7e134f..9d45ac1 100644 --- a/ZuneUIXTools/ZuneUIXTools.csproj +++ b/ZuneUIXTools/ZuneUIXTools.csproj @@ -1,41 +1,41 @@  - - WinExe - netcoreapp3.1 - true - + + WinExe + netcoreapp3.1 + true + - - - PreserveNewest - - + + + PreserveNewest + + - - - + + + - - - + + + - - - ..\lib\UIX.renderapi.dll - - + + + ..\lib\UIX.renderapi.dll + + - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + diff --git a/test/Frame.uix b/test/Frame.uix new file mode 100644 index 0000000..e23826d --- /dev/null +++ b/test/Frame.uix @@ -0,0 +1,563 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Patent_1.frag.uix b/test/Patent_1.frag.uix new file mode 100644 index 0000000..5878274 --- /dev/null +++ b/test/Patent_1.frag.uix @@ -0,0 +1,3 @@ + + Foo and Bar.]]> + \ No newline at end of file diff --git a/test/Patent_2.uix b/test/Patent_2.uix new file mode 100644 index 0000000..478bfda --- /dev/null +++ b/test/Patent_2.uix @@ -0,0 +1,128 @@ + + + + + + + Dntel and Figurine), and Death Cab for Cutie's Ben Gibbard; Rilo Kiley's Jenny Lewis, and former Tattle Tale and solo artist Jen Wood provide backing vocals. Tamborello and Gibbard first worked together on the title track of Dntel's This Is The Dream Of Evan And Chan EP; from there, the duo continued to collaborate via mail, with Tamborello sending electronic pieces and Gibbard adding guitars, vocals, and lyrics. The result, Give Up, were released in early 2003 by Sub Pop. ~ Heather Phares, All Music Guide ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Patent_3.uix b/test/Patent_3.uix new file mode 100644 index 0000000..376b3cc --- /dev/null +++ b/test/Patent_3.uix @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file