<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:pu="https://opensource.panuon.com/wpf-ui">
|
<FontFamily x:Key="iconfont">
|
/#iconfont
|
</FontFamily>
|
|
<!-- 颜色定义 -->
|
<SolidColorBrush x:Key="PrimaryBrush" Color="#2E5C8A"/>
|
<SolidColorBrush x:Key="PrimaryDarkBrush" Color="#1E3A5F"/>
|
<SolidColorBrush x:Key="BgBrush" Color="#E8EBF0"/>
|
<SolidColorBrush x:Key="BorderBrush" Color="#A0AEC0"/>
|
<SolidColorBrush x:Key="BorderDarkBrush" Color="#718096"/>
|
<SolidColorBrush x:Key="SuccessBrush" Color="#2D8659"/>
|
<SolidColorBrush x:Key="WarningBrush" Color="#C9872C"/>
|
<SolidColorBrush x:Key="ErrorBrush" Color="#C53030"/>
|
<SolidColorBrush x:Key="RunningBrush" Color="#3182CE"/>
|
<SolidColorBrush x:Key="TsBgBrush" Color="#F0F2F5"/>
|
<SolidColorBrush x:Key="TsPanelBrush" Color="#FFFFFF"/>
|
<SolidColorBrush x:Key="TsToolbarBrush" Color="#E2E8F0"/>
|
<SolidColorBrush x:Key="LightBlueBrush" Color="#EBF8FF"/>
|
<SolidColorBrush x:Key="LightGreenBrush" Color="#F0FFF4"/>
|
<SolidColorBrush x:Key="LightPurpleBrush" Color="#FAF5FF"/>
|
|
<DataTemplate x:Key="RequiredFormHeader">
|
<StackPanel Orientation="Horizontal">
|
<ContentControl Content="{Binding}" />
|
<TextBlock Text="*" Width="5" Foreground="Red" />
|
</StackPanel>
|
</DataTemplate>
|
|
<Style x:Key="RequiredInputFormGroupStyle" TargetType="pu:FormGroup">
|
<Setter Property="HeaderTemplate" Value="{StaticResource RequiredFormHeader}"/>
|
</Style>
|
|
<!-- 按钮样式 -->
|
<Style x:Key="LinkButton" TargetType="Button">
|
<Setter Property="Background" Value="{x:Null}" />
|
<Setter Property="Margin" Value="0" />
|
<Setter Property="Padding" Value="0" />
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryDarkBrush}" />
|
<Setter Property="Background" Value="Transparent" />
|
<Setter Property="BorderThickness" Value="0"/>
|
<Setter Property="Cursor" Value="Hand" />
|
<Setter Property="ContentTemplate">
|
<Setter.Value>
|
<DataTemplate>
|
<TextBlock Text="{Binding}" Padding="0" HorizontalAlignment="Left" VerticalAlignment="Center" TextDecorations="Underline" />
|
</DataTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
|
<Style x:Key="SimpleBtn" TargetType="Button">
|
<Setter Property="Background" Value="{x:Null}" />
|
<Setter Property="Margin" Value="0" />
|
<Setter Property="Padding" Value="0" />
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryDarkBrush}" />
|
<Setter Property="Background" Value="Transparent" />
|
<Setter Property="BorderThickness" Value="0"/>
|
<Setter Property="Cursor" Value="Hand" />
|
<Setter Property="ContentTemplate">
|
<Setter.Value>
|
<DataTemplate>
|
<TextBlock Text="{Binding}" Padding="0" HorizontalAlignment="Left" VerticalAlignment="Center"/>
|
</DataTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
|
<Style x:Key="ToolbarButtonStyle" TargetType="Button">
|
<Setter Property="Height" Value="24"/>
|
<Setter Property="Padding" Value="12,0"/>
|
<Setter Property="Background" Value="White"/>
|
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
|
<Setter Property="BorderThickness" Value="1"/>
|
<Setter Property="FontSize" Value="11"/>
|
<Setter Property="Cursor" Value="Hand"/>
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="Button">
|
<Border Background="{TemplateBinding Background}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
CornerRadius="2"
|
Padding="{TemplateBinding Padding}">
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
</Border>
|
<ControlTemplate.Triggers>
|
<Trigger Property="IsMouseOver" Value="True">
|
<Setter Property="Background" Value="#E8E8E8"/>
|
</Trigger>
|
</ControlTemplate.Triggers>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
<Style.Triggers>
|
<Trigger Property="IsEnabled" Value="False">
|
<Setter Property="BorderBrush" Value="LightGray"/>
|
<Setter Property="Background" Value="LightGray"/>
|
<Setter Property="Foreground" Value="Gray"/>
|
</Trigger>
|
</Style.Triggers>
|
</Style>
|
|
<Style x:Key="RunButtonStyle" TargetType="Button" BasedOn="{StaticResource ToolbarButtonStyle}">
|
<Setter Property="Background">
|
<Setter.Value>
|
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
|
<GradientStop Color="#38A169" Offset="0"/>
|
<GradientStop Color="#2D8659" Offset="1"/>
|
</LinearGradientBrush>
|
</Setter.Value>
|
</Setter>
|
<Setter Property="Foreground" Value="White"/>
|
<Setter Property="BorderBrush" Value="#276749"/>
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
<Style.Triggers>
|
<Trigger Property="IsMouseOver" Value="True">
|
<Setter Property="Background" Value="#38A169"/>
|
</Trigger>
|
</Style.Triggers>
|
</Style>
|
|
<Style x:Key="RunSingleButtonStyle" TargetType="Button" BasedOn="{StaticResource ToolbarButtonStyle}">
|
<Setter Property="Background">
|
<Setter.Value>
|
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
|
<GradientStop Color="#4299E1" Offset="0"/>
|
<GradientStop Color="#3182CE" Offset="1"/>
|
</LinearGradientBrush>
|
</Setter.Value>
|
</Setter>
|
<Setter Property="Foreground" Value="White"/>
|
<Setter Property="BorderBrush" Value="#2B6CB0"/>
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
<Style.Triggers>
|
<Trigger Property="IsMouseOver" Value="True">
|
<Setter Property="Background" Value="#4299E1"/>
|
</Trigger>
|
</Style.Triggers>
|
</Style>
|
|
<Style x:Key="PauseButtonStyle" TargetType="Button" BasedOn="{StaticResource ToolbarButtonStyle}">
|
<Setter Property="Background">
|
<Setter.Value>
|
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
|
<GradientStop Color="#D69E2E" Offset="0"/>
|
<GradientStop Color="#C9872C" Offset="1"/>
|
</LinearGradientBrush>
|
</Setter.Value>
|
</Setter>
|
<Setter Property="Foreground" Value="White"/>
|
<Setter Property="BorderBrush" Value="#975A16"/>
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
<Style.Triggers>
|
<Trigger Property="IsMouseOver" Value="True">
|
<Setter Property="Background" Value="#D69E2E"/>
|
</Trigger>
|
</Style.Triggers>
|
</Style>
|
|
<Style x:Key="StopButtonStyle" TargetType="Button" BasedOn="{StaticResource ToolbarButtonStyle}">
|
<Setter Property="Background">
|
<Setter.Value>
|
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
|
<GradientStop Color="#E53E3E" Offset="0"/>
|
<GradientStop Color="#C53030" Offset="1"/>
|
</LinearGradientBrush>
|
</Setter.Value>
|
</Setter>
|
<Setter Property="Foreground" Value="White"/>
|
<Setter Property="BorderBrush" Value="#9B2C2C"/>
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
<Style.Triggers>
|
<Trigger Property="IsMouseOver" Value="True">
|
<Setter Property="Background" Value="#E53E3E"/>
|
</Trigger>
|
</Style.Triggers>
|
</Style>
|
|
<Style x:Key="MenuItemStyle" TargetType="MenuItem" BasedOn="{x:Null}">
|
<Setter Property="Padding" Value="8,3"/>
|
<Setter Property="Background" Value="Transparent"/>
|
<Setter Property="BorderThickness" Value="0"/>
|
<Setter Property="Cursor" Value="Hand"/>
|
</Style>
|
|
<Style x:Key="ActionButtonStyle" TargetType="Button">
|
<Setter Property="Height" Value="22"/>
|
<Setter Property="Padding" Value="8,0"/>
|
<Setter Property="Background" Value="White"/>
|
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
|
<Setter Property="BorderThickness" Value="1"/>
|
<Setter Property="FontSize" Value="11"/>
|
<Setter Property="Cursor" Value="Hand"/>
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="Button">
|
<Border Background="{TemplateBinding Background}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
CornerRadius="2"
|
Padding="{TemplateBinding Padding}">
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
</Border>
|
<ControlTemplate.Triggers>
|
<Trigger Property="IsMouseOver" Value="True">
|
<Setter Property="Background" Value="#F0F0F0"/>
|
</Trigger>
|
</ControlTemplate.Triggers>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
|
<Style x:Key="TabButtonStyle" TargetType="RadioButton">
|
<Setter Property="Padding" Value="16,6"/>
|
<Setter Property="Background" Value="Transparent"/>
|
<Setter Property="BorderThickness" Value="0"/>
|
<Setter Property="FontSize" Value="11"/>
|
<Setter Property="Cursor" Value="Hand"/>
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="RadioButton">
|
<Border x:Name="border" Background="{TemplateBinding Background}"
|
BorderBrush="{StaticResource BorderBrush}"
|
BorderThickness="0,0,1,0"
|
Padding="{TemplateBinding Padding}">
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
</Border>
|
<ControlTemplate.Triggers>
|
<Trigger Property="IsMouseOver" Value="True">
|
<Setter TargetName="border" Property="Background" Value="#3498DB"/>
|
<Setter Property="Foreground" Value="White"/>
|
</Trigger>
|
<Trigger Property="IsChecked" Value="True">
|
<Setter TargetName="border" Property="Background" Value="White"/>
|
<Setter Property="Foreground" Value="{StaticResource PrimaryBrush}"/>
|
<Setter TargetName="border" Property="BorderBrush" Value="{StaticResource PrimaryBrush}"/>
|
<Setter TargetName="border" Property="BorderThickness" Value="0,0,0,2"/>
|
<Setter TargetName="border" Property="Margin" Value="0,0,0,-2"/>
|
</Trigger>
|
</ControlTemplate.Triggers>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
|
<Style x:Key="SequenceTabStyle" TargetType="RadioButton">
|
<Setter Property="Padding" Value="8,2"/>
|
<Setter Property="Background" Value="White"/>
|
<Setter Property="BorderBrush" Value="{StaticResource BorderDarkBrush}"/>
|
<Setter Property="BorderThickness" Value="1"/>
|
<Setter Property="FontSize" Value="11"/>
|
<Setter Property="Cursor" Value="Hand"/>
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="RadioButton">
|
<Border x:Name="border" Background="{TemplateBinding Background}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
CornerRadius="2"
|
Padding="{TemplateBinding Padding}">
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
</Border>
|
<ControlTemplate.Triggers>
|
<Trigger Property="IsMouseOver" Value="True">
|
<Setter TargetName="border" Property="Background" Value="#F5F5F5"/>
|
</Trigger>
|
<Trigger Property="IsChecked" Value="True">
|
<Setter TargetName="border" Property="Background" Value="{StaticResource PrimaryBrush}"/>
|
<Setter Property="Foreground" Value="White"/>
|
</Trigger>
|
</ControlTemplate.Triggers>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
|
<Style x:Key="AddSeqButtonStyle" TargetType="Button">
|
<Setter Property="Height" Value="20"/>
|
<Setter Property="Padding" Value="8,0"/>
|
<Setter Property="Background" Value="White"/>
|
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
|
<Setter Property="BorderThickness" Value="1"/>
|
<Setter Property="FontSize" Value="10"/>
|
<Setter Property="Margin" Value="6,0,0,0"/>
|
<Setter Property="Cursor" Value="Hand"/>
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="Button">
|
<Border Background="{TemplateBinding Background}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
CornerRadius="2"
|
Padding="{TemplateBinding Padding}">
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
</Border>
|
<ControlTemplate.Triggers>
|
<Trigger Property="IsMouseOver" Value="True">
|
<Setter Property="Background" Value="#F0F0F0"/>
|
</Trigger>
|
</ControlTemplate.Triggers>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
|
<Style x:Key="LogFilterButtonStyle" TargetType="Button">
|
<Setter Property="Height" Value="22"/>
|
<Setter Property="Padding" Value="8,0"/>
|
<Setter Property="BorderThickness" Value="1"/>
|
<Setter Property="FontSize" Value="10"/>
|
<Setter Property="Cursor" Value="Hand"/>
|
</Style>
|
|
<!-- DataGrid样式 -->
|
<Style TargetType="DataGrid">
|
<Setter Property="AutoGenerateColumns" Value="False"/>
|
<Setter Property="HeadersVisibility" Value="Column"/>
|
<Setter Property="GridLinesVisibility" Value="All"/>
|
<Setter Property="HorizontalGridLinesBrush" Value="{StaticResource BorderBrush}"/>
|
<Setter Property="VerticalGridLinesBrush" Value="{StaticResource BorderBrush}"/>
|
<Setter Property="BorderBrush" Value="{StaticResource BorderDarkBrush}"/>
|
<Setter Property="BorderThickness" Value="1"/>
|
<Setter Property="Background" Value="White"/>
|
<Setter Property="RowBackground" Value="White"/>
|
<Setter Property="AlternatingRowBackground" Value="#F5F5F5"/>
|
<Setter Property="FontSize" Value="11"/>
|
</Style>
|
|
<Style TargetType="DataGridColumnHeader">
|
<Setter Property="Background" Value="#F5F5F5"/>
|
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
|
<Setter Property="BorderThickness" Value="0,0,1,1"/>
|
<Setter Property="Padding" Value="4"/>
|
<Setter Property="Height" Value="26"/>
|
<Setter Property="FontWeight" Value="Normal"/>
|
</Style>
|
|
<Style TargetType="DataGridCell">
|
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
|
<Setter Property="BorderThickness" Value="0"/>
|
<Setter Property="Padding" Value="2,4"/>
|
<Style.Triggers>
|
<Trigger Property="IsSelected" Value="True">
|
<Setter Property="Background" Value="#BBDEFB"/>
|
<Setter Property="Foreground" Value="Black"/>
|
</Trigger>
|
</Style.Triggers>
|
</Style>
|
|
<Style TargetType="DataGridRow">
|
<Style.Triggers>
|
<Trigger Property="IsSelected" Value="True">
|
<Setter Property="Background" Value="#BBDEFB"/>
|
</Trigger>
|
<Trigger Property="IsMouseOver" Value="True">
|
<Setter Property="Background" Value="#E3F2FD"/>
|
</Trigger>
|
</Style.Triggers>
|
</Style>
|
|
|
|
<Style x:Key="CellBox" TargetType="TextBox">
|
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
<Setter Property="Padding" Value="3"/>
|
</Style>
|
|
<!-- TextBox样式 -->
|
<Style TargetType="TextBox" BasedOn="{StaticResource CellBox}">
|
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
<Setter Property="Padding" Value="3"/>
|
</Style>
|
|
<Style TargetType="pu:SearchBox">
|
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
<Setter Property="Padding" Value="3"/>
|
</Style>
|
|
<!-- ComboBox样式 -->
|
<Style TargetType="ComboBox">
|
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
|
<Setter Property="Padding" Value="3"/>
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
</Style>
|
|
<Style x:Key="CellBlock" TargetType="TextBlock">
|
<Setter Property="Padding" Value="4"/>
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
</Style>
|
|
<Style x:Key="CellCob" TargetType="ComboBox">
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
</Style>
|
|
<Style TargetType="ComboBoxItem">
|
<Setter Property="Padding" Value="3"/>
|
</Style>
|
|
<ControlTemplate x:Key="EditDataGrid" TargetType="{x:Type DataGrid}">
|
<Border Background="{TemplateBinding Background}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
BorderThickness="{TemplateBinding BorderThickness}">
|
<Grid>
|
<Grid.RowDefinitions>
|
<RowDefinition Height="Auto"/>
|
<!-- 列头 -->
|
<RowDefinition Height="Auto"/>
|
<!-- 数据行 -->
|
<RowDefinition Height="Auto"/>
|
<!-- 按钮 -->
|
</Grid.RowDefinitions>
|
|
<!-- 列头 -->
|
<DataGridColumnHeadersPresenter Grid.Row="0"/>
|
|
<!-- 数据行 -->
|
<ScrollViewer Grid.Row="1" x:Name="DG_ScrollViewer">
|
<ItemsPresenter/>
|
</ScrollViewer>
|
<Button Grid.Row="2"
|
Content="添加新行" Tag="{Binding RelativeSource={RelativeSource AncestorType=DataGrid,AncestorLevel=1}}"
|
HorizontalAlignment="Stretch"
|
Margin="0"/>
|
</Grid>
|
</Border>
|
</ControlTemplate>
|
</ResourceDictionary>
|