Files
gregExtractor/GUI/CoverageView.axaml
T

94 lines
5.4 KiB
XML

<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:models="clr-namespace:gregExtractor.Models"
mc:Ignorable="d"
x:Class="gregExtractor.GUI.CoverageView">
<Grid RowDefinitions="Auto,Auto,Auto,*,Auto" Margin="8">
<Border Grid.Row="0" Background="#202020" Padding="10" CornerRadius="8">
<Grid ColumnDefinitions="Auto,*,Auto,Auto">
<TextBlock Grid.Column="0" VerticalAlignment="Center" Text="IL2CPP Path" Foreground="#9AA0A6" Margin="0,0,8,0"/>
<TextBox Grid.Column="1" Text="{Binding Il2CppPath}"/>
<Button Grid.Column="2" Content="🔍 Auto" Command="{Binding AutoDetectPathCommand}" Margin="8,0,0,0"/>
<Button Grid.Column="3" Content="Browse" Command="{Binding BrowseFolderCommand}" CommandParameter="Il2Cpp" Margin="8,0,0,0"/>
</Grid>
</Border>
<Border Grid.Row="1" Background="#202020" Padding="10" CornerRadius="8" Margin="0,8,0,0">
<Grid ColumnDefinitions="Auto,*,Auto">
<TextBlock Grid.Column="0" VerticalAlignment="Center" Text="Hooks JSON" Foreground="#9AA0A6" Margin="0,0,8,0"/>
<TextBox Grid.Column="1" Text="{Binding GameHooksPath}"/>
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="(set full path manually)" Foreground="#6F7781" Margin="8,0,0,0"/>
</Grid>
</Border>
<Border Grid.Row="2" Background="#202020" Padding="10" CornerRadius="8" Margin="0,8,0,8">
<Grid RowDefinitions="Auto,Auto" ColumnDefinitions="Auto,*,Auto">
<TextBlock Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" Text="Source Dirs" Foreground="#9AA0A6" Margin="0,0,8,0"/>
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding FrameworkSourceDirsText}"/>
<Button Grid.Row="0" Grid.Column="2" Content="Browse" Command="{Binding BrowseFolderCommand}" CommandParameter="SourceDirs" Margin="8,0,0,0"/>
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" Text="Output Base" Foreground="#9AA0A6" Margin="0,8,8,0"/>
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding OutputBasePath}" Margin="0,8,0,0"/>
<Button Grid.Row="1" Grid.Column="2" Content="Browse" Command="{Binding BrowseFolderCommand}" CommandParameter="Output" Margin="8,8,0,0"/>
</Grid>
</Border>
<Grid Grid.Row="3" ColumnDefinitions="320,*">
<Border Grid.Column="0" Background="#202020" Padding="10" CornerRadius="8">
<StackPanel Spacing="8">
<Button Content="📊 Analyze Coverage" Command="{Binding AnalyzeCoverageCommand}" Height="36"/>
<Button Content="📄 Open Markdown Report" Command="{Binding OpenMarkdownReportCommand}" Height="32"/>
<Separator />
<TextBlock Text="SUMMARY" FontWeight="SemiBold" Foreground="#2FD3FF"/>
<TextBlock Text="{Binding TotalHooks, StringFormat='Total: {0}'}"/>
<TextBlock Text="{Binding CoveredCount, StringFormat='Covered: {0}'}"/>
<TextBlock Text="{Binding PlannedCount, StringFormat='Planned: {0}'}"/>
<TextBlock Text="{Binding UncoveredCount, StringFormat='Uncovered: {0}'}"/>
<TextBlock Text="{Binding CoveragePercent, StringFormat='Coverage: {0:F2}%'}"/>
<Separator />
<TextBlock Text="LOG" FontWeight="SemiBold" Foreground="#2FD3FF"/>
<Border Background="#171717" CornerRadius="6" Padding="6" Height="280">
<ListBox ItemsSource="{Binding LogLines}" FontFamily="Cascadia Code, Consolas, monospace"/>
</Border>
</StackPanel>
</Border>
<Border Grid.Column="1" Background="#202020" Padding="10" CornerRadius="8">
<Grid RowDefinitions="Auto,*">
<TextBlock Grid.Row="0" Text="HOOK COVERAGE ENTRIES" FontWeight="SemiBold" Foreground="#2FD3FF"/>
<Border Grid.Row="1" Background="#171717" CornerRadius="6" Padding="8" Margin="0,8,0,0">
<ScrollViewer>
<ItemsControl ItemsSource="{Binding Entries}">
<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type models:HookCoverageEntry}">
<Border BorderBrush="#2B2B2B" BorderThickness="0,0,0,1" Padding="0,6">
<Grid ColumnDefinitions="80,140,200,*,*">
<TextBlock Grid.Column="0" Text="{Binding CoverageStatus}" Foreground="#2FD3FF"/>
<TextBlock Grid.Column="1" Text="{Binding HookDefinition.Group}"/>
<TextBlock Grid.Column="2" Text="{Binding HookDefinition.ClassName}"/>
<TextBlock Grid.Column="3" Text="{Binding HookDefinition.MethodName}"/>
<TextBlock Grid.Column="4" Text="{Binding FoundInFiles.Count, StringFormat='Files: {0}'}" Foreground="#9AA0A6"/>
</Grid>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</Border>
</Grid>
</Border>
</Grid>
<Grid Grid.Row="4" ColumnDefinitions="Auto,*" Margin="0,8,0,0">
<TextBlock Grid.Column="0" Text="Progress" VerticalAlignment="Center" Foreground="#9AA0A6"/>
<ProgressBar Grid.Column="1" Minimum="0" Maximum="100" Value="{Binding Progress}" Height="16" Margin="8,0,0,0"/>
</Grid>
</Grid>
</UserControl>