145 lines
6.1 KiB
Plaintext
145 lines
6.1 KiB
Plaintext
![]() |
<Window x:Class="WatchDogWindowApp.WPF.WatchDogWindow"
|
||
|
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:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||
|
|
||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
|
xmlns:local="clr-namespace:WatchDogWindowApp.WPF"
|
||
|
mc:Ignorable="d"
|
||
|
TextElement.FontWeight="Regular"
|
||
|
TextElement.FontSize="14"
|
||
|
TextOptions.TextFormattingMode="Ideal"
|
||
|
TextOptions.TextRenderingMode="Auto"
|
||
|
Background="Wheat"
|
||
|
Title="守护程序" Height="600" Width="1000">
|
||
|
|
||
|
<StackPanel >
|
||
|
|
||
|
<StackPanel Orientation="Horizontal">
|
||
|
<Button Background="Green"
|
||
|
Style="{StaticResource MaterialDesignRaisedDarkButton}"
|
||
|
Height="50" Width="100" Margin="5"
|
||
|
materialDesign:ButtonAssist.CornerRadius="25"
|
||
|
Command="{Binding Path=AddCommand}"
|
||
|
ToolTip="MaterialDesignRaisedDarkButton with Round Corners">
|
||
|
<TextBlock
|
||
|
Text="添加程序" />
|
||
|
</Button>
|
||
|
<Button Background="Green"
|
||
|
Style="{StaticResource MaterialDesignRaisedDarkButton}"
|
||
|
Height="50" Width="100" Margin="5"
|
||
|
materialDesign:ButtonAssist.CornerRadius="25"
|
||
|
Command="{Binding Path=RemoveCommand}"
|
||
|
ToolTip="MaterialDesignRaisedDarkButton with Round Corners">
|
||
|
<TextBlock
|
||
|
Text="移除程序" />
|
||
|
</Button>
|
||
|
|
||
|
|
||
|
|
||
|
<Button Background="Green"
|
||
|
Style="{StaticResource MaterialDesignRaisedDarkButton}"
|
||
|
Height="50" Width="100" Margin="5"
|
||
|
materialDesign:ButtonAssist.CornerRadius="25"
|
||
|
Command="{Binding Path=StartCommand}"
|
||
|
ToolTip="MaterialDesignRaisedDarkButton with Round Corners">
|
||
|
<TextBlock
|
||
|
Text="启动程序" />
|
||
|
</Button>
|
||
|
<Button Background="Green"
|
||
|
Style="{StaticResource MaterialDesignRaisedDarkButton}"
|
||
|
Height="50" Width="100" Margin="5"
|
||
|
materialDesign:ButtonAssist.CornerRadius="25"
|
||
|
Command="{Binding Path=ReStartCommand}"
|
||
|
ToolTip="MaterialDesignRaisedDarkButton with Round Corners">
|
||
|
<TextBlock
|
||
|
Text="重启程序" />
|
||
|
</Button>
|
||
|
<Button Background="Green"
|
||
|
Style="{StaticResource MaterialDesignRaisedDarkButton}"
|
||
|
Height="50" Width="100" Margin="5"
|
||
|
materialDesign:ButtonAssist.CornerRadius="25"
|
||
|
Command="{Binding Path=CloseCommand}"
|
||
|
ToolTip="MaterialDesignRaisedDarkButton with Round Corners">
|
||
|
<TextBlock
|
||
|
Text="关闭程序" />
|
||
|
</Button>
|
||
|
<Button
|
||
|
Style="{StaticResource MaterialDesignRaisedDarkButton}"
|
||
|
Height="50" Width="100" Margin="5" Background="Green"
|
||
|
materialDesign:ButtonAssist.CornerRadius="25"
|
||
|
Command="{Binding Path=StartAllCommand}"
|
||
|
ToolTip="MaterialDesignRaisedDarkButton with Round Corners">
|
||
|
<TextBlock
|
||
|
Text="全部启动" />
|
||
|
</Button>
|
||
|
<Button
|
||
|
Style="{StaticResource MaterialDesignRaisedDarkButton}"
|
||
|
Height="50" Width="100" Margin="5" Background="Green"
|
||
|
materialDesign:ButtonAssist.CornerRadius="25"
|
||
|
Command="{Binding Path=KillAllCommand}"
|
||
|
ToolTip="MaterialDesignRaisedDarkButton with Round Corners">
|
||
|
<TextBlock
|
||
|
Text="全部关闭" />
|
||
|
</Button>
|
||
|
<Button Background="Green"
|
||
|
Style="{StaticResource MaterialDesignRaisedDarkButton}"
|
||
|
Height="50" Width="100" Margin="5"
|
||
|
materialDesign:ButtonAssist.CornerRadius="25"
|
||
|
Command="{Binding Path=RemoveAllCommand}"
|
||
|
ToolTip="MaterialDesignRaisedDarkButton with Round Corners">
|
||
|
<TextBlock
|
||
|
Text="全部移除" />
|
||
|
</Button>
|
||
|
</StackPanel>
|
||
|
<!-- and here's another -->
|
||
|
<ItemsControl
|
||
|
ItemsSource="{Binding ExeCollection}"
|
||
|
Grid.IsSharedSizeScope="True">
|
||
|
<ItemsControl.ItemTemplate>
|
||
|
<DataTemplate
|
||
|
DataType="{x:Type local:SelectableViewModel}">
|
||
|
<Border
|
||
|
x:Name="Border"
|
||
|
Padding="8"
|
||
|
BorderThickness="0 0 0 1"
|
||
|
BorderBrush="{DynamicResource MaterialDesignDivider}">
|
||
|
<Grid>
|
||
|
<Grid.ColumnDefinitions>
|
||
|
<ColumnDefinition
|
||
|
SharedSizeGroup="Checkerz" />
|
||
|
<ColumnDefinition />
|
||
|
</Grid.ColumnDefinitions>
|
||
|
<ToggleButton
|
||
|
VerticalAlignment="Center"
|
||
|
IsChecked="{Binding IsSelected}"
|
||
|
Style="{StaticResource MaterialDesignActionLightToggleButton}"
|
||
|
Content="{Binding Code}" />
|
||
|
<StackPanel
|
||
|
Margin="8 0 0 0"
|
||
|
Grid.Column="1">
|
||
|
<TextBlock
|
||
|
FontWeight="Bold"
|
||
|
Text="{Binding Name}" />
|
||
|
<TextBlock
|
||
|
Text="{Binding Description}" />
|
||
|
</StackPanel>
|
||
|
</Grid>
|
||
|
</Border>
|
||
|
<DataTemplate.Triggers>
|
||
|
<DataTrigger
|
||
|
Binding="{Binding IsSelected}"
|
||
|
Value="True">
|
||
|
<Setter
|
||
|
TargetName="Border"
|
||
|
Property="Background"
|
||
|
Value="{DynamicResource MaterialDesignSelection}" />
|
||
|
</DataTrigger>
|
||
|
</DataTemplate.Triggers>
|
||
|
</DataTemplate>
|
||
|
</ItemsControl.ItemTemplate>
|
||
|
</ItemsControl>
|
||
|
</StackPanel>
|
||
|
</Window>
|