GUI: Add "Not a decompiler" dialog on startup
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
<Authors>Katy Coe</Authors>
|
||||
<Company>Noisy Cow Studios</Company>
|
||||
<Product>Il2CppInspector Windows Edition</Product>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
@@ -25,6 +26,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Ookii.Dialogs.Wpf.NETCore" Version="2.0.0" />
|
||||
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.7.0" />
|
||||
<PackageReference Include="XamlAnimatedGif" Version="1.2.2">
|
||||
<NoWarn>NU1701</NoWarn>
|
||||
</PackageReference>
|
||||
@@ -38,4 +40,19 @@
|
||||
<Resource Include="Resources\pizza.gif" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="User.Designer.cs">
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>User.settings</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="User.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>User.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -7,7 +7,8 @@
|
||||
xmlns:gif="https://github.com/XamlAnimatedGif/XamlAnimatedGif"
|
||||
mc:Ignorable="d"
|
||||
Title="Il2CppInspector" Height="630" Width="990" Background="White"
|
||||
WindowStartupLocation="CenterScreen">
|
||||
WindowStartupLocation="CenterScreen"
|
||||
ContentRendered="MainWindow_OnContentRendered">
|
||||
<Window.Resources>
|
||||
<!-- Our favourite colours -->
|
||||
<SolidColorBrush x:Key="MicrosoftBlue" Color="#00A2ED"/>
|
||||
|
||||
@@ -23,6 +23,7 @@ using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using Microsoft.Win32;
|
||||
using Il2CppInspector;
|
||||
using Il2CppInspector.GUI;
|
||||
using Il2CppInspector.Outputs;
|
||||
using Il2CppInspector.Reflection;
|
||||
using Ookii.Dialogs.Wpf;
|
||||
@@ -380,6 +381,27 @@ namespace Il2CppInspectorGUI
|
||||
}
|
||||
return ns;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Display startup information dialog
|
||||
/// </summary>
|
||||
private void MainWindow_OnContentRendered(object sender, EventArgs e) {
|
||||
if (User.Default.ShowDecompilerWarning) {
|
||||
var taskDialog = new TaskDialog {
|
||||
WindowTitle = "Information",
|
||||
MainInstruction = "Welcome to Il2CppInspector",
|
||||
Content = "NOTE: Il2CppInspector is not a decompiler. It can provide you with the structure of an application and function addresses for every method so that you can easily jump straight to methods of interest in your disassembler. It does not attempt to recover the entire source code of the application.",
|
||||
VerificationText = "Don't show this message again"
|
||||
};
|
||||
taskDialog.Buttons.Add(new TaskDialogButton(ButtonType.Close));
|
||||
taskDialog.ShowDialog(this);
|
||||
|
||||
if (taskDialog.IsVerificationChecked) {
|
||||
User.Default.ShowDecompilerWarning = false;
|
||||
User.Default.Save();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Replacement for TreeViewItem that includes checkbox state
|
||||
|
||||
38
Il2CppInspector.GUI/User.Designer.cs
generated
Normal file
38
Il2CppInspector.GUI/User.Designer.cs
generated
Normal file
@@ -0,0 +1,38 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Il2CppInspector.GUI {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0")]
|
||||
internal sealed partial class User : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static User defaultInstance = ((User)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new User())));
|
||||
|
||||
public static User Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
public bool ShowDecompilerWarning {
|
||||
get {
|
||||
return ((bool)(this["ShowDecompilerWarning"]));
|
||||
}
|
||||
set {
|
||||
this["ShowDecompilerWarning"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
9
Il2CppInspector.GUI/User.settings
Normal file
9
Il2CppInspector.GUI/User.settings
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="Il2CppInspector.GUI" GeneratedClassName="User">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="ShowDecompilerWarning" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
23
Il2CppInspector.GUI/app.manifest
Normal file
23
Il2CppInspector.GUI/app.manifest
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="*"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
</assembly>
|
||||
Reference in New Issue
Block a user