diff --git a/VSIX/IrisProjTemplate/IrisProjTemplate.csproj b/VSIX/IrisProjTemplate/IrisProjTemplate.csproj deleted file mode 100644 index 0ab8973..0000000 --- a/VSIX/IrisProjTemplate/IrisProjTemplate.csproj +++ /dev/null @@ -1,57 +0,0 @@ - - - - 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 deleted file mode 100644 index 6aea4e0..0000000 --- a/VSIX/IrisProjTemplate/Program.cs +++ /dev/null @@ -1,40 +0,0 @@ -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 deleted file mode 100644 index 77bd307..0000000 --- a/VSIX/IrisProjTemplate/UI/MainPage.uix +++ /dev/null @@ -1,17 +0,0 @@ - - - - - Howdy from Microsoft.Iris! - - - - - - - - This is some blue text - - - - diff --git a/VSIX/IrisProjTemplate/lib/UIX.dll b/VSIX/IrisProjTemplate/lib/UIX.dll deleted file mode 100644 index 4f27a8f..0000000 Binary files a/VSIX/IrisProjTemplate/lib/UIX.dll and /dev/null differ diff --git a/VSIX/IrisProjTemplate/lib/UIX.dll.config b/VSIX/IrisProjTemplate/lib/UIX.dll.config deleted file mode 100644 index 79ca26f..0000000 --- a/VSIX/IrisProjTemplate/lib/UIX.dll.config +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/VSIX/IrisProjTemplate/lib/UIX.renderapi.dll b/VSIX/IrisProjTemplate/lib/UIX.renderapi.dll deleted file mode 100644 index 0873fea..0000000 Binary files a/VSIX/IrisProjTemplate/lib/UIX.renderapi.dll and /dev/null differ diff --git a/VSIX/IrisProjTemplate/lib/UIXBuildTask.dll b/VSIX/IrisProjTemplate/lib/UIXBuildTask.dll deleted file mode 100644 index 0f57dae..0000000 Binary files a/VSIX/IrisProjTemplate/lib/UIXBuildTask.dll and /dev/null differ diff --git a/VSIX/IrisProjTemplate/lib/UIXrender.dll b/VSIX/IrisProjTemplate/lib/UIXrender.dll deleted file mode 100644 index 08989cc..0000000 Binary files a/VSIX/IrisProjTemplate/lib/UIXrender.dll and /dev/null differ diff --git a/VSIX/IrisProjTemplate/lib/UIXsup.dll b/VSIX/IrisProjTemplate/lib/UIXsup.dll deleted file mode 100644 index d480565..0000000 Binary files a/VSIX/IrisProjTemplate/lib/UIXsup.dll and /dev/null differ diff --git a/VSIX/IrisVSIX/IrisVSIX.csproj b/VSIX/IrisVSIX/IrisVSIX.csproj deleted file mode 100644 index 769b608..0000000 --- a/VSIX/IrisVSIX/IrisVSIX.csproj +++ /dev/null @@ -1,76 +0,0 @@ - - - - 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 - - - - - - - - Always - true - - - Designer - - - - - - - - - - - - - \ No newline at end of file diff --git a/VSIX/IrisVSIX/IrisVSIXPackage.cs b/VSIX/IrisVSIX/IrisVSIXPackage.cs deleted file mode 100644 index ecab696..0000000 --- a/VSIX/IrisVSIX/IrisVSIXPackage.cs +++ /dev/null @@ -1,53 +0,0 @@ -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/ProjectTemplates/Iris UI Application.zip b/VSIX/IrisVSIX/ProjectTemplates/Iris UI Application.zip deleted file mode 100644 index 17bbcd5..0000000 Binary files a/VSIX/IrisVSIX/ProjectTemplates/Iris UI Application.zip and /dev/null differ diff --git a/VSIX/IrisVSIX/Properties/AssemblyInfo.cs b/VSIX/IrisVSIX/Properties/AssemblyInfo.cs deleted file mode 100644 index f9c0350..0000000 --- a/VSIX/IrisVSIX/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,33 +0,0 @@ -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 deleted file mode 100644 index 51e1054..0000000 --- a/VSIX/IrisVSIX/source.extension.vsixmanifest +++ /dev/null @@ -1,22 +0,0 @@ - - - - - Iris UI Development - 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 deleted file mode 100644 index fee2b65..0000000 --- a/VSIX/UIXBuildTask/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -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 deleted file mode 100644 index 987f6bb..0000000 --- a/VSIX/UIXBuildTask/UIXBuild.cs +++ /dev/null @@ -1,115 +0,0 @@ -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 deleted file mode 100644 index 3976dc9..0000000 --- a/VSIX/UIXBuildTask/UIXBuildTask.csproj +++ /dev/null @@ -1,54 +0,0 @@ - - - - - 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 - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ZuneUIXTools.ViewModels/CompiledUIXDocumentViewModel.cs b/ZuneUIXTools.ViewModels/CompiledUIXDocumentViewModel.cs deleted file mode 100644 index 4fb6c1f..0000000 --- a/ZuneUIXTools.ViewModels/CompiledUIXDocumentViewModel.cs +++ /dev/null @@ -1,34 +0,0 @@ -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); - } - } -} diff --git a/ZuneUIXTools.ViewModels/DocumentViewModelBase.cs b/ZuneUIXTools.ViewModels/DocumentViewModelBase.cs deleted file mode 100644 index f0f3c91..0000000 --- a/ZuneUIXTools.ViewModels/DocumentViewModelBase.cs +++ /dev/null @@ -1,19 +0,0 @@ -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); - } - } -} diff --git a/ZuneUIXTools.ViewModels/IrisProjectViewModel.cs b/ZuneUIXTools.ViewModels/IrisProjectViewModel.cs deleted file mode 100644 index ae433e0..0000000 --- a/ZuneUIXTools.ViewModels/IrisProjectViewModel.cs +++ /dev/null @@ -1,65 +0,0 @@ -using Microsoft.Toolkit.Mvvm.ComponentModel; -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Text; - -namespace ZuneUIXTools.ViewModels -{ - public class IrisProjectViewModel : ObservableObject - { - private ObservableCollection _uixDocuments; - public ObservableCollection UIXDocuments - { - get => _uixDocuments; - set => SetProperty(ref _uixDocuments, value); - } - - private string _name; - public string Name - { - get => _name; - set => SetProperty(ref _name, value); - } - - private DocumentViewModelBase _selectedDocument; - public DocumentViewModelBase SelectedDocument - { - get => _selectedDocument; - set => SetProperty(ref _selectedDocument, value); - } - - public DocumentViewModelBase LoadDocument(string fileName, string fileFormat = null) - { - if (fileFormat == null) - fileFormat = System.IO.Path.GetExtension(fileName); - - DocumentViewModelBase doc = UIXDocuments.FirstOrDefault(oldDoc => fileName == oldDoc.FileName); - if (doc != null) - return doc; - - if (fileFormat.EndsWith(".uix")) - doc = new UIXDocumentViewModel(fileName); - else if (fileFormat.EndsWith(".uib")) - doc = new CompiledUIXDocumentViewModel(fileName); - else - throw new ArgumentException($"\"{fileName}\" is not a known format."); - - UIXDocuments.Add(doc); - return doc; - } - - public void UnloadDocument(string fileName) - { - DocumentViewModelBase doc = UIXDocuments.FirstOrDefault(oldDoc => fileName == oldDoc.FileName); - if (doc != null) - UIXDocuments.Remove(doc); - } - - public void UnloadDocument(DocumentViewModelBase doc) - { - UIXDocuments.Remove(doc); - } - } -} diff --git a/ZuneUIXTools.ViewModels/UIXDocumentViewModel.cs b/ZuneUIXTools.ViewModels/UIXDocumentViewModel.cs deleted file mode 100644 index 7334e6e..0000000 --- a/ZuneUIXTools.ViewModels/UIXDocumentViewModel.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Microsoft.Toolkit.Mvvm.ComponentModel; -using System; -using System.IO; - -namespace ZuneUIXTools.ViewModels -{ - public class UIXDocumentViewModel : DocumentViewModelBase - { - public UIXDocumentViewModel(string fileName) : base(fileName) - { - Content = File.ReadAllText(fileName); - } - - private string _content = null; - public string Content - { - get - { - if (FileName != null) - _content = File.ReadAllText(FileName); - return _content; - } - set => SetProperty(ref _content, value); - } - - private string _uiRoot; - public string UIRoot - { - get => _uiRoot; - set => SetProperty(ref _uiRoot, value); - } - } -} diff --git a/ZuneUIXTools.ViewModels/ZuneUIXTools.ViewModels.csproj b/ZuneUIXTools.ViewModels/ZuneUIXTools.ViewModels.csproj deleted file mode 100644 index f4dd354..0000000 --- a/ZuneUIXTools.ViewModels/ZuneUIXTools.ViewModels.csproj +++ /dev/null @@ -1,22 +0,0 @@ - - - - netstandard2.0 - preview - false - uixtools.pfx - - - - true - - - - true - - - - - - - diff --git a/ZuneUIXTools.sln b/ZuneUIXTools.sln index cb0de30..b41da89 100644 --- a/ZuneUIXTools.sln +++ b/ZuneUIXTools.sln @@ -3,18 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.1.32421.90 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ZuneUIXTools", "ZuneUIXTools\ZuneUIXTools.csproj", "{3F8F7428-4FC3-41B8-BE59-E6F25C11019A}" -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("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "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 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ZuneUIXTools.ViewModels", "ZuneUIXTools.ViewModels\ZuneUIXTools.ViewModels.csproj", "{707AA11C-6D10-4CF2-9852-73FC3D33EF02}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UIX", "libs\MicrosoftIris\UIX\UIX.csproj", "{78A8B08C-C0E9-4BAC-9AF6-58D3A55C05C9}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UIX.RenderApi", "libs\MicrosoftIris\UIX.RenderApi\UIX.RenderApi.csproj", "{CB2B7609-C7B8-4E2A-82D8-DD631B70B621}" @@ -39,64 +27,6 @@ Global Release|x86 = Release|x86 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}.Debug|x86.ActiveCfg = Debug|Any CPU - {3F8F7428-4FC3-41B8-BE59-E6F25C11019A}.Debug|x86.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 - {3F8F7428-4FC3-41B8-BE59-E6F25C11019A}.Release|x86.ActiveCfg = Release|Any CPU - {3F8F7428-4FC3-41B8-BE59-E6F25C11019A}.Release|x86.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}.Debug|x86.ActiveCfg = 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 - {B4EEF46A-3235-42BD-9540-7AAA03BAC77D}.Release|x86.ActiveCfg = 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|Any CPU - {854495B4-B684-47AC-9771-A644BF47B2FF}.Debug|x64.Build.0 = Debug|Any CPU - {854495B4-B684-47AC-9771-A644BF47B2FF}.Debug|x86.ActiveCfg = Debug|Any CPU - {854495B4-B684-47AC-9771-A644BF47B2FF}.Debug|x86.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 - {854495B4-B684-47AC-9771-A644BF47B2FF}.Release|x64.Build.0 = Release|x64 - {854495B4-B684-47AC-9771-A644BF47B2FF}.Release|x86.ActiveCfg = Release|Any CPU - {854495B4-B684-47AC-9771-A644BF47B2FF}.Release|x86.Build.0 = Release|Any CPU - {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}.Debug|x86.ActiveCfg = Debug|Any CPU - {1FF973F0-C293-439C-83F8-D2C02B624C2D}.Debug|x86.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 - {1FF973F0-C293-439C-83F8-D2C02B624C2D}.Release|x86.ActiveCfg = Release|Any CPU - {1FF973F0-C293-439C-83F8-D2C02B624C2D}.Release|x86.Build.0 = Release|Any CPU - {707AA11C-6D10-4CF2-9852-73FC3D33EF02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {707AA11C-6D10-4CF2-9852-73FC3D33EF02}.Debug|Any CPU.Build.0 = Debug|Any CPU - {707AA11C-6D10-4CF2-9852-73FC3D33EF02}.Debug|x64.ActiveCfg = Debug|Any CPU - {707AA11C-6D10-4CF2-9852-73FC3D33EF02}.Debug|x64.Build.0 = Debug|Any CPU - {707AA11C-6D10-4CF2-9852-73FC3D33EF02}.Debug|x86.ActiveCfg = Debug|Any CPU - {707AA11C-6D10-4CF2-9852-73FC3D33EF02}.Debug|x86.Build.0 = Debug|Any CPU - {707AA11C-6D10-4CF2-9852-73FC3D33EF02}.Release|Any CPU.ActiveCfg = Release|Any CPU - {707AA11C-6D10-4CF2-9852-73FC3D33EF02}.Release|Any CPU.Build.0 = Release|Any CPU - {707AA11C-6D10-4CF2-9852-73FC3D33EF02}.Release|x64.ActiveCfg = Release|Any CPU - {707AA11C-6D10-4CF2-9852-73FC3D33EF02}.Release|x64.Build.0 = Release|Any CPU - {707AA11C-6D10-4CF2-9852-73FC3D33EF02}.Release|x86.ActiveCfg = Release|Any CPU - {707AA11C-6D10-4CF2-9852-73FC3D33EF02}.Release|x86.Build.0 = Release|Any CPU {78A8B08C-C0E9-4BAC-9AF6-58D3A55C05C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {78A8B08C-C0E9-4BAC-9AF6-58D3A55C05C9}.Debug|Any CPU.Build.0 = Debug|Any CPU {78A8B08C-C0E9-4BAC-9AF6-58D3A55C05C9}.Debug|x64.ActiveCfg = Debug|x64 @@ -174,9 +104,6 @@ Global 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} {78A8B08C-C0E9-4BAC-9AF6-58D3A55C05C9} = {470F14DD-0489-4BE5-BB4B-421EDB4021AC} {CB2B7609-C7B8-4E2A-82D8-DD631B70B621} = {470F14DD-0489-4BE5-BB4B-421EDB4021AC} {D311AFFC-CA27-4349-8B01-D5CF0E5FC2B6} = {470F14DD-0489-4BE5-BB4B-421EDB4021AC} diff --git a/ZuneUIXTools/App.config b/ZuneUIXTools/App.config deleted file mode 100644 index a9000fe..0000000 --- a/ZuneUIXTools/App.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/ZuneUIXTools/App.xaml b/ZuneUIXTools/App.xaml deleted file mode 100644 index 339fc2a..0000000 --- a/ZuneUIXTools/App.xaml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - diff --git a/ZuneUIXTools/App.xaml.cs b/ZuneUIXTools/App.xaml.cs deleted file mode 100644 index 87223ba..0000000 --- a/ZuneUIXTools/App.xaml.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.Windows; - -namespace ZuneUIXTools; - -/// -/// Interaction logic for App.xaml -/// -public partial class App : Application -{ - internal const string DEFAULT_DEBUG_URI = "tcp://127.0.0.1:5556"; -} diff --git a/ZuneUIXTools/AssemblyInfo.cs b/ZuneUIXTools/AssemblyInfo.cs deleted file mode 100644 index 8b5504e..0000000 --- a/ZuneUIXTools/AssemblyInfo.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Windows; - -[assembly: ThemeInfo( - ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located - //(used if a resource is not found in the page, - // or application resource dictionaries) - ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located - //(used if a resource is not found in the page, - // app, or any theme specific resource dictionaries) -)] diff --git a/ZuneUIXTools/Converters/CastValueConverter.cs b/ZuneUIXTools/Converters/CastValueConverter.cs deleted file mode 100644 index 0a11259..0000000 --- a/ZuneUIXTools/Converters/CastValueConverter.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Globalization; -using System.Windows.Data; - -namespace ZuneUIXTools.Converters; - -public class CastValueConverter : IValueConverter -{ - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - return value; - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return value; - } -} diff --git a/ZuneUIXTools/Images/BuildSolution_16x.png b/ZuneUIXTools/Images/BuildSolution_16x.png deleted file mode 100644 index 0f289bc..0000000 Binary files a/ZuneUIXTools/Images/BuildSolution_16x.png and /dev/null differ diff --git a/ZuneUIXTools/Images/DebugContinue_16x.png b/ZuneUIXTools/Images/DebugContinue_16x.png deleted file mode 100644 index 2f1b37c..0000000 Binary files a/ZuneUIXTools/Images/DebugContinue_16x.png and /dev/null differ diff --git a/ZuneUIXTools/Images/DisableDebugging_16x.png b/ZuneUIXTools/Images/DisableDebugging_16x.png deleted file mode 100644 index f4cf6d9..0000000 Binary files a/ZuneUIXTools/Images/DisableDebugging_16x.png and /dev/null differ diff --git a/ZuneUIXTools/Images/EnableDebugging_16x.png b/ZuneUIXTools/Images/EnableDebugging_16x.png deleted file mode 100644 index 4a7f34a..0000000 Binary files a/ZuneUIXTools/Images/EnableDebugging_16x.png and /dev/null differ diff --git a/ZuneUIXTools/Images/OpenProject_16x.png b/ZuneUIXTools/Images/OpenProject_16x.png deleted file mode 100644 index f85e98d..0000000 Binary files a/ZuneUIXTools/Images/OpenProject_16x.png and /dev/null differ diff --git a/ZuneUIXTools/Images/Run_16x.png b/ZuneUIXTools/Images/Run_16x.png deleted file mode 100644 index a5634bc..0000000 Binary files a/ZuneUIXTools/Images/Run_16x.png and /dev/null differ diff --git a/ZuneUIXTools/Images/SaveAs_16x.png b/ZuneUIXTools/Images/SaveAs_16x.png deleted file mode 100644 index 5ddedbb..0000000 Binary files a/ZuneUIXTools/Images/SaveAs_16x.png and /dev/null differ diff --git a/ZuneUIXTools/Images/Save_16x.png b/ZuneUIXTools/Images/Save_16x.png deleted file mode 100644 index 34a3c5b..0000000 Binary files a/ZuneUIXTools/Images/Save_16x.png and /dev/null differ diff --git a/ZuneUIXTools/Images/StartWithoutDebug_16x.png b/ZuneUIXTools/Images/StartWithoutDebug_16x.png deleted file mode 100644 index 939f115..0000000 Binary files a/ZuneUIXTools/Images/StartWithoutDebug_16x.png and /dev/null differ diff --git a/ZuneUIXTools/Images/StepOver_16x.png b/ZuneUIXTools/Images/StepOver_16x.png deleted file mode 100644 index 8682b23..0000000 Binary files a/ZuneUIXTools/Images/StepOver_16x.png and /dev/null differ diff --git a/ZuneUIXTools/Images/Stop_16x.png b/ZuneUIXTools/Images/Stop_16x.png deleted file mode 100644 index 2ab785e..0000000 Binary files a/ZuneUIXTools/Images/Stop_16x.png and /dev/null differ diff --git a/ZuneUIXTools/Images/VCSIrisProject.ico b/ZuneUIXTools/Images/VCSIrisProject.ico deleted file mode 100644 index 47ec38f..0000000 Binary files a/ZuneUIXTools/Images/VCSIrisProject.ico and /dev/null differ diff --git a/ZuneUIXTools/Images/VCSIrisProject_16x.png b/ZuneUIXTools/Images/VCSIrisProject_16x.png deleted file mode 100644 index 6f09f4b..0000000 Binary files a/ZuneUIXTools/Images/VCSIrisProject_16x.png and /dev/null differ diff --git a/ZuneUIXTools/Images/VCSIrisProject_32x.png b/ZuneUIXTools/Images/VCSIrisProject_32x.png deleted file mode 100644 index 3bdfaa3..0000000 Binary files a/ZuneUIXTools/Images/VCSIrisProject_32x.png and /dev/null differ diff --git a/ZuneUIXTools/Images/VCSIrisProject_64x.png b/ZuneUIXTools/Images/VCSIrisProject_64x.png deleted file mode 100644 index fc1c38e..0000000 Binary files a/ZuneUIXTools/Images/VCSIrisProject_64x.png and /dev/null differ diff --git a/ZuneUIXTools/Images/ZuneShell.ico b/ZuneUIXTools/Images/ZuneShell.ico deleted file mode 100644 index d1c9729..0000000 Binary files a/ZuneUIXTools/Images/ZuneShell.ico and /dev/null differ diff --git a/ZuneUIXTools/Modules/Inspectors/EnumerableEditorView.xaml b/ZuneUIXTools/Modules/Inspectors/EnumerableEditorView.xaml deleted file mode 100644 index e547d24..0000000 --- a/ZuneUIXTools/Modules/Inspectors/EnumerableEditorView.xaml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - diff --git a/ZuneUIXTools/Modules/Inspectors/EnumerableEditorView.xaml.cs b/ZuneUIXTools/Modules/Inspectors/EnumerableEditorView.xaml.cs deleted file mode 100644 index 4bb8a60..0000000 --- a/ZuneUIXTools/Modules/Inspectors/EnumerableEditorView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace ZuneUIXTools.Modules.Inspectors -{ - /// - /// Interaction logic for EnumerableEditorView.xaml - /// - public partial class EnumerableEditorView : UserControl - { - public EnumerableEditorView() - { - InitializeComponent(); - } - } -} diff --git a/ZuneUIXTools/Modules/Inspectors/EnumerableEditorViewModel.cs b/ZuneUIXTools/Modules/Inspectors/EnumerableEditorViewModel.cs deleted file mode 100644 index d316ec3..0000000 --- a/ZuneUIXTools/Modules/Inspectors/EnumerableEditorViewModel.cs +++ /dev/null @@ -1,35 +0,0 @@ -using Gemini.Modules.Inspector; -using Gemini.Modules.Inspector.Inspectors; -using Gemini.Modules.Inspector.ViewModels; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; - -namespace ZuneUIXTools.Modules.Inspectors; - -public class EnumerableEditorViewModel : EditorBase, ILabelledInspector -{ - public EnumerableEditorViewModel() : this(null) { } - - public EnumerableEditorViewModel(Func builder) - { - Builder = builder ?? DefaultBuilder; - } - - public Func Builder { get; } - - public override bool IsReadOnly => Value is IList collection && collection.IsReadOnly; - - public IEnumerable Inspectables => Value? - .Cast() - .Select(inst => new InspectorViewModel() { SelectedObject = Builder(inst) }) - ?? Array.Empty(); - - private static InspectableObject DefaultBuilder(object instance) - { - return new InspectableObjectBuilder() - .WithObjectProperties(instance, _ => true) - .ToInspectableObject(); - } -} diff --git a/ZuneUIXTools/Modules/Inspectors/EnumerablePropertyEditorBuilder.cs b/ZuneUIXTools/Modules/Inspectors/EnumerablePropertyEditorBuilder.cs deleted file mode 100644 index f10de8b..0000000 --- a/ZuneUIXTools/Modules/Inspectors/EnumerablePropertyEditorBuilder.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Newtonsoft.Json.Linq; -using System.Collections; -using System.ComponentModel; - -namespace ZuneUIXTools.Modules.Inspectors; - -public class EnumerablePropertyEditorBuilder : InheritablePropertyEditorBuilder -{ - public override bool IsApplicable(PropertyDescriptor propertyDescriptor) - { - return base.IsApplicable(propertyDescriptor) - && propertyDescriptor.PropertyType != typeof(string) - && !propertyDescriptor.PropertyType.IsAssignableTo(typeof(JToken)); - } -} diff --git a/ZuneUIXTools/Modules/Inspectors/InheritablePropertyEditorBuilder.cs b/ZuneUIXTools/Modules/Inspectors/InheritablePropertyEditorBuilder.cs deleted file mode 100644 index 6e09421..0000000 --- a/ZuneUIXTools/Modules/Inspectors/InheritablePropertyEditorBuilder.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Gemini.Modules.Inspector.Conventions; -using Gemini.Modules.Inspector.Inspectors; -using System.ComponentModel; - -namespace ZuneUIXTools.Modules.Inspectors; - -public class InheritablePropertyEditorBuilder : PropertyEditorBuilder - where TEditor : IEditor, new() -{ - public override bool IsApplicable(PropertyDescriptor propertyDescriptor) - { - return propertyDescriptor.PropertyType.IsAssignableTo(typeof(T)); - } - - public override IEditor BuildEditor(PropertyDescriptor propertyDescriptor) - { - return new TEditor(); - } -} diff --git a/ZuneUIXTools/Modules/Shell/Commands/BuildAndDebugCommandDefinition.cs b/ZuneUIXTools/Modules/Shell/Commands/BuildAndDebugCommandDefinition.cs deleted file mode 100644 index 60eb1aa..0000000 --- a/ZuneUIXTools/Modules/Shell/Commands/BuildAndDebugCommandDefinition.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Gemini.Framework.Commands; -using System; -using System.ComponentModel.Composition; -using System.Windows.Input; - -namespace ZuneUIXTools.Modules.Shell.Commands; - -[CommandDefinition] -public class BuildAndDebugCommandDefinition : CommandDefinition -{ - public const string CommandName = "Project.BuildAndDebug"; - - public override string Name => CommandName; - - public override string Text => "Start Debugging"; - - public override string ToolTip => "Compiles the current UIX document, runs it, and attaches the debugger."; - - public override Uri IconSource => new("pack://application:,,,/ZuneUIXTools;component/Images/Run_16x.png"); - - [Export] - public static CommandKeyboardShortcut KeyGesture - = new CommandKeyboardShortcut(new KeyGesture(Key.F5)); -} diff --git a/ZuneUIXTools/Modules/Shell/Commands/BuildAndRunCommandDefinition.cs b/ZuneUIXTools/Modules/Shell/Commands/BuildAndRunCommandDefinition.cs deleted file mode 100644 index d291a98..0000000 --- a/ZuneUIXTools/Modules/Shell/Commands/BuildAndRunCommandDefinition.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Gemini.Framework.Commands; -using System; -using System.ComponentModel.Composition; -using System.Windows.Input; - -namespace ZuneUIXTools.Modules.Shell.Commands; - -[CommandDefinition] -public class BuildAndRunCommandDefinition : CommandDefinition -{ - public const string CommandName = "Project.BuildAndRun"; - - public override string Name => CommandName; - - public override string Text => "Start Without Debugging"; - - public override string ToolTip => "Compiles the current UIX document and runs it without the debugger."; - - public override Uri IconSource => new("pack://application:,,,/ZuneUIXTools;component/Images/StartWithoutDebug_16x.png"); - - [Export] - public static CommandKeyboardShortcut KeyGesture - = new CommandKeyboardShortcut(new KeyGesture(Key.F5, ModifierKeys.Control)); -} diff --git a/ZuneUIXTools/Modules/Shell/Commands/ContinueDebuggerCommandDefinition.cs b/ZuneUIXTools/Modules/Shell/Commands/ContinueDebuggerCommandDefinition.cs deleted file mode 100644 index 9ba9fdc..0000000 --- a/ZuneUIXTools/Modules/Shell/Commands/ContinueDebuggerCommandDefinition.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Gemini.Framework.Commands; -using System; -using System.ComponentModel.Composition; -using System.Windows.Input; - -namespace ZuneUIXTools.Modules.Shell.Commands; - -[CommandDefinition] -public class ContinueDebuggerCommandDefinition : CommandDefinition -{ - private const string Text_Stop = "Continue"; - private const string ToolTip_Stop = "Continues execution until the next breakpoint is hit."; - private static readonly Uri IconSource_Stop = new("pack://application:,,,/ZuneUIXTools;component/Images/DebugContinue_16x.png"); - - public const string CommandName = "Debugger.Continue"; - - public override string Name => CommandName; - - public override string Text => Text_Stop; - - public override string ToolTip => ToolTip_Stop; - - public override Uri IconSource => IconSource_Stop; - - [Export] - public static CommandKeyboardShortcut KeyGesture - = new CommandKeyboardShortcut(new KeyGesture(Key.F11)); -} diff --git a/ZuneUIXTools/Modules/Shell/Commands/DecompileCommandDefinition.cs b/ZuneUIXTools/Modules/Shell/Commands/DecompileCommandDefinition.cs deleted file mode 100644 index 2ff5149..0000000 --- a/ZuneUIXTools/Modules/Shell/Commands/DecompileCommandDefinition.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Gemini.Framework.Commands; -using System; -using System.ComponentModel.Composition; -using System.Windows.Input; - -namespace ZuneUIXTools.Modules.Shell.Commands -{ - [CommandDefinition] - public class DecompileCommandDefinition : CommandDefinition - { - public const string CommandName = "Project.Decompile"; - - public override string Name => CommandName; - - public override string Text => "Decompile"; - - public override string ToolTip => "Attempts to decompile the current UIB document."; - - public override Uri IconSource => new("pack://application:,,,/ZuneUIXTools;component/Images/ZuneShell.ico"); - - [Export] - public static CommandKeyboardShortcut KeyGesture = new CommandKeyboardShortcut(new KeyGesture(Key.F5, ModifierKeys.Shift)); - } -} diff --git a/ZuneUIXTools/Modules/Shell/Commands/StartStopDebuggerCommandDefinition.cs b/ZuneUIXTools/Modules/Shell/Commands/StartStopDebuggerCommandDefinition.cs deleted file mode 100644 index 53868ae..0000000 --- a/ZuneUIXTools/Modules/Shell/Commands/StartStopDebuggerCommandDefinition.cs +++ /dev/null @@ -1,44 +0,0 @@ -using Gemini.Framework.Commands; -using System; -using System.ComponentModel.Composition; -using System.Windows.Input; - -namespace ZuneUIXTools.Modules.Shell.Commands; - -[CommandDefinition] -public class StartStopDebuggerCommandDefinition : CommandDefinition -{ - private const string Text_Stop = "Deatch Debugger"; - private const string ToolTip_Stop = "Stops the Iris debugger client."; - private static readonly Uri IconSource_Stop = new("pack://application:,,,/ZuneUIXTools;component/Images/Stop_16x.png"); - - public const string CommandName = "Debugger.ToggleDebugger"; - - public override string Name => CommandName; - - public override string Text => Text_Stop; - - public override string ToolTip => ToolTip_Stop; - - public override Uri IconSource => IconSource_Stop; - - [Export] - public static CommandKeyboardShortcut KeyGesture - = new CommandKeyboardShortcut(new KeyGesture(Key.F5, ModifierKeys.Shift)); - - public static void UpdateCommand(Command command, bool isRunning) - { - if (isRunning) - { - command.Text = Text_Stop; - command.ToolTip = ToolTip_Stop; - command.IconSource = IconSource_Stop; - } - else - { - command.Text = "Attach Debugger"; - command.ToolTip = "Starts the Iris debugger client."; - command.IconSource = new("pack://application:,,,/ZuneUIXTools;component/Images/EnableDebugging_16x.png"); - } - } -} diff --git a/ZuneUIXTools/Modules/Shell/Commands/StepOverDebuggerCommandDefinition.cs b/ZuneUIXTools/Modules/Shell/Commands/StepOverDebuggerCommandDefinition.cs deleted file mode 100644 index 67eb801..0000000 --- a/ZuneUIXTools/Modules/Shell/Commands/StepOverDebuggerCommandDefinition.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Gemini.Framework.Commands; -using System; -using System.ComponentModel.Composition; -using System.Windows.Input; - -namespace ZuneUIXTools.Modules.Shell.Commands; - -[CommandDefinition] -public class StepOverDebuggerCommandDefinition : CommandDefinition -{ - private const string Text_Stop = "Step Over"; - private const string ToolTip_Stop = "Executes the current instruction and breaks at the next."; - private static readonly Uri IconSource_Stop = new("pack://application:,,,/ZuneUIXTools;component/Images/StepOver_16x.png"); - - public const string CommandName = "Debugger.StepOver"; - - public override string Name => CommandName; - - public override string Text => Text_Stop; - - public override string ToolTip => ToolTip_Stop; - - public override Uri IconSource => IconSource_Stop; - - [Export] - public static CommandKeyboardShortcut KeyGesture - = new CommandKeyboardShortcut(new KeyGesture(Key.F10)); -} diff --git a/ZuneUIXTools/Modules/Shell/MenuDefinitions.cs b/ZuneUIXTools/Modules/Shell/MenuDefinitions.cs deleted file mode 100644 index e37e8e7..0000000 --- a/ZuneUIXTools/Modules/Shell/MenuDefinitions.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Gemini.Framework.Menus; -using System.ComponentModel.Composition; - -namespace ZuneUIXTools.Modules.Shell; - -public static class MenuDefinitions -{ - [Export] - public static readonly MenuDefinition DebugMenu = new(Gemini.Modules.MainMenu.MenuDefinitions.MainMenuBar, 4, "Debug"); - - [Export] - public static readonly MenuItemGroupDefinition DebuggerMenuGroup = new(DebugMenu, 0); -} diff --git a/ZuneUIXTools/Modules/Shell/ToolBarDefinitions.cs b/ZuneUIXTools/Modules/Shell/ToolBarDefinitions.cs deleted file mode 100644 index 95c6a66..0000000 --- a/ZuneUIXTools/Modules/Shell/ToolBarDefinitions.cs +++ /dev/null @@ -1,42 +0,0 @@ -using Gemini.Framework.ToolBars; -using System.ComponentModel.Composition; -using ZuneUIXTools.Modules.Shell.Commands; - -namespace ZuneUIXTools.Modules.Shell -{ - internal static class ToolBarDefinitions - { - [Export] - public static ToolBarDefinition UIXToolBar = new(2, "Microsoft Iris UI"); - - [Export] - public static ToolBarItemGroupDefinition UIXFileToolBarGroup = new(UIXToolBar, 8); - - [Export] - public static ToolBarItemDefinition BuildAndDebugToolBarItem = new CommandToolBarItemDefinition( - UIXFileToolBarGroup, 0, ToolBarItemDisplay.IconAndText); - - [Export] - public static ToolBarItemDefinition BuildAndRunToolBarItem = new CommandToolBarItemDefinition( - UIXFileToolBarGroup, 1); - - [Export] - public static ToolBarItemDefinition DecompileToolBarItem = new CommandToolBarItemDefinition( - UIXFileToolBarGroup, 2); - - [Export] - public static ToolBarItemGroupDefinition UIXDebuggerToolBarGroup = new(UIXToolBar, 9); - - [Export] - public static ToolBarItemDefinition StartStopDebuggerToolBarItem = new CommandToolBarItemDefinition( - UIXDebuggerToolBarGroup, 0, ToolBarItemDisplay.IconOnly); - - [Export] - public static ToolBarItemDefinition StepOverDebuggerToolBarItem = new CommandToolBarItemDefinition( - UIXDebuggerToolBarGroup, 4, ToolBarItemDisplay.IconOnly); - - [Export] - public static ToolBarItemDefinition ContinueDebuggerToolBarItem = new CommandToolBarItemDefinition( - UIXDebuggerToolBarGroup, 1, ToolBarItemDisplay.IconOnly); - } -} diff --git a/ZuneUIXTools/Modules/Shell/ViewModels/ShellViewModel.cs b/ZuneUIXTools/Modules/Shell/ViewModels/ShellViewModel.cs deleted file mode 100644 index a2cf54d..0000000 --- a/ZuneUIXTools/Modules/Shell/ViewModels/ShellViewModel.cs +++ /dev/null @@ -1,48 +0,0 @@ -using Caliburn.Micro; -using Gemini.Framework.Services; -using Gemini.Framework.Threading; -using Gemini.Modules.Shell.Views; -using Gemini.Modules.ToolBars; -using System; -using System.Collections.Generic; -using System.ComponentModel.Composition; -using System.Threading; -using System.Threading.Tasks; - -namespace ZuneUIXTools.Modules.Shell.ViewModels -{ - [Export(typeof(IShell))] - public class ShellViewModel : Gemini.Modules.Shell.ViewModels.ShellViewModel - { - static ShellViewModel() - { - ViewLocator.AddNamespaceMapping(typeof(ShellViewModel).Namespace, typeof(ShellView).Namespace); - } - - public override Task CanCloseAsync(CancellationToken cancellationToken) - { - var tcs = new TaskCompletionSource(); - - Coroutine.BeginExecute(CanClose().GetEnumerator(), null, (s, e) => tcs.SetResult(!e.WasCancelled)); - - return tcs.Task; - } - - private IEnumerable CanClose() - { - yield return new MessageBoxResult(); - } - - private class MessageBoxResult : IResult - { - public event EventHandler Completed; - - public void Execute(CoroutineExecutionContext context) - { - var result = System.Windows.MessageBoxResult.Yes; - - Completed(this, new ResultCompletionEventArgs { WasCancelled = (result != System.Windows.MessageBoxResult.Yes) }); - } - } - } -} diff --git a/ZuneUIXTools/Modules/Startup/Module.cs b/ZuneUIXTools/Modules/Startup/Module.cs deleted file mode 100644 index 33af588..0000000 --- a/ZuneUIXTools/Modules/Startup/Module.cs +++ /dev/null @@ -1,58 +0,0 @@ -using Gemini.Framework; -using Gemini.Modules.ErrorList; -using Gemini.Modules.Output; -using Microsoft.Iris.Markup; -using Microsoft.Iris.Session; -using System; -using System.Collections; -using System.ComponentModel.Composition; -using System.Windows; -using System.Windows.Media.Imaging; - -namespace ZuneUIXTools.Modules.Startup -{ - [Export(typeof(IModule))] - public class Module : ModuleBase - { - private readonly IOutput _output; - private readonly IErrorList _errorList; - - [ImportingConstructor] - public Module(IOutput output, IErrorList errorList) - { - _output = output; - _errorList = errorList; - } - - public override void Initialize() - { - Shell.ShowFloatingWindowsInTaskbar = true; - Shell.ToolBars.Visible = true; - - //MainWindow.WindowState = WindowState.Maximized; - MainWindow.Title = "Zune UIX Tools"; - MainWindow.Icon = new BitmapImage(new Uri("pack://application:,,,/ZuneUIXTools;component/Images/VCSIrisProject.ico")); - - MarkupSystem.Startup(true); - ErrorManager.OnErrors += (IList errors) => { - foreach (object obj in errors) - { - if (obj is not ErrorRecord err) continue; - -#if DEBUG - System.Diagnostics.Debug.WriteLine(err.Message); -#else - Console.WriteLine(err.Message); -#endif - - _errorList.AddItem(err.Warning ? ErrorListItemType.Warning : ErrorListItemType.Error, - err.Message, err.Context, err.Line < 0 ? null : err.Line, err.Column < 0 ? null : err.Column); - } - }; - - Shell.StatusBar.AddItem("UIX ready", new GridLength(1, GridUnitType.Star)); - - _output.AppendLine("Initialized UIX markup system"); - } - } -} diff --git a/ZuneUIXTools/Modules/UIX/DebuggerService.cs b/ZuneUIXTools/Modules/UIX/DebuggerService.cs deleted file mode 100644 index 89c60a7..0000000 --- a/ZuneUIXTools/Modules/UIX/DebuggerService.cs +++ /dev/null @@ -1,92 +0,0 @@ -using Gemini.Modules.Output; -using Microsoft.Iris.Debug; -using Microsoft.Iris.Debug.Data; -using Microsoft.Iris.Debug.SystemNet; -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Collections.Immutable; -using System.ComponentModel.Composition; -using System.Linq; -using System.Text; - -namespace ZuneUIXTools.Modules.UIX; - -[Export(typeof(DebuggerService))] -public class DebuggerService -{ - private readonly IOutput _output; - private readonly ConcurrentDictionary> _entriesByFile = new(); - - public event Action Stopped; - - [ImportingConstructor] - public DebuggerService(IOutput output) - { - _output = output; - } - - public bool IsRunning => Client != null; - - public IDebuggerClient Client { get; private set; } - - public IReadOnlyDictionary> ConstructedFiles => _entriesByFile; - - public bool IsInBreakMode { get; private set; } - - public void Start(string connectionUri = null) - { - Stop(); - - Client = new NetDebuggerClient(connectionUri); - Client.InterpreterDecode += ClientInterpreterDecode; - Client.InterpreterExecute += ClientInterpreterExecute; - - _output.AppendLine($"Debugger listening on {Client.ConnectionUri}"); - } - - public void Stop() - { - _entriesByFile.Clear(); - - if (Client is null) - return; - else if (Client is IDisposable disposable) - disposable.Dispose(); - - Client.InterpreterDecode -= ClientInterpreterDecode; - Client.InterpreterExecute -= ClientInterpreterExecute; - Client = null; - - Stopped?.Invoke(); - _output.AppendLine("Debugger disconnected"); - } - - public string PrintDisassembly(string uri) - { - if (!_entriesByFile.TryGetValue(uri, out var entries)) - throw new ArgumentException(); - - var sortedEntries = entries.ToImmutableSortedSet(); - - StringBuilder sb = new(); - sb.AppendJoin(Environment.NewLine, sortedEntries.Select(e => e.ToString())); - return sb.ToString(); - } - - private void ClientInterpreterDecode(object sender, InterpreterInstruction currentInstruction) - { - _output.AppendLine("[UIX Dec] " + currentInstruction.ToString()); - - var entries = _entriesByFile.GetOrAdd(currentInstruction.LoadUri, _ => new()); - - if (entries.Any(e => e.Offset == currentInstruction.Offset)) - return; - entries.Add(currentInstruction); - } - - private void ClientInterpreterExecute(object sender, InterpreterEntry entry) - { - _output.AppendLine("[UIX Exe] " + entry.ToString()); - } -} diff --git a/ZuneUIXTools/Modules/UIX/StartStopDebuggerCommandHandler.cs b/ZuneUIXTools/Modules/UIX/StartStopDebuggerCommandHandler.cs deleted file mode 100644 index ceadd37..0000000 --- a/ZuneUIXTools/Modules/UIX/StartStopDebuggerCommandHandler.cs +++ /dev/null @@ -1,50 +0,0 @@ -using Gemini.Framework.Commands; -using Gemini.Framework.Services; -using Gemini.Modules.Inspector; -using System.ComponentModel.Composition; -using System.Threading.Tasks; -using ZuneUIXTools.Modules.Shell.Commands; -using ZuneUIXTools.Modules.UIXCompiled; - -namespace ZuneUIXTools.Modules.UIX; - -[CommandHandler] -public class StartStopDebuggerCommandHandler : CommandHandlerBase -{ - private readonly DebuggerService _debuggerService; - private readonly IShell _shell; - private readonly IInspectorTool _inspector; - private UIBDisassemblyViewModel _disassemblyViewModel; - - [ImportingConstructor] - public StartStopDebuggerCommandHandler(DebuggerService debuggerService, IShell shell, IInspectorTool inspector) - { - _debuggerService = debuggerService; - _shell = shell; - _inspector = inspector; - } - - public override async Task Run(Command command) - { - if (_debuggerService.IsRunning) - { - _debuggerService.Stop(); - await _inspector.TryCloseAsync(); - } - else - { - _debuggerService.Start(); - _disassemblyViewModel = new(_debuggerService, _shell); - await _shell.OpenDocumentAsync(_disassemblyViewModel); - } - - Update(command); - } - - public override void Update(Command command) - { - base.Update(command); - - StartStopDebuggerCommandDefinition.UpdateCommand(command, _debuggerService.IsRunning); - } -} diff --git a/ZuneUIXTools/Modules/UIX/UIXEditorViewModelBase.cs b/ZuneUIXTools/Modules/UIX/UIXEditorViewModelBase.cs deleted file mode 100644 index 464f717..0000000 --- a/ZuneUIXTools/Modules/UIX/UIXEditorViewModelBase.cs +++ /dev/null @@ -1,113 +0,0 @@ -using Gemini.Framework; -using Gemini.Framework.Commands; -using Gemini.Framework.Threading; -using System; -using System.IO; -using System.Threading; -using System.Threading.Tasks; -using System.Windows; -using ZuneUIXTools.Modules.Shell.Commands; -using IrisApp = Microsoft.Iris.Application; - -namespace ZuneUIXTools.Modules.UIX -{ -#pragma warning disable CS0659 - public abstract class UIXEditorViewModelBase : PersistedDocument, ICommandHandler -#pragma warning restore CS0659 - { - private string _uiRoot; - - public string UIRoot - { - get => _uiRoot; - set => Set(ref _uiRoot, value); - } - - protected UIElement View { get; set; } - - public override bool Equals(object obj) - { - var other = obj as PersistedDocument; - return other != null - && string.Equals(FilePath, other.FilePath, StringComparison.InvariantCultureIgnoreCase) - && string.Equals(FileName, other.FileName, StringComparison.InvariantCultureIgnoreCase); - } - - void ICommandHandler.Update(Command command) - { - command.Enabled = !(IsNew || IsDirty); - } - - Task ICommandHandler.Run(Command command) - { - Thread _buildThread = new(new ThreadStart(DecompileCode)); - _buildThread.SetApartmentState(ApartmentState.STA); - _buildThread.IsBackground = true; - _buildThread.Start(); - - return TaskUtility.Completed; - } - - private void DecompileCode() - { - try - { - Microsoft.Iris.Debug.Trace.EnableAllCategories(true); - IrisApp.Initialize(); - } - catch { } - - try - { - //Microsoft.Iris.Debug.ZmqDebuggerClient debugger = new(); - //debugger.InterpreterStep += (ctx, entry) => System.Diagnostics.Debug.WriteLine($"[UIXT] [Interpreter] [{ctx}] {entry}"); - - //IrisApp.Window.RequestLoad("res://ZuneShellResources!Frame.uix#Frame"); - - AppDomain.CurrentDomain.AssemblyResolve += (sender, e) => - { - if (e.Name.StartsWith("Zune")) - { - // Load recompiled binaries instead - System.Reflection.AssemblyName asmName = new(e.Name); - return System.Reflection.Assembly.LoadFrom(Path.Combine(@"C:\Program Files\Zune", asmName.Name + ".dll")); - } - - return null; - }; - IrisApp.AddImportRedirect("res://ZuneShellResources!", "file://D:/Documents/Ghidra/Zune/ZuneShellResouces/"); - IrisApp.AddImportRedirect("res://ZuneMarketplaceResources!", "file://D:/Documents/Ghidra/Zune/ZuneMarketplaceResources/"); - //IrisApp.AddImportRedirect("assembly://ZuneShell", "file://D:/Repos/ZuneDev/ZuneShell.dll/ZuneShell/bin/x64/Debug/net48/ZuneShell.dll"); - - IrisApp.Window.RequestLoad("file://" + FilePath + (UIRoot == null ? string.Empty : "#" + UIRoot)); - IrisApp.DebugSettings.UseDecompiler = true; - IrisApp.Run(); - IrisApp.DebugSettings.UseDecompiler = false; - } - catch (Exception ex) - { - View.Dispatcher.Invoke(() => - { - MessageBox.Show( - $"Failed to decompile '{FilePath}'", - "Zune UIX Tools", MessageBoxButton.OK, MessageBoxImage.Error - ); - System.Diagnostics.Debug.WriteLine(ex.ToString()); - }); - } - finally - { - // Even if there were errors, save the decomp results. - var results = IrisApp.DebugSettings.DecompileResults; - if (results != null && results.Count > 0) - { - for (int i = 0; i < results.Count; i++) - { - var result = results[i]; - File.WriteAllText(Path.ChangeExtension(FilePath, $"{i}.decomp.uix"), result.Doc.InnerXml); - } - } - } - } - } -} diff --git a/ZuneUIXTools/Modules/UIXCompiled/UIBDisassemblyView.xaml b/ZuneUIXTools/Modules/UIXCompiled/UIBDisassemblyView.xaml deleted file mode 100644 index f08b7d6..0000000 --- a/ZuneUIXTools/Modules/UIXCompiled/UIBDisassemblyView.xaml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ZuneUIXTools/Modules/UIXCompiled/UIBDisassemblyView.xaml.cs b/ZuneUIXTools/Modules/UIXCompiled/UIBDisassemblyView.xaml.cs deleted file mode 100644 index 4921451..0000000 --- a/ZuneUIXTools/Modules/UIXCompiled/UIBDisassemblyView.xaml.cs +++ /dev/null @@ -1,42 +0,0 @@ -using MahApps.Metro.Controls; -using Microsoft.Iris.Debug.Data; -using System.Windows; -using System.Windows.Controls; - -namespace ZuneUIXTools.Modules.UIXCompiled -{ - /// - /// Interaction logic for UIBDisassemblyView.xaml - /// - public partial class UIBDisassemblyView : UserControl - { - public UIBDisassemblyViewModel ViewModel => (UIBDisassemblyViewModel)DataContext; - - public UIBDisassemblyView() - { - InitializeComponent(); - - InstructionListView.Loaded += InstructionListView_Loaded; - } - - private void InstructionListView_Loaded(object sender, RoutedEventArgs e) - { - InstructionListView.Loaded -= InstructionListView_Loaded; - InstructionListView.FindChild().ScrollChanged += InstructionListView_ScrollChanged; - } - - private void InstructionListView_ScrollChanged(object sender, ScrollChangedEventArgs e) - { - if (ViewModel.AutoScroll && e.ExtentHeightChange != 0) - ((ScrollViewer)sender).ScrollToBottom(); - } - - private void InstructionListView_SelectionChanged(object sender, SelectionChangedEventArgs e) - { - if (e.AddedItems.Count <= 0) - return; - - ViewModel.SetInspector(e.AddedItems[0] as InterpreterEntry); - } - } -} diff --git a/ZuneUIXTools/Modules/UIXCompiled/UIBDisassemblyViewModel.cs b/ZuneUIXTools/Modules/UIXCompiled/UIBDisassemblyViewModel.cs deleted file mode 100644 index 6823493..0000000 --- a/ZuneUIXTools/Modules/UIXCompiled/UIBDisassemblyViewModel.cs +++ /dev/null @@ -1,119 +0,0 @@ -using Caliburn.Micro; -using Gemini.Framework; -using Gemini.Framework.Services; -using Gemini.Modules.Inspector; -using Gemini.Modules.Inspector.Conventions; -using Gemini.Modules.Inspector.Inspectors; -using Microsoft.Iris.Debug.Data; -using System; -using System.Collections.ObjectModel; -using System.ComponentModel; -using System.ComponentModel.Composition; -using System.Linq; -using ZuneUIXTools.Converters; -using ZuneUIXTools.Modules.Inspectors; -using ZuneUIXTools.Modules.UIX; - -namespace ZuneUIXTools.Modules.UIXCompiled; - -[Export(typeof(UIBDisassemblyViewModel))] -public class UIBDisassemblyViewModel : Document -{ - readonly DebuggerService _debuggerService; - readonly IShell _shell; - UIBDisassemblyView _view; - bool _autoScroll; - - public ObservableCollection Instructions { get; } = new(); - - public bool AutoScroll - { - get => _autoScroll; - set => Set(ref _autoScroll, value); - } - - [ImportingConstructor] - public UIBDisassemblyViewModel(DebuggerService debuggerService, IShell shell) - { - _debuggerService = debuggerService; - _debuggerService.Client.InterpreterExecute += ClientInterpreterExecute; - - _shell = shell; - - DisplayName = $"UIB Disassembler ('{_debuggerService.Client.ConnectionUri}')"; - } - - private void ClientInterpreterExecute(object sender, InterpreterEntry entry) - { - _view?.Dispatcher.Invoke(() => - { - Instructions.Add(entry); - }); - } - - protected override void OnViewReady(object view) - { - base.OnViewReady(view); - - _view = (UIBDisassemblyView)view; - } - - public void SetInspector(InterpreterEntry entry) - { - var props = (from PropertyDescriptor x in TypeDescriptor.GetProperties(entry) where x.IsBrowsable select x).ToList(); - - DefaultPropertyInspectors.InspectorBuilders.Add(new EnumerablePropertyEditorBuilder()); - - var inspector = IoC.Get(); - inspector.SelectedObject = new InspectableObjectBuilder() - .WithObjectProperties(entry, obj => !(obj.Name == nameof(entry.Parameters) || obj.Name == nameof(entry.ReturnValues))) - .WithCollapsibleGroup("Parameters", - b => b.WithEditor(entry, e => e.Parameters, new EnumerableEditorViewModel(InterpreterObjectBuilder))) - .WithCollapsibleGroup("Return values", - b => b.WithEditor(entry, e => e.ReturnValues, new EnumerableEditorViewModel(InterpreterObjectBuilder))) - .ToInspectableObject(); - - _shell.ShowTool(inspector); - } - - private static InspectableObject InterpreterObjectBuilder(object obj) - { - if (obj is not InterpreterObject instance) - throw new ArgumentException(null, nameof(obj)); - - bool filter(PropertyDescriptor prop) - { - if (prop.Name == nameof(instance.TableIndex) && instance.TableIndex == -1) - return false; - else if (prop.Name == nameof(instance.Value)) - return false; - - return prop.GetValue(instance) != null; - } - - InspectableObjectBuilder builder = new InspectableObjectBuilder() - .WithObjectProperties(instance, filter); - - var valueType = instance.Value?.GetType() ?? instance.Type; - if (valueType is not null) - { - PropertyDescriptor valueProperty = TypeDescriptor.CreateProperty(typeof(InterpreterObject), "Value", valueType); - IEditor editor = DefaultPropertyInspectors.CreateEditor(valueProperty); - if (editor is null) - { - builder = builder.WithCollapsibleGroup(nameof(instance.Value), b => - b.WithObjectProperties(instance.Value, _ => true)); - } - else - { - var converterProp = editor.GetType().GetProperty("Converter"); - converterProp?.SetValue(editor, new CastValueConverter()); - - editor.BoundPropertyDescriptor = new BoundPropertyDescriptor(instance, valueProperty); - builder = builder.WithEditor(instance, i => i.Value, editor); - } - } - - return builder.ToInspectableObject(); - } -} diff --git a/ZuneUIXTools/Modules/UIXCompiled/UIBEditorProvider.cs b/ZuneUIXTools/Modules/UIXCompiled/UIBEditorProvider.cs deleted file mode 100644 index 08a5ac4..0000000 --- a/ZuneUIXTools/Modules/UIXCompiled/UIBEditorProvider.cs +++ /dev/null @@ -1,38 +0,0 @@ -using Gemini.Framework; -using Gemini.Framework.Services; -using System; -using System.Collections.Generic; -using System.ComponentModel.Composition; -using System.IO; -using System.Threading.Tasks; - -namespace ZuneUIXTools.Modules.UIXCompiled -{ - [Export(typeof(IEditorProvider))] - public class UIBEditorProvider : IEditorProvider - { - private static readonly List _extensions = new() - { - ".uib", - }; - - public IEnumerable FileTypes - { - get { yield return new EditorFileType("Compiled Microsoft Iris UI", ".uib"); } - } - - public bool CanCreateNew => false; - - public bool Handles(string path) - { - var extension = Path.GetExtension(path); - return _extensions.Contains(extension.ToLowerInvariant()); - } - - public IDocument Create() => new UIXCompiledEditorViewModel(); - - public async Task New(IDocument document, string name) => await ((UIXCompiledEditorViewModel)document).New(name); - - public async Task Open(IDocument document, string path) => await ((UIXCompiledEditorViewModel)document).Load(path); - } -} diff --git a/ZuneUIXTools/Modules/UIXCompiled/UIXCompiledEditorView.xaml b/ZuneUIXTools/Modules/UIXCompiled/UIXCompiledEditorView.xaml deleted file mode 100644 index 6a79056..0000000 --- a/ZuneUIXTools/Modules/UIXCompiled/UIXCompiledEditorView.xaml +++ /dev/null @@ -1,11 +0,0 @@ - - - diff --git a/ZuneUIXTools/Modules/UIXCompiled/UIXCompiledEditorView.xaml.cs b/ZuneUIXTools/Modules/UIXCompiled/UIXCompiledEditorView.xaml.cs deleted file mode 100644 index cdfea58..0000000 --- a/ZuneUIXTools/Modules/UIXCompiled/UIXCompiledEditorView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace ZuneUIXTools.Modules.UIXCompiled -{ - /// - /// Interaction logic for UIXCompiledEditorView.xaml - /// - public partial class UIXCompiledEditorView : UserControl - { - public UIXCompiledEditorView() - { - InitializeComponent(); - } - } -} diff --git a/ZuneUIXTools/Modules/UIXCompiled/UIXCompiledEditorViewModel.cs b/ZuneUIXTools/Modules/UIXCompiled/UIXCompiledEditorViewModel.cs deleted file mode 100644 index a77026a..0000000 --- a/ZuneUIXTools/Modules/UIXCompiled/UIXCompiledEditorViewModel.cs +++ /dev/null @@ -1,56 +0,0 @@ -using Gemini.Framework.Threading; -using System; -using System.ComponentModel.Composition; -using System.IO; -using System.Linq; -using System.Threading.Tasks; - -namespace ZuneUIXTools.Modules.UIXCompiled -{ - [Export(typeof(UIXCompiledEditorViewModel))] -#pragma warning disable 659 - public class UIXCompiledEditorViewModel : UIX.UIXEditorViewModelBase -#pragma warning restore 659 - { - private UIXCompiledEditorView _view; - private byte[] _originalBytes; - - protected override Task DoNew() - { - _originalBytes = Array.Empty(); - ApplyOriginalText(); - return TaskUtility.Completed; - } - - protected override Task DoLoad(string filePath) - { - _originalBytes = File.ReadAllBytes(filePath); - ApplyOriginalText(); - return TaskUtility.Completed; - } - - protected override Task DoSave(string filePath) - { - _view.HexEditor.SaveCurrentState(filePath); - _originalBytes = _view.HexEditor.GetAllBytes(); - return TaskUtility.Completed; - } - - private void ApplyOriginalText() - { - _view.HexEditor.Stream?.Dispose(); - _view.HexEditor.Stream = new MemoryStream(_originalBytes); - _view.HexEditor.UpdateVisual(); - - _view.HexEditor.BytesModified += delegate - { - IsDirty = !_originalBytes.SequenceEqual(_view.HexEditor.GetAllBytes()); - }; - } - - protected override void OnViewLoaded(object view) - { - View = _view = (UIXCompiledEditorView)view; - } - } -} \ No newline at end of file diff --git a/ZuneUIXTools/Modules/UIXCompiled/UIXLogView.xaml b/ZuneUIXTools/Modules/UIXCompiled/UIXLogView.xaml deleted file mode 100644 index 95f348c..0000000 --- a/ZuneUIXTools/Modules/UIXCompiled/UIXLogView.xaml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ZuneUIXTools/Modules/UIXCompiled/UIXLogView.xaml.cs b/ZuneUIXTools/Modules/UIXCompiled/UIXLogView.xaml.cs deleted file mode 100644 index 8caae03..0000000 --- a/ZuneUIXTools/Modules/UIXCompiled/UIXLogView.xaml.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System.Windows; -using System.Windows.Controls; -using MahApps.Metro.Controls; -using Microsoft.Iris.Debug.Data; - -namespace ZuneUIXTools.Modules.UIXCompiled; - -public partial class UIXLogView : UserControl -{ - public UIBDisassemblyViewModel ViewModel => (UIBDisassemblyViewModel)DataContext; - - public UIXLogView() - { - InitializeComponent(); - - InstructionListView.Loaded += InstructionListView_Loaded; - } - - private void InstructionListView_Loaded(object sender, RoutedEventArgs e) - { - InstructionListView.Loaded -= InstructionListView_Loaded; - InstructionListView.FindChild().ScrollChanged += InstructionListView_ScrollChanged; - } - - private void InstructionListView_ScrollChanged(object sender, ScrollChangedEventArgs e) - { - if (ViewModel.AutoScroll && e.ExtentHeightChange != 0) - ((ScrollViewer)sender).ScrollToBottom(); - } - - private void InstructionListView_SelectionChanged(object sender, SelectionChangedEventArgs e) - { - if (e.AddedItems.Count <= 0) - return; - - ViewModel.SetInspector(e.AddedItems[0] as InterpreterEntry); - } -} \ No newline at end of file diff --git a/ZuneUIXTools/Modules/UIXSource/UIXEditorProvider.cs b/ZuneUIXTools/Modules/UIXSource/UIXEditorProvider.cs deleted file mode 100644 index 61bef61..0000000 --- a/ZuneUIXTools/Modules/UIXSource/UIXEditorProvider.cs +++ /dev/null @@ -1,38 +0,0 @@ -using Gemini.Framework; -using Gemini.Framework.Services; -using System.Collections.Generic; -using System.ComponentModel.Composition; -using System.IO; -using System.Threading.Tasks; - -namespace ZuneUIXTools.Modules.UIXSource -{ - [Export(typeof(IEditorProvider))] - public class UIXEditorProvider : IEditorProvider - { - private static readonly List _extensions = new() - { - ".uix", - ".xml" - }; - - public IEnumerable FileTypes - { - get { yield return new EditorFileType("Microsoft Iris UI", ".uix"); } - } - - public bool CanCreateNew => true; - - public bool Handles(string path) - { - var extension = Path.GetExtension(path); - return _extensions.Contains(extension.ToLowerInvariant()); - } - - public IDocument Create() => new UIXSourceEditorViewModel(); - - public async Task New(IDocument document, string name) => await ((UIXSourceEditorViewModel)document).New(name); - - public async Task Open(IDocument document, string path) => await ((UIXSourceEditorViewModel)document).Load(path); - } -} diff --git a/ZuneUIXTools/Modules/UIXSource/UIXSourceEditorView.xaml b/ZuneUIXTools/Modules/UIXSource/UIXSourceEditorView.xaml deleted file mode 100644 index 4cf3e3c..0000000 --- a/ZuneUIXTools/Modules/UIXSource/UIXSourceEditorView.xaml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - diff --git a/ZuneUIXTools/Modules/UIXSource/UIXSourceEditorView.xaml.cs b/ZuneUIXTools/Modules/UIXSource/UIXSourceEditorView.xaml.cs deleted file mode 100644 index 41a4040..0000000 --- a/ZuneUIXTools/Modules/UIXSource/UIXSourceEditorView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace ZuneUIXTools.Modules.UIXSource -{ - /// - /// Interaction logic for UIXSourceEditorView.xaml - /// - public partial class UIXSourceEditorView : UserControl - { - public UIXSourceEditorView() - { - InitializeComponent(); - } - } -} diff --git a/ZuneUIXTools/Modules/UIXSource/UIXSourceEditorViewModel.cs b/ZuneUIXTools/Modules/UIXSource/UIXSourceEditorViewModel.cs deleted file mode 100644 index 63ba8ba..0000000 --- a/ZuneUIXTools/Modules/UIXSource/UIXSourceEditorViewModel.cs +++ /dev/null @@ -1,231 +0,0 @@ -using Caliburn.Micro; -using Gemini.Framework.Commands; -using Gemini.Framework.Threading; -using Gemini.Modules.ErrorList; -using Gemini.Modules.Output; -using Microsoft.Iris; -using Microsoft.Iris.Debug.SystemNet; -using Microsoft.Iris.Markup; -using System; -using System.ComponentModel.Composition; -using System.IO; -using System.Threading; -using System.Threading.Tasks; -using System.Windows; -using ZuneUIXTools.Modules.Shell.Commands; -using ZuneUIXTools.Modules.UIX; -using Application = Microsoft.Iris.Application; -using Command = Gemini.Framework.Commands.Command; - -namespace ZuneUIXTools.Modules.UIXSource -{ - [Export(typeof(UIXSourceEditorViewModel))] -#pragma warning disable 659 - public class UIXSourceEditorViewModel : UIXEditorViewModelBase, ICommandHandler, ICommandHandler, - ICommandHandler, ICommandHandler -#pragma warning restore 659 - { - private readonly IOutput _output = IoC.Get(); - private readonly IErrorList _errorList = IoC.Get(); - private readonly DebuggerService _debuggerService = IoC.Get(); - - private UIXSourceEditorView _view; - private string _originalText; - private string _debuggerConnectionUri = App.DEFAULT_DEBUG_URI; - - public bool CanBuild => !string.IsNullOrWhiteSpace(_view.CodeEditor.Text); - - protected override Task DoNew() - { - _originalText = string.Empty; - ApplyOriginalText(); - return TaskUtility.Completed; - } - - protected override Task DoLoad(string filePath) - { - _originalText = File.ReadAllText(filePath); - ApplyOriginalText(); - return TaskUtility.Completed; - } - - protected override Task DoSave(string filePath) - { - _view.CodeEditor.Save(filePath); - _originalText = _view.CodeEditor.Text; - return TaskUtility.Completed; - } - - private void ApplyOriginalText() - { - _view.CodeEditor.Text = _originalText; - - _view.CodeEditor.TextChanged += delegate - { - IsDirty = string.Compare(_originalText, _view.CodeEditor.Text) != 0; - }; - } - - protected override void OnViewLoaded(object view) - { - _view = (UIXSourceEditorView)view; - } - - public override bool Equals(object obj) - { - var other = obj as UIXSourceEditorViewModel; - return other != null - && string.Equals(FilePath, other.FilePath, StringComparison.InvariantCultureIgnoreCase) - && string.Equals(FileName, other.FileName, StringComparison.InvariantCultureIgnoreCase); - } - - private void StartBuildAndRun(bool attachDebugger) - { - var buildThread = new Thread(BuildAndRun); - buildThread.SetApartmentState(ApartmentState.STA); - buildThread.IsBackground = true; - buildThread.Start(attachDebugger); - } - - private void BuildAndRun(object parameter) - { - string sourceFile = FilePath; - string compiledFile = Path.ChangeExtension(sourceFile, "uib"); - - bool attachDebugger = (bool)parameter; - if (attachDebugger) - { - // Set up debugger client - var debuggerService = IoC.Get(); - debuggerService.Start(_debuggerConnectionUri); - - debuggerService.Client.UpdateBreakpoint(new($"file://{compiledFile}", 1)); - debuggerService.Client.DebuggerCommand = Microsoft.Iris.Debug.Data.InterpreterCommand.Continue; - debuggerService.Client.RequestLineNumberTable($"file://{sourceFile}", entries => - { - foreach (var entry in entries) - _output.AppendLine($"{entry.Offset} => {entry.Line}, {entry.Column}"); - }); - - // Set up debugger server - Application.DebugSettings.DebugConnectionUri = _debuggerConnectionUri; - Application.Initialized += () => - { - // Server is ready, run the application - Run(sourceFile, compiledFile); - }; - } - _output.AppendLine($"Compiling '{sourceFile}'..."); - - bool isSuccess = false; - try - { - isSuccess = MarkupCompiler.Compile( - new[] - { - new CompilerInput() - { - SourceFileName = sourceFile, - OutputFileName = compiledFile - } - }, - new CompilerInput() - ); - } - catch (Exception ex) - { - _errorList.AddItem(ErrorListItemType.Error, "Compiling failed: " + ex.Message, sourceFile, null, null); - } - - if (!isSuccess) - { - var dialogResult = MessageBox.Show( - "There were build errors. Would you like to continue and run the last successful build?", - "Zune UIX Tools", MessageBoxButton.YesNo, MessageBoxImage.Information - ); - if (dialogResult != MessageBoxResult.Yes) - return; - } - - try - { - Application.Initialize(); - } - catch { } - - // No need to wait for the debugger to start - if (!attachDebugger) - Run(sourceFile, compiledFile); - } - - private void Run(string sourceFile, string compiledFile) - { - try - { - string uiRoot = string.IsNullOrEmpty(UIRoot) ? "Default" : UIRoot; - _output.AppendLine($"Loading UI '{uiRoot}' from '{compiledFile}'..."); - - Application.Window.SetBackgroundColor(new WindowColor(0xE6, 0xE6, 0xE6)); - Application.Window.RequestLoad($"file://{compiledFile}#{uiRoot}"); - Application.Window.CloseRequested += (object sender, WindowCloseRequestedEventArgs args) => - { - args.BlockCloseRequest(); - Application.Window.Visible = false; - - if (sender is Microsoft.Iris.Window window) - _output.AppendLine($"Window '{window.Handle}' closed"); - }; - - _output.AppendLine($"Application is running..."); - Application.Run(); - _output.AppendLine("Application exited"); - } - catch (Exception ex) - { - _errorList.AddItem(ErrorListItemType.Error, "Load failed: " + ex.Message, sourceFile, null, null); - } - } - - void ICommandHandler.Update(Command command) => command.Enabled = CanBuild; - - Task ICommandHandler.Run(Command command) - { - StartBuildAndRun(false); - return TaskUtility.Completed; - } - - void ICommandHandler.Update(Command command) => command.Enabled = CanBuild; - - Task ICommandHandler.Run(Command command) - { - StartBuildAndRun(true); - return TaskUtility.Completed; - } - - void ICommandHandler.Update(Command command) - { - command.Visible = _debuggerService.Client != null; - command.Enabled = _debuggerService.Client != null - && _debuggerService.Client.DebuggerCommand == Microsoft.Iris.Debug.Data.InterpreterCommand.Break; - } - - Task ICommandHandler.Run(Command command) - { - _debuggerService.Client.DebuggerCommand = Microsoft.Iris.Debug.Data.InterpreterCommand.Step; - return Task.CompletedTask; - } - - void ICommandHandler.Update(Command command) - { - command.Visible = _debuggerService.Client != null; - command.Enabled = _debuggerService.Client != null - && _debuggerService.Client.DebuggerCommand != Microsoft.Iris.Debug.Data.InterpreterCommand.Continue; - } - - Task ICommandHandler.Run(Command command) - { - _debuggerService.Client.DebuggerCommand = Microsoft.Iris.Debug.Data.InterpreterCommand.Continue; - return Task.CompletedTask; - } - } -} \ No newline at end of file diff --git a/ZuneUIXTools/Template/IrisProjTemplate.csproj b/ZuneUIXTools/Template/IrisProjTemplate.csproj deleted file mode 100644 index 7d9a2d7..0000000 --- a/ZuneUIXTools/Template/IrisProjTemplate.csproj +++ /dev/null @@ -1,51 +0,0 @@ - - - - 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/ZuneUIXTools/ZuneUIXTools.csproj b/ZuneUIXTools/ZuneUIXTools.csproj deleted file mode 100644 index 7de6d01..0000000 --- a/ZuneUIXTools/ZuneUIXTools.csproj +++ /dev/null @@ -1,47 +0,0 @@ - - - - WinExe - net6.0-windows - true - Images\VCSIrisProject.ico - True - ..\libs\MicrosoftIris\36MSApp1024.snk - True - true - - 1.0.76-beta - - - - x64 - - - - - PreserveNewest - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ZuneUIXTools/lib/UIXrender.dll b/ZuneUIXTools/lib/UIXrender.dll deleted file mode 100644 index 08989cc..0000000 Binary files a/ZuneUIXTools/lib/UIXrender.dll and /dev/null differ diff --git a/ZuneUIXTools/lib/UIXsup.dll b/ZuneUIXTools/lib/UIXsup.dll deleted file mode 100644 index d480565..0000000 Binary files a/ZuneUIXTools/lib/UIXsup.dll and /dev/null differ