mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-05-25 10:05:49 +08:00
重构任务节点对话框和JS脚本选择窗口,调整命名空间,优化代码结构
This commit is contained in:
@@ -0,0 +1,93 @@
|
||||
<ui:FluentWindow x:Class="BetterGenshinImpact.View.Windows.GearTask.AddTaskNodeDialog"
|
||||
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:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
||||
xmlns:windows="clr-namespace:BetterGenshinImpact.ViewModel.Windows"
|
||||
xmlns:gearTask="clr-namespace:BetterGenshinImpact.ViewModel.Windows.GearTask"
|
||||
d:DataContext="{d:DesignInstance Type=gearTask:AddTaskNodeDialogViewModel}"
|
||||
Width="450"
|
||||
Height="300"
|
||||
MinWidth="400"
|
||||
MinHeight="250"
|
||||
ui:Design.Background="{DynamicResource ApplicationBackgroundBrush}"
|
||||
ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
ExtendsContentIntoTitleBar="True"
|
||||
FontFamily="{DynamicResource TextThemeFontFamily}"
|
||||
ResizeMode="NoResize"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
WindowStyle="SingleBorderWindow"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- 标题栏 -->
|
||||
<ui:TitleBar Name="MyTitleBar" Grid.Row="0" Title="添加任务">
|
||||
<ui:TitleBar.Icon>
|
||||
<ui:ImageIcon Source="pack://application:,,,/Resources/Images/logo.png" />
|
||||
</ui:TitleBar.Icon>
|
||||
</ui:TitleBar>
|
||||
|
||||
<!-- 内容区域 -->
|
||||
<Grid Grid.Row="1" Margin="24">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- 任务类型显示 -->
|
||||
<ui:TextBlock Grid.Row="0"
|
||||
Margin="0,0,0,8"
|
||||
FontSize="14"
|
||||
FontWeight="SemiBold"
|
||||
Text="{Binding TaskType, StringFormat='任务类型: {0}'}" />
|
||||
|
||||
<!-- 任务名称 -->
|
||||
<ui:TextBlock Grid.Row="1"
|
||||
Margin="0,0,0,4"
|
||||
Text="任务名称 *" />
|
||||
<ui:TextBox Grid.Row="2"
|
||||
Margin="0,0,0,16"
|
||||
Text="{Binding TaskName, UpdateSourceTrigger=PropertyChanged}" />
|
||||
|
||||
<!-- 任务描述 -->
|
||||
<ui:TextBlock Grid.Row="3"
|
||||
Margin="0,0,0,4"
|
||||
Text="任务描述" />
|
||||
<ui:TextBox Grid.Row="4"
|
||||
Margin="0,0,0,0"
|
||||
AcceptsReturn="True"
|
||||
TextWrapping="Wrap"
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
Text="{Binding TaskDescription, UpdateSourceTrigger=PropertyChanged}" />
|
||||
</Grid>
|
||||
|
||||
<!-- 按钮区域 -->
|
||||
<Grid Grid.Row="2" Margin="24,0,24,24">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
||||
<ui:Button Margin="0,0,8,0"
|
||||
Appearance="Primary"
|
||||
Command="{Binding ConfirmCommand}"
|
||||
Content="确定"
|
||||
IsDefault="True" />
|
||||
<ui:Button Command="{Binding CancelCommand}"
|
||||
Content="取消"
|
||||
IsCancel="True" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ui:FluentWindow>
|
||||
Reference in New Issue
Block a user