mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 09:50:40 +08:00
219 lines
10 KiB
XML
219 lines
10 KiB
XML
<UserControl
|
|
x:Class="MeoAsstGui.TaskQueueView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:c="clr-namespace:CalcBinding;assembly=CalcBinding"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:dd="urn:gong-wpf-dragdrop"
|
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
|
xmlns:local="clr-namespace:MeoAsstGui"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:s="https://github.com/canton7/Stylet"
|
|
xmlns:vm="clr-namespace:MeoAsstGui;assembly=MeoAsstGui"
|
|
MinWidth="720"
|
|
d:DataContext="{d:DesignInstance {x:Type vm:TaskQueueViewModel}}"
|
|
d:DesignHeight="495"
|
|
d:DesignWidth="800"
|
|
mc:Ignorable="d">
|
|
<Grid Margin="20">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="*" />
|
|
<!--<ColumnDefinition Width="5" />-->
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid Grid.Column="0" Margin="10">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Border
|
|
Width="210"
|
|
MaxWidth="210"
|
|
BorderBrush="{DynamicResource BorderBrush}"
|
|
BorderThickness="1"
|
|
CornerRadius="4">
|
|
<Grid
|
|
Grid.Row="0"
|
|
Width="190"
|
|
Margin="0">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="40" />
|
|
</Grid.RowDefinitions>
|
|
<ListBox
|
|
x:Name="TaskList"
|
|
Grid.Row="0"
|
|
Width="190"
|
|
MinHeight="220"
|
|
Margin="0,10,0,0"
|
|
HorizontalAlignment="Center"
|
|
dd:DragDrop.IsDragSource="{Binding Idle}"
|
|
dd:DragDrop.IsDropTarget="{Binding Idle}"
|
|
BorderThickness="0"
|
|
ItemsSource="{Binding Path=TaskItemViewModels}"
|
|
SelectionChanged="{s:Action TaskItemSelectionChanged}"
|
|
ToolTip="{DynamicResource LabelSequenceTip}">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<StackPanel Orientation="Horizontal">
|
|
<!--<TextBlock Style="{StaticResource TextBlockDefault}" Text="{Binding ID}" />
|
|
<TextBlock Style="{StaticResource TextBlockDefault}" Text=". " />-->
|
|
<CheckBox
|
|
Content="{Binding Name}"
|
|
IsChecked="{Binding IsChecked}"
|
|
IsHitTestVisible="{Binding ElementName=TaskList, Path=DataContext.Idle}" />
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
<Grid Grid.Row="1">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Button
|
|
Width="{Binding SelectedAllWidth}"
|
|
Height="30"
|
|
VerticalAlignment="Top"
|
|
Command="{s:Action SelectedAll}"
|
|
Content="{DynamicResource SelectAll}"
|
|
IsEnabled="{Binding Idle}" />
|
|
<hc:SplitButton
|
|
Grid.Column="1"
|
|
Width="{Binding InverseSelectedWidth}"
|
|
Height="30"
|
|
VerticalAlignment="Top"
|
|
Command="{s:Action InverseSelected}"
|
|
Content="{Binding InverseShowText}"
|
|
IsEnabled="{Binding Idle}"
|
|
Visibility="{c:Binding ShowInverse}">
|
|
<hc:SplitButton.DropDownContent>
|
|
<MenuItem
|
|
Width="{Binding InverseSelectedWidth}"
|
|
Command="{s:Action ChangeInverseMode}"
|
|
Header="{Binding InverseMenuText}" />
|
|
</hc:SplitButton.DropDownContent>
|
|
</hc:SplitButton>
|
|
<Button
|
|
Grid.Column="1"
|
|
Width="90"
|
|
Height="30"
|
|
VerticalAlignment="Top"
|
|
Command="{s:Action InverseSelected}"
|
|
Content="{Binding InverseShowText}"
|
|
IsEnabled="{Binding Idle}"
|
|
Visibility="{c:Binding Path=!ShowInverse}" />
|
|
</Grid>
|
|
</Grid>
|
|
</Border>
|
|
<Grid
|
|
Grid.Row="1"
|
|
Margin="10"
|
|
HorizontalAlignment="Center">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock
|
|
Padding="5,0"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Style="{StaticResource TextBlockDefault}"
|
|
Text="{DynamicResource Then}"
|
|
TextWrapping="Wrap" />
|
|
<ComboBox
|
|
Grid.Column="1"
|
|
Width="160"
|
|
Margin="5"
|
|
DisplayMemberPath="Display"
|
|
ItemsSource="{Binding ActionAfterCompletedList}"
|
|
SelectedValue="{Binding ActionAfterCompleted}"
|
|
SelectedValuePath="Value" />
|
|
</Grid>
|
|
<Grid Grid.Row="2" Height="60">
|
|
<Button
|
|
Width="100"
|
|
Height="50"
|
|
Margin="5"
|
|
Command="{s:Action LinkStart}"
|
|
Content="{DynamicResource LinkStart}"
|
|
IsEnabled="{Binding Inited}"
|
|
Visibility="{c:Binding Path='(Idle and !Stopping) or !Inited'}" />
|
|
<Button
|
|
Width="100"
|
|
Height="50"
|
|
Margin="5"
|
|
Command="{s:Action Stop}"
|
|
Content="{DynamicResource Stop}"
|
|
IsEnabled="{c:Binding Path='!Stopping'}"
|
|
Visibility="{c:Binding Path='(!Idle or Stopping) and Inited'}" />
|
|
</Grid>
|
|
|
|
<!--<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment ="Center" >-->
|
|
<!--<CheckBox IsChecked="{Binding Shutdown}" Content="自动关机" HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
<CheckBox.InputBindings>
|
|
<KeyBinding Key="H" Command="{s:Action ShowButton}" />
|
|
</CheckBox.InputBindings>
|
|
</CheckBox>
|
|
<CheckBox IsChecked="{Binding Hibernate}" Content="休眠" Visibility="{Binding Visible}" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
|
<CheckBox IsChecked="{Binding Suspend}" Content="待机" Visibility="{Binding Visible}" HorizontalAlignment="Center" VerticalAlignment="Center" />-->
|
|
<!--</StackPanel>-->
|
|
|
|
</Grid>
|
|
<Grid Grid.Column="1">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition Height="165" />
|
|
</Grid.RowDefinitions>
|
|
<local:FightSettingsUserControl
|
|
Grid.Row="0"
|
|
Margin="10"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Top" />
|
|
<TextBlock
|
|
Grid.Row="1"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Bottom"
|
|
Style="{StaticResource TextBlockDefault}"
|
|
Text="{Binding StagesOfToday}" />
|
|
</Grid>
|
|
|
|
<!--<GridSplitter Grid.Column="2" Width="5" HorizontalAlignment="Stretch" />-->
|
|
<!--<Rectangle Grid.Column="2" VerticalAlignment="Stretch" Fill="LightGray" Width="4" />-->
|
|
<ScrollViewer
|
|
Grid.Column="2"
|
|
Margin="10"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Top"
|
|
local:AutoScroll.AutoScroll="True"
|
|
HorizontalScrollBarVisibility="Disabled">
|
|
<ItemsControl
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch"
|
|
ItemsSource="{Binding Path=LogItemViewModels}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock
|
|
Width="95"
|
|
Margin="0,5"
|
|
Foreground="Gray"
|
|
Style="{StaticResource TextBlockDefault}"
|
|
Text="{Binding Time}"
|
|
TextWrapping="Wrap" />
|
|
<TextBlock
|
|
Width="135"
|
|
FontWeight="{Binding Weight}"
|
|
Foreground="{Binding Color}"
|
|
Style="{StaticResource TextBlockDefault}"
|
|
Text="{Binding Content}"
|
|
TextWrapping="Wrap" />
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</ScrollViewer>
|
|
</Grid>
|
|
</UserControl> |