Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MishaProductions committed Apr 24, 2024
1 parent 31dbcfd commit b2f274e
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 81 deletions.
8 changes: 4 additions & 4 deletions Rectify11Installer.sln
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ Global
{45F8D600-1B82-4B91-B60C-5F8D9EBFDE9E}.Debug|Mixed Platforms.Build.0 = Debug|x64
{45F8D600-1B82-4B91-B60C-5F8D9EBFDE9E}.Debug|Win32.ActiveCfg = Debug|x86
{45F8D600-1B82-4B91-B60C-5F8D9EBFDE9E}.Debug|Win32.Build.0 = Debug|x86
{45F8D600-1B82-4B91-B60C-5F8D9EBFDE9E}.Debug|x64.ActiveCfg = Debug|Any CPU
{45F8D600-1B82-4B91-B60C-5F8D9EBFDE9E}.Debug|x64.Build.0 = Debug|Any CPU
{45F8D600-1B82-4B91-B60C-5F8D9EBFDE9E}.Debug|x64.ActiveCfg = Debug|x64
{45F8D600-1B82-4B91-B60C-5F8D9EBFDE9E}.Debug|x64.Build.0 = Debug|x64
{45F8D600-1B82-4B91-B60C-5F8D9EBFDE9E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{45F8D600-1B82-4B91-B60C-5F8D9EBFDE9E}.Release|Any CPU.Build.0 = Release|Any CPU
{45F8D600-1B82-4B91-B60C-5F8D9EBFDE9E}.Release|ARM64.ActiveCfg = Release|Any CPU
Expand All @@ -133,8 +133,8 @@ Global
{FE77612F-1E5C-42CA-B3E6-14ADF64A35CF}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{FE77612F-1E5C-42CA-B3E6-14ADF64A35CF}.Debug|Win32.ActiveCfg = Debug|Any CPU
{FE77612F-1E5C-42CA-B3E6-14ADF64A35CF}.Debug|Win32.Build.0 = Debug|Any CPU
{FE77612F-1E5C-42CA-B3E6-14ADF64A35CF}.Debug|x64.ActiveCfg = Debug|Any CPU
{FE77612F-1E5C-42CA-B3E6-14ADF64A35CF}.Debug|x64.Build.0 = Debug|Any CPU
{FE77612F-1E5C-42CA-B3E6-14ADF64A35CF}.Debug|x64.ActiveCfg = Debug|x64
{FE77612F-1E5C-42CA-B3E6-14ADF64A35CF}.Debug|x64.Build.0 = Debug|x64
{FE77612F-1E5C-42CA-B3E6-14ADF64A35CF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FE77612F-1E5C-42CA-B3E6-14ADF64A35CF}.Release|Any CPU.Build.0 = Release|Any CPU
{FE77612F-1E5C-42CA-B3E6-14ADF64A35CF}.Release|ARM64.ActiveCfg = Release|Any CPU
Expand Down
118 changes: 60 additions & 58 deletions Rectify11Installer/App.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,81 +9,83 @@
using WinUIForms;
using Application = Microsoft.UI.Xaml.Application;

namespace Rectify11Installer;

/// <summary>
/// C# equivalent of App.xaml
/// </summary>
internal class App : Application, IXamlMetadataProvider
namespace Rectify11Installer
{
private static XamlControlsXamlMetaDataProvider? xamlMetaDataProvider = null;
private bool _contentLoaded;
private Window _mainWindow;

private XamlControlsXamlMetaDataProvider _AppProvider
/// <summary>
/// C# equivalent of App.xaml
/// </summary>
internal class App : Application, IXamlMetadataProvider
{
get
private static XamlControlsXamlMetaDataProvider? xamlMetaDataProvider = null;
private bool _contentLoaded;
private Window _mainWindow;

private XamlControlsXamlMetaDataProvider _AppProvider
{
if (xamlMetaDataProvider == null)
get
{
xamlMetaDataProvider = new XamlControlsXamlMetaDataProvider();
if (xamlMetaDataProvider == null)
{
xamlMetaDataProvider = new XamlControlsXamlMetaDataProvider();
}
return xamlMetaDataProvider;
}
return xamlMetaDataProvider;
}
}

public App()
{
InitializeComponent();
}

public IXamlType GetXamlType(Type type)
{
return _AppProvider.GetXamlType(type);
}

public IXamlType GetXamlType(string fullName)
{
return _AppProvider.GetXamlType(fullName);
}

public XmlnsDefinition[] GetXmlnsDefinitions()
{
return _AppProvider.GetXmlnsDefinitions();
}
public App()
{
InitializeComponent();
}

public void InitializeComponent()
{
if (_contentLoaded)
public IXamlType GetXamlType(Type type)
{
return;
return _AppProvider.GetXamlType(type);
}
_contentLoaded = true;
base.DebugSettings.BindingFailed += delegate (object sender, BindingFailedEventArgs args)

public IXamlType GetXamlType(string fullName)
{
Debug.WriteLine(args.Message);
};
base.DebugSettings.XamlResourceReferenceFailed += delegate (DebugSettings sender, XamlResourceReferenceFailedEventArgs args)
return _AppProvider.GetXamlType(fullName);
}

public XmlnsDefinition[] GetXmlnsDefinitions()
{
Debug.WriteLine(args.Message);
};
base.UnhandledException += delegate
return _AppProvider.GetXmlnsDefinitions();
}

public void InitializeComponent()
{
if (Debugger.IsAttached)
if (_contentLoaded)
{
Debugger.Break();
return;
}
};
}
_contentLoaded = true;
base.DebugSettings.BindingFailed += delegate (object sender, BindingFailedEventArgs args)
{
Debug.WriteLine(args.Message);
};
base.DebugSettings.XamlResourceReferenceFailed += delegate (DebugSettings sender, XamlResourceReferenceFailedEventArgs args)
{
Debug.WriteLine(args.Message);
};
base.UnhandledException += delegate
{
if (Debugger.IsAttached)
{
Debugger.Break();
}
};
}

protected override void OnLaunched(LaunchActivatedEventArgs args)
{
base.OnLaunched(args);
protected override void OnLaunched(LaunchActivatedEventArgs args)
{
base.OnLaunched(args);

this.Resources.MergedDictionaries.Add(new XamlControlsResources());
this.Resources.MergedDictionaries.Add(new XamlControlsResources());

Form tmp = new FrmWizard();
_mainWindow = tmp.ToWinUI(new MicaBackdrop());
_mainWindow.Activate();
Form tmp = new FrmWizard();
_mainWindow = tmp.ToWinUI(new MicaBackdrop());
_mainWindow.Activate();
}
}
}
}
2 changes: 1 addition & 1 deletion Rectify11Installer/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1640,7 +1640,7 @@
<value>..\Resources\ResourceHacker.exe;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="Rectify11Phase2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\net7.0-windows10.0.20348.0\Rectify11.Phase2.exe;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>..\Resources\Rectify11.Phase2.exe;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="rectify11xml" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Core\rectify11.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
Expand Down
26 changes: 14 additions & 12 deletions Rectify11Installer/Rectify11Installer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,39 @@
<OutputType>WinExe</OutputType>
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>output\</PublishUrl>
<Install>false</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>6</ApplicationRevision>
<ApplicationVersion>3.0.1.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<LangVersion>10.0</LangVersion>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
<Platforms>AnyCPU;x64</Platforms>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x64</PlatformTarget>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CodeAnalysisRuleSet>empty.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<PlatformTarget>x64</PlatformTarget>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CodeAnalysisRuleSet>empty.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>x64</PlatformTarget>
<DebugType>none</DebugType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<UseVSHostingProcess>false</UseVSHostingProcess>
<GenerateSerializationAssemblies>On</GenerateSerializationAssemblies>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<PlatformTarget>x64</PlatformTarget>
<DebugType>none</DebugType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<UseVSHostingProcess>false</UseVSHostingProcess>
<GenerateSerializationAssemblies>On</GenerateSerializationAssemblies>
</PropertyGroup>
<PropertyGroup>
<ManifestCertificateThumbprint>845D9F3BB67E632FF0863EF4126FA9373741D7B9</ManifestCertificateThumbprint>
</PropertyGroup>
Expand Down
5 changes: 0 additions & 5 deletions Rectify11Installer/Rectify11Installer.csproj.user
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,4 @@
<SubType>Form</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Resources/Tools/rebuild_archives.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ REM This script generates the files.7z, extras.7z, and themes.7z needed for the

REM load command line arguments
set SolutionDir=%1
set ProjectDir=%2
set ProjectDir=%2\

REM Validate command line
if not exist %SolutionDir% (
Expand Down

0 comments on commit b2f274e

Please sign in to comment.