GUI: Busy indicator lightbox dialog
This commit is contained in:
@@ -11,8 +11,26 @@
|
|||||||
<Product>Il2CppInspector Windows Edition</Product>
|
<Product>Il2CppInspector Windows Edition</Product>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Remove="Resources\baby-spinner.gif" />
|
||||||
|
<None Remove="Resources\chemical-loading-spinner.gif" />
|
||||||
|
<None Remove="Resources\childs-drawing.gif" />
|
||||||
|
<None Remove="Resources\ConventionalOblongFairybluebird-small.gif" />
|
||||||
|
<None Remove="Resources\green-google-material-spinner.gif" />
|
||||||
|
<None Remove="Resources\pizza.gif" />
|
||||||
|
<None Remove="Resources\preview.gif" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="XamlAnimatedGif" Version="1.2.2" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Il2CppInspector.Common\Il2CppInspector.csproj" />
|
<ProjectReference Include="..\Il2CppInspector.Common\Il2CppInspector.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\pizza.gif" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
@@ -3,10 +3,14 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:Il2CppInspectorGUI"
|
xmlns:gif="https://github.com/XamlAnimatedGif/XamlAnimatedGif"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="Il2CppInspector" Height="450" Width="800" Background="White">
|
Title="Il2CppInspector" Height="450" Width="800" Background="White">
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
|
<!-- Our favourite colours -->
|
||||||
|
<SolidColorBrush x:Key="MicrosoftBlue" Color="#00A2ED"/>
|
||||||
|
<SolidColorBrush x:Key="WindowsBlue" Color="#357EC7"/>
|
||||||
|
|
||||||
<!-- Light box button -->
|
<!-- Light box button -->
|
||||||
<Style x:Key="FocusVisual">
|
<Style x:Key="FocusVisual">
|
||||||
<Setter Property="Control.Template">
|
<Setter Property="Control.Template">
|
||||||
@@ -30,7 +34,7 @@
|
|||||||
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
|
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
|
||||||
<Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
|
<Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
|
||||||
<Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
|
<Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
|
||||||
<Setter Property="Foreground" Value="#00A2ED"/>
|
<Setter Property="Foreground" Value="{StaticResource MicrosoftBlue}"/>
|
||||||
<Setter Property="BorderThickness" Value="1"/>
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
@@ -93,5 +97,13 @@
|
|||||||
<Button Name="btnSelectMetadataFile" Style="{StaticResource LightBoxButton}" Margin="100" Click="BtnSelectMetadataFile_OnClick">Select an IL2CPP metadata file</Button>
|
<Button Name="btnSelectMetadataFile" Style="{StaticResource LightBoxButton}" Margin="100" Click="BtnSelectMetadataFile_OnClick">Select an IL2CPP metadata file</Button>
|
||||||
<Button Name="btnSelectBinaryFile" Style="{StaticResource LightBoxButton}" Margin="100" Click="BtnSelectBinaryFile_OnClick" Visibility="Hidden">Select an IL2CPP binary file</Button>
|
<Button Name="btnSelectBinaryFile" Style="{StaticResource LightBoxButton}" Margin="100" Click="BtnSelectBinaryFile_OnClick" Visibility="Hidden">Select an IL2CPP binary file</Button>
|
||||||
<Button Name="btnBack" VerticalAlignment="Bottom" DockPanel.Dock="Bottom" Style="{StaticResource LightBoxButton}" Margin="20,0,630,20" FontSize="18" Click="BtnBack_OnClick" Visibility="Hidden"><< Back</Button>
|
<Button Name="btnBack" VerticalAlignment="Bottom" DockPanel.Dock="Bottom" Style="{StaticResource LightBoxButton}" Margin="20,0,630,20" FontSize="18" Click="BtnBack_OnClick" Visibility="Hidden"><< Back</Button>
|
||||||
|
|
||||||
|
<!-- Busy indicator -->
|
||||||
|
<Border Name="areaBusyIndicator" BorderThickness="1" CornerRadius="2" BorderBrush="Gray" HorizontalAlignment="Center" VerticalAlignment="Center" Background="#F8F8F8" SnapsToDevicePixels="True" Visibility="Hidden">
|
||||||
|
<StackPanel Margin="60,40,60,40">
|
||||||
|
<TextBlock Foreground="{StaticResource WindowsBlue}" FontSize="24">Getting things ready...</TextBlock>
|
||||||
|
<Image gif:AnimationBehavior.SourceUri="Resources/pizza.gif" Width="100" Margin="0,20,0,0" RenderOptions.BitmapScalingMode="Fant" />
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@@ -42,13 +42,17 @@ namespace Il2CppInspectorGUI
|
|||||||
btnSelectMetadataFile.Visibility = Visibility.Hidden;
|
btnSelectMetadataFile.Visibility = Visibility.Hidden;
|
||||||
|
|
||||||
if (openFileDialog.ShowDialog() == true) {
|
if (openFileDialog.ShowDialog() == true) {
|
||||||
|
areaBusyIndicator.Visibility = Visibility.Visible;
|
||||||
|
|
||||||
// Load the metadata file
|
// Load the metadata file
|
||||||
if (await app.LoadMetadataAsync(openFileDialog.FileName)) {
|
if (await app.LoadMetadataAsync(openFileDialog.FileName)) {
|
||||||
// Metadata loaded successfully
|
// Metadata loaded successfully
|
||||||
btnSelectBinaryFile.Visibility = Visibility.Visible;
|
btnSelectBinaryFile.Visibility = Visibility.Visible;
|
||||||
btnBack.Visibility = Visibility.Visible;
|
btnBack.Visibility = Visibility.Visible;
|
||||||
|
areaBusyIndicator.Visibility = Visibility.Hidden;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
areaBusyIndicator.Visibility = Visibility.Hidden;
|
||||||
MessageBox.Show(this, app.LastException.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
|
MessageBox.Show(this, app.LastException.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
btnSelectMetadataFile.Visibility = Visibility.Visible;
|
btnSelectMetadataFile.Visibility = Visibility.Visible;
|
||||||
}
|
}
|
||||||
@@ -73,14 +77,18 @@ namespace Il2CppInspectorGUI
|
|||||||
btnBack.IsEnabled = false;
|
btnBack.IsEnabled = false;
|
||||||
|
|
||||||
if (openFileDialog.ShowDialog() == true) {
|
if (openFileDialog.ShowDialog() == true) {
|
||||||
|
areaBusyIndicator.Visibility = Visibility.Visible;
|
||||||
|
|
||||||
// Load the binary file
|
// Load the binary file
|
||||||
if (await app.LoadBinaryAsync(openFileDialog.FileName)) {
|
if (await app.LoadBinaryAsync(openFileDialog.FileName)) {
|
||||||
// Binary loaded successfully
|
// Binary loaded successfully
|
||||||
// TODO: Set DataContext
|
// TODO: Set DataContext
|
||||||
// TODO: Format, Endianness, Bits, Arch, GlobalOffset, symbol table size, relocations size, CodeReg, MetaReg
|
// TODO: Format, Endianness, Bits, Arch, GlobalOffset, symbol table size, relocations size, CodeReg, MetaReg
|
||||||
|
areaBusyIndicator.Visibility = Visibility.Hidden;
|
||||||
rectModalLightBoxBackground.Visibility = Visibility.Hidden;
|
rectModalLightBoxBackground.Visibility = Visibility.Hidden;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
areaBusyIndicator.Visibility = Visibility.Hidden;
|
||||||
MessageBox.Show(this, app.LastException.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
|
MessageBox.Show(this, app.LastException.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
btnSelectBinaryFile.Visibility = Visibility.Visible;
|
btnSelectBinaryFile.Visibility = Visibility.Visible;
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
Il2CppInspector.GUI/Resources/pizza.gif
Normal file
BIN
Il2CppInspector.GUI/Resources/pizza.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 647 KiB |
@@ -185,6 +185,8 @@ The following books were also very helpful:
|
|||||||
- [The IDA Pro Book, 2nd Edition](https://www.amazon.com/IDA-Pro-Book-Unofficial-Disassembler/dp/1593272898/ref=sr_1_1?keywords=ida+pro+book&qid=1580952729&sr=8-1) by Chris Eagle
|
- [The IDA Pro Book, 2nd Edition](https://www.amazon.com/IDA-Pro-Book-Unofficial-Disassembler/dp/1593272898/ref=sr_1_1?keywords=ida+pro+book&qid=1580952729&sr=8-1) by Chris Eagle
|
||||||
- [The Beginner's Guide to IDAPython](https://leanpub.com/IDAPython-Book) by Alexander Hanel
|
- [The Beginner's Guide to IDAPython](https://leanpub.com/IDAPython-Book) by Alexander Hanel
|
||||||
|
|
||||||
|
Pizza spinner animation in the GUI made by Chris Gannon - https://gannon.tv/
|
||||||
|
|
||||||
### License
|
### License
|
||||||
|
|
||||||
All rights reserved. Unauthorized use, re-use or the creation of derivative works of this code for commercial purposes whether directly or indirectly is strictly prohibited. Use, re-use or the creation of derivative works for non-commercial purposes is expressly permitted.
|
All rights reserved. Unauthorized use, re-use or the creation of derivative works of this code for commercial purposes whether directly or indirectly is strictly prohibited. Use, re-use or the creation of derivative works for non-commercial purposes is expressly permitted.
|
||||||
|
|||||||
Reference in New Issue
Block a user