forked from KirillSuxinin/Stalker-Studio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.xaml
311 lines (299 loc) · 22.8 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
<Window x:Class="Stalker_Studio.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:syntax="clr-namespace:UI.SyntaxBox;assembly=UI.SyntaxBox"
xmlns:sys="clr-namespace:System;assembly=System"
xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
xmlns:local="clr-namespace:Stalker_Studio"
xmlns:av="http://icsharpcode.net/sharpdevelop/avalonedit"
xmlns:vm="clr-namespace:Stalker_Studio.ViewModel"
xmlns:pt="http://propertytools.org/wpf"
mc:Ignorable="d"
Style="{DynamicResource style_Window}"
Title="Stalker studio"
ToolTip="{Binding Gamedata.Root.FullName}"
DataContext="{x:Static vm:Workspace.This}"
MinWidth="800" MinHeight="400" WindowStartupLocation="CenterScreen"
Icon="{StaticResource icon_Radiation}">
<DockPanel>
<Grid DockPanel.Dock="Top">
<Menu Padding="2,0">
<MenuItem Header="Файлы">
<MenuItem Header="Создать">
<MenuItem Header="Текстовый файл..." Command="{Binding NewCommand}" Style="{StaticResource style_MenuItemExtendedCommand}"
CommandParameter="TXT"/>
<MenuItem Header="LTX файл..." Command="{Binding NewCommand}" Style="{StaticResource style_MenuItemExtendedCommand}"
CommandParameter="LTX"
Icon="{StaticResource icon_NewLTXFile}"/>
<MenuItem Header="XML файл..." Command="{Binding NewCommand}" Style="{StaticResource style_MenuItemExtendedCommand}"
CommandParameter="XML"/>
<MenuItem Header="Script файл..." Command="{Binding NewCommand}" Style="{StaticResource style_MenuItemExtendedCommand}"
CommandParameter="SCRIPT"/>
</MenuItem>
<!--<MenuItem Header="Открыть файл" Click="MenuItem_Click"/>-->
<MenuItem Command="{Binding OpenFileCommand}" Style="{StaticResource style_MenuItemExtendedCommand}"/>
<!--<MenuItem Header="Создать файл" Click="MenuItem_Click_1"/>-->
<MenuItem Command="{Binding OpenGamedataCommand}" Style="{StaticResource style_MenuItemExtendedCommand}"/>
<MenuItem Header="Последние" ItemsSource="{Binding LastFiles}">
<MenuItem.ItemContainerStyle>
<Style TargetType="MenuItem" BasedOn="{StaticResource style_MenuItem}">
<Setter Property="Command" Value="{Binding DataContext.OpenFileCommand, RelativeSource={RelativeSource AncestorType=Menu}}"/>
<Setter Property="CommandParameter" Value="{Binding}"/>
</Style>
</MenuItem.ItemContainerStyle>
</MenuItem>
</MenuItem>
<MenuItem Header="Правка">
<MenuItem Header="Замена старых ссылок (global)" Name="repOldLink" Click="repOldLink_Click"/>
<MenuItem Header="Изменить иконку (items ltx)" Name="toolTip_change_icon" Click="toolTip_change_icon_Click"/>
<MenuItem Header="Замена стат. параметров" Name="toolTip_act_static_prm" Click="toolTip_act_static_prm_Click"/>
<MenuItem Header="Работа с xml строками" Name="toolTip_act_xml_string" Click="toolTip_act_xml_string_Click"/>
<MenuItem Header="Добавить новую иконку (.dds)" Name="toolTip_addWpnIcon" Click="toolTip_addWpnIcon_Click"/>
<MenuItem Header="Импорт файлов" Name="toolTip_import_files" Click="toolTip_import_files_Click"/>
</MenuItem>
<MenuItem Header="Диалоги">
<MenuItem Header="Работа с диалогами (Ray of Hope Team)" Name="toolTip_aworkDialogs" Click="toolTip_aworkDialogs_Click"/>
<MenuItem Header="Работа с диалогами (GSC Game World)" Name="toolTip_DialogGSC" Click="toolTip_DialogGSC_Click"/>
</MenuItem>
<MenuItem Header="Конверт">
<MenuItem Header="Файлы" Click="MenuItem_Click_3"/>
<MenuItem Header="DDS Текстуры" Name="toolTip_Convert_DDS" Click="toolTip_Convert_DDS_Click"/>
<MenuItem Header="OGG - WAV" Name="toolTip_Convert_DDSTGA" Click="toolTip_Convert_DDSTGA_Click"/>
</MenuItem>
<MenuItem Header="Анализ">
<MenuItem Header="Построение ссылок (NON USE)" Name="setLinked" Click="setLinked_Click" IsEnabled="True"/>
<MenuItem Header="Проверка текстур" Name="checkTextures" Click="checkTextures_Click"/>
<MenuItem Header="Отладка вылетов (Beta)" Name="check_error" Click="check_error_Click"/>
<MenuItem Header="Отладка конфигов (NON USE)" Name="otladka_configs" Click="otladka_configs_Click_2"/>
</MenuItem>
<MenuItem Header="Вид" Visibility="Visible">
<MenuItem Header="Показывать/скрыть сетку .dds" Name="tp_see_setka_dds" Click="tp_see_setka_dds_Click"/>
<MenuItem Header="{Binding Browser.Title}" Command="{Binding OpenToolCommand}" CommandParameter="{Binding Browser}" Icon="{Binding Browser.IconSource}"/>
<MenuItem Header="{Binding PropertiesTool.Title}" Command="{Binding OpenToolCommand}" CommandParameter="{Binding PropertiesTool}" Icon="{Binding PropertiesTool.IconSource}"/>
<MenuItem Header="{Binding MessageList.Title}" Command="{Binding OpenToolCommand}" CommandParameter="{Binding MessageList}" Icon="{Binding MessageList.IconSource}"/>
</MenuItem>
<MenuItem Header="Команды" Visibility="Visible">
<MenuItem Header="Конструктор команд (NON USE)"/>
</MenuItem>
<MenuItem Header="Настройки" Visibility="Visible" Name="tp_setting_win">
<MenuItem Header="Основные" Click="tp_setting_win_Click"/>
<MenuItem Header="Параметры" Name="tp_setting_prm" Click="tp_setting_prm_Click"/>
</MenuItem>
</Menu>
<Menu HorizontalAlignment="Right" HorizontalContentAlignment="Right" Padding="2,0">
<MenuItem Header="Справка">
<MenuItem Header="О программе" Click="MenuItem_Click_2"/>
</MenuItem>
</Menu>
</Grid>
<ToolBarTray DockPanel.Dock="Top" Margin="6,0">
<ToolBar ItemsSource="{Binding Commands}" ItemTemplateSelector="{StaticResource CommandDataTemplateSelector}"/>
<ToolBar ItemsSource="{Binding ActiveContent.Commands}" ItemTemplateSelector="{StaticResource CommandDataTemplateSelector}"/>
</ToolBarTray>
<Grid Visibility="Collapsed" x:Name="MenuMain" Margin="2,0,2,2">
<Grid.RowDefinitions>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="70*"/>
<ColumnDefinition Width="4"/>
<ColumnDefinition Width="231*"/>
<ColumnDefinition Width="4"/>
<ColumnDefinition Width="85*"/>
</Grid.ColumnDefinitions>
<Grid x:Name="MenuCenter" Grid.Row="1" Grid.Column="2" >
<Grid Name="grid_ltx_file" Visibility="Hidden">
<av:TextEditor Name="txt_ltx_file" SyntaxHighlighting="LTX"
MouseEnter="txt_ltx_file_MouseEnter"
MouseMove="txt_ltx_file_MouseMove"
Background="{DynamicResource brush_BackgroundContent}"
ShowLineNumbers="True"/>
</Grid>
<Grid Name="grid_ltx_mode" Visibility="Hidden">
<ScrollViewer>
<Grid Name="ltx_mode_elemetns">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="128*"/>
<ColumnDefinition Width="321*"/>
<ColumnDefinition Width="73*"/>
</Grid.ColumnDefinitions>
<Label Content="Секция" Name="lab_section" VerticalAlignment="Top" Height="26" Margin="0,0,3,0"/>
<ComboBox Name="combo_section" Grid.Column="1" VerticalAlignment="Top" Width="180" HorizontalAlignment="Left" SelectionChanged="combo_section_SelectionChanged" Height="22"/>
<Grid.ContextMenu>
<ContextMenu>
<MenuItem Header="Добавить параметр" Name="nm_ltx_add_parametr" Click="nm_ltx_add_parametr_Click"/>
</ContextMenu>
</Grid.ContextMenu>
</Grid>
</ScrollViewer>
</Grid>
<Grid Name="grid_xml_string_text" Visibility="Hidden">
<av:TextEditor Name="txt_xml_strings" SyntaxHighlighting="xml"
KeyUp="txt_xml_strings_KeyUp"
Background="{DynamicResource brush_BackgroundContent}"
ShowLineNumbers="True"/>
</Grid>
<Grid Name="grid_script" Visibility="Visible">
<TextBox VerticalScrollBarVisibility="Visible" FontFamily="Courier New" Name="txt_script" AcceptsReturn="True" KeyUp="txt_script_KeyUp"
syntax:SyntaxBox.Enable="True"
syntax:SyntaxBox.ExpandTabs="True"
syntax:SyntaxBox.AutoIndent="True"
syntax:SyntaxBox.ShowLineNumbers="True"
syntax:SyntaxBox.LineNumbersBackground="#464646"
syntax:SyntaxBox.LineNumbersForeground="SlateGray" >
<!---Setting for Syntax-->
<syntax:SyntaxBox.SyntaxDrivers>
<syntax:SyntaxConfig>
<syntax:KeywordRule Foreground="Blue"
Keywords="true,false,on,off,function,class,__init,end,if,nil,return,not,else,local,then,has_alife_info,printf,console.log"
/>
<syntax:RegexRule Op="Line" Foreground="Black" Pattern="\(([^\)]*)\)"/>
<syntax:KeywordRule Foreground="DarkGoldenrod" Keywords="self"/>
<syntax:KeywordRule Foreground="Purple" Keywords="!,+,-,/,*,%,=,&,^,|,<,>" WholeWordsOnly="False"/>
<!--String-->
<syntax:RegexRule Op="Line" Foreground="Red" Pattern=""(?:[^"\\]|\\.)*"" />
<!--Comment-->
<syntax:RegexRule Op="Line" Foreground="DarkGreen" Pattern="--.*" />
</syntax:SyntaxConfig>
</syntax:SyntaxBox.SyntaxDrivers>
</TextBox>
</Grid>
</Grid>
<Grid x:Name="MenuLeft" Grid.Row="1" Grid.Column="0" Visibility="Collapsed">
<Grid x:Name="browser" Visibility="Collapsed">
<TreeView Name="treeBrowser" MouseDoubleClick="treeBrowser_MouseDoubleClick" KeyUp="treeBrowser_KeyUp" SelectedItemChanged="treeBrowser_SelectedItemChanged" MouseLeftButtonUp="treeBrowser_MouseLeftButtonUp" MouseEnter="treeBrowser_MouseEnter" MouseLeave="treeBrowser_MouseLeave">
<TreeView.ContextMenu>
<ContextMenu>
<MenuItem Name="brow_menu_add" Header="Добавить файл" Click="brow_menu_add_Click"/>
<MenuItem Name="brow_menu_del" Header="Удалить файл" Click="brow_menu_del_Click"/>
<MenuItem Name="brow_menu_add_marker" Header="Добавить маркер" Click="brow_menu_add_marker_Click"/>
<MenuItem Name="brow_menu_del_marker" Header="Удалить маркер" Click="brow_menu_del_marker_Click"/>
<MenuItem Name="brow_menu_import_files" Header="Импорт файлов" Click="brow_menu_import_files_Click"/>
</ContextMenu>
</TreeView.ContextMenu>
</TreeView>
</Grid>
</Grid>
</Grid>
<DockingManager HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch"
DocumentsSource="{Binding Files}"
AnchorablesSource="{Binding Tools}"
Theme="{Binding SelectedTheme.Item2}"
ActiveContent="{Binding ActiveContent, Mode=TwoWay}"
LayoutItemTemplateSelector="{StaticResource ViewModelDataTemplateSelector}"
LayoutItemContainerStyleSelector="{StaticResource ViewModelStyleSelector}"
LayoutUpdateStrategy ="{StaticResource LayoutUpdate}">
<DockingManager.AnchorableTitleTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Image Source="{Binding IconSource}" Margin="0,0,4,0"/>
<TextBlock Text="{Binding Title}"/>
</StackPanel>
</DataTemplate>
</DockingManager.AnchorableTitleTemplate>
<DockingManager.DocumentHeaderTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Image Source="{Binding IconSource}" Margin="0,0,4,0"/>
<TextBlock Text="{Binding Title}"/>
</StackPanel>
</DataTemplate>
</DockingManager.DocumentHeaderTemplate>
<LayoutRoot x:Name="_layoutRoot">
<LayoutPanel Orientation="Vertical" x:Name="PanelV">
<LayoutPanel Orientation="Horizontal" x:Name="PanelH">
<LayoutAnchorablePane Name="MainAnchorablePane" DockWidth="260" DockMinWidth="100"/>
<LayoutDocumentPaneGroup>
<LayoutDocumentPane>
<LayoutDocument ContentId="MainPage" IconSource="{StaticResource icon_Home}" CanClose="False">
<Grid Name="SelectGamedata" Visibility="Hidden" Background="{DynamicResource brush_Background}" HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="327*"/>
</Grid.RowDefinitions>
<Label Content="Выберите папку gamedata для работы" Grid.ColumnSpan="3" HorizontalAlignment="Center" Margin="0,0,0,4"/>
<TextBox Grid.Row="1" Grid.ColumnSpan="3" Text="{Binding Gamedata.Root.FullName}" Name="txtSelectGamedata" KeyUp="txtSelectGamedata_KeyUp" TextChanged="txtSelectGamedata_TextChanged_1" HorizontalAlignment="Stretch"/>
<Button Grid.Row="1" Grid.ColumnSpan="3" Content="..." Name="btnSelectGamedata" Width="40" HorizontalAlignment="Right" Click="btnSelectGamedata_Click"/>
<HeaderedContentControl Header="Кодировка" Grid.Row="2" Grid.ColumnSpan="3" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="0,4">
<ComboBox Width="200" Name="comboEncoding" SelectionChanged="comboEncoding_SelectionChanged">
<ComboBoxItem Content="UTF-8"/>
<ComboBoxItem Content="Windows-1251"/>
</ComboBox>
</HeaderedContentControl>
<CheckBox Name="check_useIgnore" Content="Пути для игнорирования" Foreground="White" Margin="5,0,0,0" Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" VerticalAlignment="Top"/>
<ListBox Name="list_ignore" Grid.Row="3" Grid.Column="2">
<ListBox.ContextMenu>
<ContextMenu>
<MenuItem Header="Выбрать всё" Name="ignoreShellAll" Click="ignoreShellAll_Click"/>
<MenuItem Header="Снять всё" Name="ignoreShellZeroAll" Click="ignoreShellZeroAll_Click"/>
</ContextMenu>
</ListBox.ContextMenu>
</ListBox>
</Grid>
</LayoutDocument>
</LayoutDocumentPane>
</LayoutDocumentPaneGroup>
<LayoutAnchorablePane Name="DetailAnchorablePane" DockMinWidth="100" DockWidth="260">
<LayoutAnchorable ContentId="Properties2" Title="Свойства2">
<Grid x:Name="MenuRight" Grid.Row="1" Grid.Column="4">
<Grid Name="parametr_dds" Visibility="Hidden">
<Grid.RowDefinitions>
<RowDefinition Height="25"/>
<RowDefinition Height="25"/>
<RowDefinition Height="85*"/>
<RowDefinition Height="25"/>
<RowDefinition Height="25"/>
<RowDefinition Height="25"/>
<RowDefinition Height="150*"/>
</Grid.RowDefinitions>
<Label Grid.Row="1" Content="Разметка:"/>
<Button Content="Копировать" Name="btn_copy_grid_dds_short" Grid.Row="3" Height="25" VerticalAlignment="Center"/>
<Button Content="Убрать выделение" Grid.Row="4" Height="25" Name="btn_grid_clear_dds" Click="btn_grid_clear_dds_Click" />
<Button Content="Установить для" Grid.Row="5" Name="btn_set_inv_for" Height="25" VerticalAlignment="Bottom" Click="btn_set_inv_for_Click"/>
<Button Content="Применить" Name="btn_set_on_last" Grid.Row="6" VerticalAlignment="Bottom" Width="90" HorizontalAlignment="Center" Visibility="Hidden" Click="btn_set_on_last_Click"/>
</Grid>
<Grid Name="parametr_xml_strings" Visibility="Hidden">
<Grid.RowDefinitions>
<RowDefinition Height="405*"/>
<RowDefinition Height="28*"/>
</Grid.RowDefinitions>
</Grid>
<Grid Name="parametr_scripts" Visibility="Hidden">
<Grid.RowDefinitions>
<RowDefinition Height="223*"/>
<RowDefinition Height="210*"/>
</Grid.RowDefinitions>
<Label Content="Функции в скрипте"/>
<ListBox Name="scripts_list_func" MouseDoubleClick="scripts_list_func_MouseDoubleClick" Foreground="#FFB7B7FF" Margin="0,30,0,0"/>
</Grid>
<Grid Name="parametr_ogf" Visibility="Hidden">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TreeView Name="browser_textures">
<TreeView.ContextMenu>
<ContextMenu>
<MenuItem Header="Копировать путь" Name="brow_textures_copyPath" Click="brow_textures_copyPath_Click"/>
</ContextMenu>
</TreeView.ContextMenu>
</TreeView>
</Grid>
</Grid>
</LayoutAnchorable>
</LayoutAnchorablePane>
</LayoutPanel>
<LayoutPanel Orientation="Horizontal" DockHeight="150">
<LayoutAnchorablePane Name="BottomAnchorablePane" DockHeight="260" DockMinHeight="100"/>
</LayoutPanel>
</LayoutPanel>
</LayoutRoot>
</DockingManager>
</DockPanel>
</Window>