提交用户部分代码

This commit is contained in:
chfei committed 2026-11-13 15:51:16 +08:00
1 parent 9b9e4cbd82
commit 127fc22de5
26 files changed
+1110 -206

No files matched your search

@@ -1,8 +1,12 @@
<ResourceDictionary
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:f="clr-namespace:Store.Management.Framework.Controls"
xmlns:wpf="MAX.WPF">
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:wpf="MAX.WPF"
mc:Ignorable="d">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Fonts/FontGeometry.xaml" />
<ResourceDictionary Source="pack://application:,,,/MAX.Common.WPF;component/Resources/Generic.xaml" />
@@ -37,6 +41,180 @@
<Style BasedOn="{StaticResource WindowBase}" TargetType="f:WindowBase" />
<Style BasedOn="{StaticResource DialogWindowStyle}" TargetType="f:DialogWindow" />
<!--<Style x:Key="HorizontalSpacingPanel" TargetType="hc:UniformSpacingPanel">
<Setter Property="Orientation" Value="Horizontal" />
<Setter Property="HorizontalSpacing" Value="2" />
<Setter Property="ItemVerticalAlignment" Value="Center" />
</Style>-->
<!--<Style x:Key="HorizontalSpacingPanel2" TargetType="hc:UniformSpacingPanel">
<Setter Property="Orientation" Value="Horizontal" />
<Setter Property="HorizontalSpacing" Value="4" />
<Setter Property="ItemVerticalAlignment" Value="Center" />
</Style>
<Style x:Key="VerticalSpacingPanel" TargetType="hc:UniformSpacingPanel">
<Setter Property="Orientation" Value="Vertical" />
<Setter Property="VerticalSpacing" Value="2" />
</Style>
<Style x:Key="VerticalSpacingPanel2" TargetType="hc:UniformSpacingPanel">
<Setter Property="Orientation" Value="Vertical" />
<Setter Property="VerticalSpacing" Value="4" />
</Style>-->
<Style x:Key="HorizontalSpacingPanel" TargetType="wpf:SpacingStackPanel">
<Setter Property="Orientation" Value="Horizontal" />
<Setter Property="HorizontalSpacing" Value="2" />
<Setter Property="ItemVerticalAlignment" Value="Center" />
</Style>
<Style x:Key="HorizontalSpacingPanel4" TargetType="wpf:SpacingStackPanel">
<Setter Property="Orientation" Value="Horizontal" />
<Setter Property="HorizontalSpacing" Value="4" />
<Setter Property="ItemVerticalAlignment" Value="Center" />
</Style>
<Style x:Key="HorizontalSpacingPanel8" TargetType="wpf:SpacingStackPanel">
<Setter Property="Orientation" Value="Horizontal" />
<Setter Property="HorizontalSpacing" Value="8" />
<Setter Property="ItemVerticalAlignment" Value="Center" />
</Style>
<Style x:Key="VerticalSpacingPanel" TargetType="wpf:SpacingStackPanel">
<Setter Property="Orientation" Value="Vertical" />
<Setter Property="VerticalSpacing" Value="2" />
</Style>
<Style x:Key="VerticalSpacingPanel4" TargetType="wpf:SpacingStackPanel">
<Setter Property="Orientation" Value="Vertical" />
<Setter Property="VerticalSpacing" Value="4" />
</Style>
<Style x:Key="VerticalSpacingPanel8" TargetType="wpf:SpacingStackPanel">
<Setter Property="Orientation" Value="Vertical" />
<Setter Property="VerticalSpacing" Value="8" />
</Style>
<Style
x:Key="HorizontalIconText"
BasedOn="{StaticResource BaseStyle}"
TargetType="f:HorizontalIconText">
<Setter Property="Spacing" Value="4" />
<Setter Property="Focusable" Value="False" />
<Setter Property="IconSize" Value="16" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="f:HorizontalIconText">
<Border>
<DockPanel>
<TextBlock
FontSize="{TemplateBinding IconSize}"
Style="{StaticResource TextBlockIcon}"
Text="{TemplateBinding Icon}"
Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ShowIcon, Converter={StaticResource Boolean2VisibilityConverter}}" />
<Border Width="{TemplateBinding Spacing}" Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ShowSpace, Converter={StaticResource Boolean2VisibilityConverter}}" />
<TextBlock
VerticalAlignment="Center"
Text="{TemplateBinding Text}"
TextTrimming="CharacterEllipsis" />
</DockPanel>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style BasedOn="{StaticResource HorizontalIconText}" TargetType="f:HorizontalIconText" />
<Style x:Key="Dialog" TargetType="UserControl">
<Setter Property="Padding" Value="0" />
<Setter Property="Focusable" Value="True" />
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="Background" Value="White" />
</Style>
<Style
x:Key="DialogButtonStyle"
BasedOn="{StaticResource ButtonDefault}"
TargetType="Button">
<Setter Property="MinWidth" Value="70" />
<Setter Property="Height" Value="26" />
</Style>
<Style
x:Key="DialogPrimaryButtonStyle"
BasedOn="{StaticResource ButtonPrimary}"
TargetType="Button">
<Setter Property="MinWidth" Value="70" />
<Setter Property="Height" Value="26" />
</Style>
<Style
x:Key="ConfirmDialog"
BasedOn="{StaticResource Dialog}"
TargetType="UserControl">
<Setter Property="Background" Value="White" />
<Setter Property="Padding" Value="10" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="UserControl">
<Border
d:DataContext="{d:DesignInstance Type=f:ConfirmDialogViewModel}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<Border Padding="{TemplateBinding Padding}">
<ContentPresenter />
</Border>
<Border
Grid.Row="1"
Padding="5,8"
BorderBrush="{StaticResource BorderBrush}"
BorderThickness="0,1,0,0">
<Grid>
<Border Padding="2,0">
<f:HorizontalIconText
d:Text="错误信息"
Foreground="{StaticResource DangerBrush}"
Icon="{StaticResource txt-warning}"
Text="{Binding ErrorMsg}"
Visibility="{Binding ErrorMsg, Converter={StaticResource String2VisibilityConverter}}" />
</Border>
<wpf:SpacingStackPanel HorizontalAlignment="Right" Style="{StaticResource HorizontalSpacingPanel4}">
<Button Command="{Binding ConfirmCommand}" Style="{StaticResource DialogPrimaryButtonStyle}">
<TextBlock Text="确认" />
</Button>
<Button
HorizontalAlignment="Right"
Command="{Binding CancelCommand}"
Style="{StaticResource DialogButtonStyle}">
<TextBlock Text="取消" />
</Button>
</wpf:SpacingStackPanel>
</Grid>
</Border>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style
x:Key="VerticalAlignment"
BasedOn="{StaticResource TitleContentBaseStyle}"