100 lines
6.2 KiB
XML
100 lines
6.2 KiB
XML
<Window x:Class="CriPakGUI.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
Title="CPK文件工具 Ver0.1 Sancaros" Height="360" Width="640" ResizeMode="CanResizeWithGrip" SizeToContent="WidthAndHeight" MinWidth="640" MinHeight="358" Icon="Resources/1.ico" MaxHeight="640">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="0*"/>
|
|
<ColumnDefinition Width="0*"/>
|
|
<ColumnDefinition/>
|
|
</Grid.ColumnDefinitions>
|
|
<StatusBar Grid.ColumnSpan="3" Height="25" VerticalAlignment="Bottom">
|
|
<StatusBarItem Content="已载入CPK:"/>
|
|
<StatusBarItem x:Name="status_cpkname" Content=" "/>
|
|
<StatusBarItem x:Name="status_progress" Content=" " Width="40"/>
|
|
<StatusBarItem x:Name="status_tips" Content=" " Height="25" VerticalAlignment="Top"/>
|
|
<ProgressBar x:Name="progressbar0" Height="15" Width="287"/>
|
|
<StatusBarItem x:Name="status_cpkmsg" Content="0 文件已注入." HorizontalContentAlignment="Right"/>
|
|
</StatusBar>
|
|
<Menu Grid.ColumnSpan="3" Height="25" VerticalAlignment="Top">
|
|
<MenuItem Header="_文件">
|
|
<MenuItem x:Name="menu_openfile" Header="打开 CPK" Click="menu_openfile_Click" >
|
|
<MenuItem.Icon>
|
|
<Image Width="18" Height="18" Source="Resources/openFile.ico"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
<MenuItem x:Name="menu_importAssets" Header="补丁 CPK..." Click="menu_importAssets_Click" >
|
|
<MenuItem.Icon>
|
|
<Image Width="18" Height="18" Source="Resources/importAssets.ico"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
<MenuItem x:Name="menu_savefiles" Header="释放 CPK..." Click="menu_savefiles_Click" >
|
|
<MenuItem.Icon>
|
|
<Image Width="18" Height="18" Source="Resources/saveFiles.ico"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
</MenuItem>
|
|
<MenuItem Header="_工具">
|
|
<MenuItem Header="生成 filelist.csv" Click="menu_makeCSV_Click"/>
|
|
|
|
</MenuItem>
|
|
<MenuItem Header="_编码">
|
|
<ComboBox Name="comboBox_encodings" SelectedIndex="0" SelectionChanged="comboBox_encodings_SelectionChanged">
|
|
<ComboBoxItem>
|
|
<TextBlock Foreground="Blue">UTF-8</TextBlock>
|
|
</ComboBoxItem>
|
|
<ComboBoxItem>
|
|
<TextBlock Foreground="Red">SHIFT-JIS</TextBlock>
|
|
</ComboBoxItem>
|
|
</ComboBox>
|
|
|
|
</MenuItem>
|
|
<Separator Margin="0"/>
|
|
<Separator Margin="0"/>
|
|
<Separator Margin="0"/>
|
|
<Separator Margin="0"/>
|
|
<Separator Margin="0"/>
|
|
<Separator Margin="0"/>
|
|
<Separator Margin="0"/>
|
|
<Separator Margin="0"/>
|
|
<Separator Margin="0"/>
|
|
<Separator Margin="0"/>
|
|
<Separator Margin="0"/>
|
|
<Separator Margin="0"/>
|
|
<Separator Margin="0"/>
|
|
<Separator Margin="0"/>
|
|
<Separator Margin="0"/>
|
|
<Separator Margin="0"/>
|
|
<MenuItem Header="关于" HorizontalContentAlignment="Right" HorizontalAlignment="Right" FlowDirection="RightToLeft" Width="50">
|
|
<MenuItem x:Name="menu_aboutgui" Header="关于 CriPak GUI" Click="menu_aboutgui_Click" />
|
|
</MenuItem>
|
|
</Menu>
|
|
<DataGrid x:Name="datagrid_cpk" CanUserAddRows="False" Margin="0,62,0,30" Grid.Column="2" VerticalScrollBarVisibility="Visible" IsReadOnly="True" FrozenColumnCount="7" AutoGenerateColumns="False" CanUserResizeColumns="False" CanUserReorderColumns="False" CanUserSortColumns="False" AlternationCount="2" RowHeight="17" AreRowDetailsFrozen="True" CanUserResizeRows="False" MaxHeight="500" HorizontalContentAlignment="Stretch" IsTextSearchEnabled="True" RowBackground="#FFF1F7F4">
|
|
<DataGrid.Columns>
|
|
<DataGridTextColumn x:Name="colume_number" Header="序号" MinWidth="40" Binding="{Binding id}"/>
|
|
<DataGridTextColumn x:Name="colume_filename" Header="文件名" MinWidth="200" Binding="{Binding FileName}"/>
|
|
<DataGridTextColumn x:Name="colume_offset" Header="偏移值" MinWidth="100" Binding="{Binding FileOffset , StringFormat=\{0:X8\}}"/>
|
|
<DataGridTextColumn x:Name="colume_size" Header="数据大小" MinWidth="80" Binding="{Binding FileSize}"/>
|
|
<DataGridTextColumn x:Name="colume_extractsize" Header="原始大小" MinWidth="80" Binding="{Binding ExtractSize}"/>
|
|
<DataGridTextColumn x:Name="culume_type" Header="数据类型" MinWidth="40" Binding="{Binding FileType}"/>
|
|
<DataGridTextColumn x:Name="colume_pt" Header="%" MinWidth="40" Binding="{Binding Pt}"/>
|
|
</DataGrid.Columns>
|
|
<DataGrid.ContextMenu>
|
|
<ContextMenu Name="dgmenu1" StaysOpen="true" PreviewMouseRightButtonDown="dgmenu1_Cilck">
|
|
<MenuItem Name="dgitem1" Header="_解压该类目" Click="dgitem1_Click"/>
|
|
<MenuItem Name="dgitem2" Header="_注入类目" Click="dgitem2_Click"/>
|
|
</ContextMenu>
|
|
</DataGrid.ContextMenu>
|
|
</DataGrid>
|
|
<Grid Grid.ColumnSpan="3" Height="37" Margin="0,25,0,0" VerticalAlignment="Top" Background="{DynamicResource {x:Static SystemColors.MenuBarBrushKey}}">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="39*"/>
|
|
<ColumnDefinition Width="601*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Button x:Name="button_importassets" Content="补丁 CPK" HorizontalAlignment="Left" Margin="103,0,0,0" VerticalAlignment="Center" Width="86" IsEnabled="False" Click="button_importassets_Click" Grid.Column="1"/>
|
|
<Button x:Name="button_extract" Content="释放文件" HorizontalAlignment="Left" Margin="37,0,0,0" VerticalAlignment="Center" Width="86" IsEnabled="False" Click="button_extract_Click" Grid.ColumnSpan="2"/>
|
|
|
|
</Grid>
|
|
</Grid>
|
|
</Window>
|