-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
121 lines (121 loc) · 6.47 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
<Window x:Class="StandaloneGeneratorV3.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:StandaloneGeneratorV3"
mc:Ignorable="d"
Title="Thcrap standalone patches generator" Loaded="Window_Loaded">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<DockPanel Grid.Row="0">
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal">
<Button Click="ReloadGamesList">Reload games list</Button>
</StackPanel>
<ListBox Name="uiGamesList">
<ListBox.ItemTemplate>
<DataTemplate>
<CheckBox IsChecked="{Binding IsSelected}">
<CheckBox.Content>
<StackPanel Orientation="Horizontal">
<Image Source="{Binding Image}" Height="16px" />
<TextBlock Text="{Binding Name}" Margin="5,0,0,0" />
</StackPanel>
</CheckBox.Content>
</CheckBox>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</DockPanel>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<DockPanel>
<Grid DockPanel.Dock="Top">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Margin="5,3,5,3">
Filter:
</TextBlock>
<TextBox Grid.Column="1" Name="uiPatchesListFilter" TextChanged="updatePatchesListFilter" />
</Grid>
<ScrollViewer Grid.Column="0">
<ItemsControl Name="uiRepos">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Expander Header="{Binding Id}">
<ItemsControl ItemsSource="{Binding PatchesFiltered}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<TextBlock Margin="10,4,0,0" Text="{Binding Id}" Cursor="Hand" TextDecorations="Underline" Foreground="Blue" MouseUp="SelectRepo" />
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Expander>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</DockPanel>
<Border Grid.Column="1" BorderThickness="10" Background="{DynamicResource {x:Static SystemColors.AppWorkspaceBrushKey}}" BorderBrush="{DynamicResource {x:Static SystemColors.AppWorkspaceBrushKey}}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="*" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Grid Grid.Row="0" Grid.Column="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Margin="0,0,5,0">Configuration name: </TextBlock>
<TextBox Grid.Column="1" Name="uiConfigName" />
</Grid>
<ScrollViewer Grid.Row="1" Grid.Column="0" Margin="0,5,0,5">
<ListBox Name="uiSelectedPatches">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock>
<TextBlock.Text>
<MultiBinding StringFormat="{}{0}/{1}">
<Binding Path="Repo.Id" />
<Binding Path="Id" />
</MultiBinding>
</TextBlock.Text>
</TextBlock>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</ScrollViewer>
<Button Grid.Row="2" Grid.Column="0" Click="GenerateStandalonePatch">Generate standalone patch</Button>
<StackPanel Grid.Row="1" Grid.Column="1" Margin="10,0,0,0" VerticalAlignment="Center">
<Button Click="selectedPatches_MoveUp">⯅</Button>
<Button Click="selectedPatches_MoveDown">⯆</Button>
<Button Click="selectedPatches_Remove" Margin="0,5,0,0">X</Button>
</StackPanel>
</Grid>
</Border>
</Grid>
<Border Grid.Row="2" Background="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}" Padding="5">
<DockPanel>
<TextBlock DockPanel.Dock="Top" Margin="0,0,0,5">Log window</TextBlock>
<ScrollViewer>
<TextBox Name="uiLogWindow" IsReadOnly="True"></TextBox>
</ScrollViewer>
</DockPanel>
</Border>
</Grid>
</Window>