-
Notifications
You must be signed in to change notification settings - Fork 1
/
MainWindow.xaml
143 lines (143 loc) · 8.19 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
<Window x:Class="BLHXChgPainting.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:BLHXChgPainting"
mc:Ignorable="d"
Title="碧蓝航线皮肤修改器" Height="600" Width="800">
<Window.DataContext>
<local:Vm x:Name="Vm"/>
</Window.DataContext>
<TabControl x:Name="MainTabControl">
<TabItem Header="皮肤修改">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Orientation="Vertical">
<Grid Margin="10 10 10 10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="50"/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0">hashes.csv</Label>
<TextBox Grid.Column="1" Margin="10 0 10 0" IsReadOnly="True" Text="{Binding HashesPath}"></TextBox>
<Button Grid.Column="2" Click="SelectHashes">打开</Button>
</Grid>
<Grid Margin="10 10 10 10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="50"/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0">需要替换的文件</Label>
<TextBox Grid.Column="1" Margin="10 0 10 0" IsReadOnly="True" Text="{Binding BundleFile}"></TextBox>
<Button Grid.Column="2" Click="SelectBundle">打开</Button>
</Grid>
<Grid Margin="10 10 10 10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="50"/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0">用于替换的图片</Label>
<TextBox Grid.Column="1" Margin="10 0 10 0" IsReadOnly="True" Text="{Binding PngFile}"></TextBox>
<Button Grid.Column="2" Click="SelectPngFile">打开</Button>
</Grid>
<Grid Margin="10 10 10 10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0">需要替换的图片</Label>
<ComboBox Grid.Column="1" Margin="10 0 10 0" ItemsSource="{Binding TextureList}" SelectedIndex="{Binding CurSel}" SelectionChanged="SelctTexture"></ComboBox>
</Grid>
<Grid Margin="10 10 10 10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="50"/>
</Grid.ColumnDefinitions>
<Button Grid.Column="0" Click="SaveOri">保存原图片</Button>
<TextBlock Margin="10 10 10 10" Text="{Binding ProcessTips}" Grid.Column="1"></TextBlock>
<Button Grid.Column="2" Click="Process">替换</Button>
</Grid>
</StackPanel>
<TextBlock TextAlignment="Center" Grid.Row="1" Text="{Binding ImgDesc}"/>
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center">
<Image Source="{Binding Img}" StretchDirection="DownOnly"></Image>
<Image Source="{Binding PngImg}" StretchDirection="DownOnly"></Image>
</StackPanel>
</Grid>
</TabItem>
<TabItem Header="资源浏览">
<TabItem.DataContext>
<local:Browser x:Name="Browser" />
</TabItem.DataContext>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid Margin="10 10 10 10" Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="50"/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0">选择起始文件夹</Label>
<TextBox Grid.Column="1" Margin="10 0 10 0" Text="{Binding DirPath}" IsReadOnly="True"/>
<Button Grid.Column="2" Click="OpenForBroswer">打开</Button>
</Grid>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" MaxWidth="300"/>
<ColumnDefinition Width="3*"/>
</Grid.ColumnDefinitions>
<GroupBox Header="资源列表" Grid.Column="0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Button Grid.Row="0" Margin="10 10 10 10" Height="30" Click="ExportAll">全部导出</Button>
<TreeView Grid.Row="1" ItemsSource="{Binding Root}" SelectedItemChanged="OnFileSelect" x:Name="BrowserTree">
<TreeView.Resources>
<HierarchicalDataTemplate DataType="{x:Type local:DirectoryNode}" ItemsSource="{Binding Childrens}">
<TextBlock Text="{Binding Name}"></TextBlock>
</HierarchicalDataTemplate>
<DataTemplate DataType="{x:Type local:FileNode}">
<TextBlock Text="{Binding Name}"></TextBlock>
</DataTemplate>
</TreeView.Resources>
</TreeView>
</Grid>
</GroupBox>
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid Margin="10 10 10 10" Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="50"/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0">资源选择</Label>
<ComboBox Grid.Column="1" Margin="10 0 10 0" ItemsSource="{Binding TextureList}" SelectedIndex="{Binding CurSel}" SelectionChanged="BrowserSelctTexture"></ComboBox>
<Button Grid.Column="2" Click="EditSelectedItem">修改</Button>
</Grid>
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
<Image Source="{Binding Img}" StretchDirection="DownOnly"></Image>
</StackPanel>
</Grid>
</Grid>
</Grid>
</TabItem>
</TabControl>
</Window>