Add global-metadata.dat button and dialog

This commit is contained in:
Katy Coe
2020-02-06 03:55:26 +01:00
parent b0a7f303cf
commit 27b5fb7366
2 changed files with 21 additions and 2 deletions

View File

@@ -5,8 +5,15 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Il2CppInspector.GUI" xmlns:local="clr-namespace:Il2CppInspector.GUI"
mc:Ignorable="d" mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800"> Title="Il2CppInspector" Height="450" Width="800" Background="LightGray">
<Grid> <Grid>
<Grid>
<TextBlock>foo</TextBlock>
</Grid>
<DockPanel>
<Border BorderThickness="4" BorderBrush="Black" CornerRadius="10" Margin="100" Opacity="0.7" Background="LightSteelBlue" Visibility="Visible">
<Button Name="btnSelectMetadataFile" Click="BtnSelectMetadataFile_OnClick" BorderThickness="0" Background="Transparent" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" FontSize="24">Click to select an IL2CPP metadata file</Button>
</Border>
</DockPanel>
</Grid> </Grid>
</Window> </Window>

View File

@@ -12,6 +12,7 @@ using System.Windows.Media;
using System.Windows.Media.Imaging; using System.Windows.Media.Imaging;
using System.Windows.Navigation; using System.Windows.Navigation;
using System.Windows.Shapes; using System.Windows.Shapes;
using Microsoft.Win32;
namespace Il2CppInspector.GUI namespace Il2CppInspector.GUI
{ {
@@ -23,5 +24,16 @@ namespace Il2CppInspector.GUI
public MainWindow() { public MainWindow() {
InitializeComponent(); InitializeComponent();
} }
/// <summary>
/// Select global metadata file
/// </summary>
private void BtnSelectMetadataFile_OnClick(object sender, RoutedEventArgs e) {
var openFileDialog = new OpenFileDialog();
openFileDialog.Filter = "IL2CPP global metadata file|global-metadata.dat|All files (*.*)|*.*";
if (openFileDialog.ShowDialog() == true) {
// openFileDialog.FileName
}
}
} }
} }