-
Notifications
You must be signed in to change notification settings - Fork 5
/
MainWindow.xaml
93 lines (76 loc) · 3.58 KB
/
MainWindow.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<Window x:Class="PakExplorer.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
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:local="clr-namespace:PakExplorer"
mc:Ignorable="d"
Title="PAK Explorer" Height="450" Width="800">
<Window.CommandBindings>
<CommandBinding Command="Open" Executed="OpenFile" />
</Window.CommandBindings>
<Window.Resources>
<HierarchicalDataTemplate x:Key="TreeTemplate" ItemsSource="{Binding Children}">
<TextBlock Text="{Binding Name}" />
</HierarchicalDataTemplate>
</Window.Resources>
<DockPanel>
<Menu DockPanel.Dock="Top">
<MenuItem Header="_File">
<MenuItem Header="_Open file..." Command="Open" InputGestureText="Ctrl+O" />
<!--<MenuItem Header="_Close"/>-->
</MenuItem>
<MenuItem Header="_Extract" Name="ExtractMenuItem">
<MenuItem Header="_Extract Opened Paks" Click="ExtractAll" InputGestureText="Ctrl+X" />
</MenuItem>
<MenuItem Header="_Options">
<MenuItem
Header="_Parse Scripts"
IsCheckable="True"
Checked="EnableScriptParsing_Click"
Unchecked="DisableScriptParsing_Click"
></MenuItem>
</MenuItem>
</Menu>
<Grid Name="WorkspaceGrid">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="2*" />
</Grid.ColumnDefinitions>
<TabControl Grid.Column="0">
<TabItem Header="Pak Files">
<TreeView
Name="PakView"
ItemTemplate="{StaticResource TreeTemplate}"
SelectedItemChanged="ShowPakEntry"
VirtualizingStackPanel.IsVirtualizing="True"></TreeView>
</TabItem>
<TabItem
Name="ScriptsTab"
Header="Pak Scripts"
Visibility="Hidden">
<TreeView
Name="ScriptView"
ItemTemplate="{StaticResource TreeTemplate}"
SelectedItemChanged="ShowPakScript"
VirtualizingStackPanel.IsVirtualizing="True"></TreeView>
</TabItem>
</TabControl>
<GridSplitter Grid.Column="1"
HorizontalAlignment="Left"
VerticalAlignment="Stretch"
Width="5"/>
<Grid Grid.Column="1" Margin="5 0 0 0">
<GridSplitter Grid.Row="1"
HorizontalAlignment="Stretch"
VerticalAlignment="Top"
ResizeDirection="Rows"
Height="5"/>
<Grid Background="LightGray" Grid.Row="1" Margin="0 5 0 0">
<ScrollViewer Margin="10"></ScrollViewer>
<TextBox Name="TextPreview" TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Visible" Visibility="Hidden" FontFamily="Consolas" IsReadOnly="True" IsReadOnlyCaretVisible="True" />
</Grid>
</Grid>
</Grid>
</DockPanel>
</Window>