MCI18n/MainWindow.xaml

136 lines
5.9 KiB
Plaintext
Raw Normal View History

2025-06-22 11:33:58 +08:00
<Window
x:Class="MCI18n.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:local="clr-namespace:MCI18n"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="SNBT编辑器"
Width="900"
Height="600"
Background="#1f1f1f"
2025-06-22 11:33:58 +08:00
Foreground="White"
mc:Ignorable="d">
<Window.DataContext>
<local:MainWindowViewModel />
</Window.DataContext>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<!-- 工具栏 -->
<StackPanel
Grid.Row="0"
Margin="10"
Orientation="Horizontal">
<Button
Width="100"
Height="30"
Command="{Binding LoadQuestsCommand}"
Content="打开文件夹" />
2025-06-22 11:33:58 +08:00
<Button
Width="100"
Height="30"
Command="{Binding SaveQuestAsCommand}"
Content="另存为" />
2025-06-22 11:33:58 +08:00
<Button
Width="100"
Height="30"
Command="{Binding SaveQuestCommand}"
Content="保存(覆盖)" />
<Button
Width="100"
Height="30"
Command="{Binding SaveQuestCommand}"
Content="打包"
IsEnabled="False" />
<StackPanel Visibility="{}">
</StackPanel>
2025-06-22 11:33:58 +08:00
</StackPanel>
<TabControl Grid.Row="1">
<TabItem Header="任务列表">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ListView
Grid.Column="0"
ItemsSource="{Binding Chapters}"
SelectionChanged="ChapterListView_SelectionChanged">
<ListView.ItemTemplate>
<DataTemplate>
<TextBlock
Margin="5"
FontSize="12"
Foreground="White">
<Run Text="{Binding Title}" />
</TextBlock>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal">
<Button
Width="100"
Height="30"
Command="{Binding TranslateTheChapterCommand}"
Content="全部翻译AI"
FontSize="14" />
</StackPanel>
<ScrollViewer Grid.Row="1">
<ItemsControl ItemsSource="{Binding SelectedQuests}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<GroupBox>
<GroupBox.Header>
<StackPanel Orientation="Vertical">
<TextBox
Background="Transparent"
BorderThickness="0"
FontSize="12"
Foreground="White"
Text="{Binding Title}" />
<TextBox
Background="Transparent"
BorderThickness="0"
FontSize="12"
Foreground="LightGray"
Text="{Binding SubTitle}" />
</StackPanel>
</GroupBox.Header>
<StackPanel>
<TextBlock Text="描述:" />
<TextBox
AcceptsReturn="True"
Text="{Binding Description}"
TextWrapping="Wrap" />
</StackPanel>
</GroupBox>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</Grid>
</Grid>
</TabItem>
2025-06-22 11:33:58 +08:00
<TabItem Header="战利品列表" />
</TabControl>
<!-- 状态栏
<StatusBar Grid.Row="2" Background="Transparent">
<TextBlock Background="Transparent" Foreground="White" Text="{Binding CurrentFilePath, StringFormat={}当前文件: {0}, TargetNullValue=未打开任何文件}"/>
</StatusBar>-->
</Grid>
</Window>