|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254 |
- <Window
- x:Class="BPASmartClient.CustomResource.Pages.View.UserConfigView"
- 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:local="clr-namespace:BPASmartClient.CustomResource.Pages.View"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:vm="clr-namespace:BPASmartClient.CustomResource.Pages.ViewModel"
- Title="UserConfigView"
- Width="800"
- Height="500"
- AllowsTransparency="True"
- Background="{x:Null}"
- Topmost="True"
- WindowStartupLocation="CenterScreen"
- WindowStyle="None"
- mc:Ignorable="d">
- <Window.DataContext>
- <vm:UserConfigViewModel />
- </Window.DataContext>
- <Window.Resources>
- <ImageBrush x:Key="ImageBrushAddBlue" ImageSource="../../Image/按钮/AddGreen.png" />
- <ImageBrush x:Key="ImageBrushAddGray" ImageSource="../../Image/按钮/Delete.png" />
- <Style x:Key="ScrollBarPageButton" TargetType="{x:Type RepeatButton}">
- <Setter Property="SnapsToDevicePixels" Value="True" />
- <Setter Property="OverridesDefaultStyle" Value="true" />
- <Setter Property="IsTabStop" Value="false" />
- <Setter Property="Focusable" Value="false" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type RepeatButton}">
- <Border Background="Transparent" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style x:Key="ScrollBarThumb" TargetType="{x:Type Thumb}">
- <Setter Property="SnapsToDevicePixels" Value="True" />
- <Setter Property="OverridesDefaultStyle" Value="true" />
- <Setter Property="IsTabStop" Value="false" />
- <Setter Property="Focusable" Value="false" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Thumb}">
- <Border
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="1"
- CornerRadius="2" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <ControlTemplate x:Key="VerticalScrollBar" TargetType="{x:Type ScrollBar}">
- <Grid>
- <Border
- Width="0.5"
- Background="#FF046BFF"
- CornerRadius="2" />
- <Track x:Name="PART_Track" IsDirectionReversed="true">
- <Track.DecreaseRepeatButton>
- <RepeatButton Command="ScrollBar.PageUpCommand" Style="{StaticResource ScrollBarPageButton}" />
- </Track.DecreaseRepeatButton>
- <Track.Thumb>
- <Thumb
- Margin="4,0,4,0"
- Background="DodgerBlue"
- Style="{StaticResource ScrollBarThumb}" />
- </Track.Thumb>
- <Track.IncreaseRepeatButton>
- <RepeatButton Command="ScrollBar.PageDownCommand" Style="{StaticResource ScrollBarPageButton}" />
- </Track.IncreaseRepeatButton>
- </Track>
- </Grid>
- </ControlTemplate>
-
- <ControlTemplate x:Key="ScrollViewerControlTemplate1" TargetType="{x:Type ScrollViewer}">
- <Grid x:Name="Grid" Background="{TemplateBinding Background}">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="*" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- <Rectangle
- x:Name="Corner"
- Grid.Row="1"
- Grid.Column="1"
- Fill="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
- <ScrollContentPresenter
- x:Name="PART_ScrollContentPresenter"
- Grid.Row="0"
- Grid.Column="0"
- Margin="{TemplateBinding Padding}"
- CanContentScroll="{TemplateBinding CanContentScroll}"
- CanHorizontallyScroll="False"
- CanVerticallyScroll="False"
- Content="{TemplateBinding Content}"
- ContentTemplate="{TemplateBinding ContentTemplate}" />
- <ScrollBar
- x:Name="PART_VerticalScrollBar"
- Grid.Row="0"
- Grid.Column="1"
- AutomationProperties.AutomationId="VerticalScrollBar"
- Cursor="Arrow"
- Maximum="{TemplateBinding ScrollableHeight}"
- Minimum="0"
- Template="{StaticResource VerticalScrollBar}"
- ViewportSize="{TemplateBinding ViewportHeight}"
- Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
- Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
- <ScrollBar
- x:Name="PART_HorizontalScrollBar"
- Grid.Row="1"
- Grid.Column="0"
- AutomationProperties.AutomationId="HorizontalScrollBar"
- Cursor="Arrow"
- Maximum="{TemplateBinding ScrollableWidth}"
- Minimum="0"
- Orientation="Horizontal"
- ViewportSize="{TemplateBinding ViewportWidth}"
- Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
- Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
- </Grid>
- </ControlTemplate>
- <!-- 对象树子模板 -->
- <DataTemplate x:Key="TreeItemTemplate" DataType="TreeViewItem">
- <Grid Height="28" Margin="50,0,0,0">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="30" />
- </Grid.ColumnDefinitions>
- <TextBlock
- x:Name="tb_PageName"
- Margin="10,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="15"
- Foreground="White"
- Text="{Binding Name}" />
- <Button
- x:Name="BtnAdd"
- Grid.Column="1"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Background="Transparent"
- Command="{Binding DataContext.AddUserPageCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=TreeView}}"
- CommandParameter="{Binding Path=Text, ElementName=tb_PageName}">
- <Button.Template>
- <ControlTemplate TargetType="Button">
- <Grid>
- <Rectangle
- x:Name="BtnRetangle"
- Width="20"
- Height="20"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Fill="{StaticResource ImageBrushAddBlue}"
- Stroke="Transparent"
- StrokeThickness="1" />
- <ContentPresenter
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Content="{TemplateBinding Content}" />
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="BtnRetangle" Property="Height" Value="22" />
- <Setter TargetName="BtnRetangle" Property="Width" Value="22" />
- </Trigger>
- <DataTrigger Binding="{Binding IsChecked}" Value="true">
- <Setter TargetName="BtnRetangle" Property="Fill" Value="{StaticResource ImageBrushAddGray}" />
- <Setter Property="ToolTip" Value="已添加" />
- </DataTrigger>
- <DataTrigger Binding="{Binding IsChecked}" Value="false">
- <Setter TargetName="BtnRetangle" Property="Fill" Value="{StaticResource ImageBrushAddBlue}" />
- <Setter Property="ToolTip" Value="添加" />
- </DataTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Button.Template>
- </Button>
- </Grid>
- </DataTemplate>
- <Style TargetType="TreeViewItem">
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="IsExpanded" Value="True" />
- <Setter Property="HeaderTemplate">
- <Setter.Value>
- <HierarchicalDataTemplate ItemTemplate="{StaticResource TreeItemTemplate}" ItemsSource="{Binding TreeViewItems, Mode=TwoWay}">
- <StackPanel
- Height="28"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- Orientation="Horizontal">
- <!-- Image Source="folder.png" VerticalAlignment="Center" Height="17" Margin="10,0"/> -->
- <TextBlock
- Margin="5,0,0,0"
- VerticalAlignment="Center"
- FontSize="15"
- Foreground="White"
- Text="{Binding Name}" />
- </StackPanel>
- </HierarchicalDataTemplate>
- </Setter.Value>
- </Setter>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type TreeViewItem}">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition />
- </Grid.RowDefinitions>
- <Border
- x:Name="Bd"
- Grid.Column="0"
- Padding="{TemplateBinding Padding}"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
- <ContentPresenter
- x:Name="PART_Header"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- ContentSource="Header" />
- </Border>
- <ItemsPresenter
- x:Name="ItemsHost"
- Grid.Row="1"
- Grid.Column="0"
- Grid.ColumnSpan="2"
- Visibility="Collapsed" />
- <VisualStateManager.VisualStateGroups>
- <VisualStateGroup x:Name="SelectionStates">
- <VisualState x:Name="Selected">
- <Storyboard>
- <ColorAnimationUsingKeyFrames Storyboard.TargetName="Bd" Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)">
- <EasingColorKeyFrame KeyTime="0" Value="Transparent" />
- </ColorAnimationUsingKeyFrames>
- </Storyboard>
- </VisualState>
-
- <VisualState x:Name="Unselected" />
- <VisualState x:Name="SelectedInactive">
- <Storyboard>
- <ColorAnimationUsingKeyFrames Storyboard.TargetName="Bd" Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)">
- <EasingColorKeyFrame KeyTime="0" Value="Transparent" />
- </ColorAnimationUsingKeyFrames>
- </Storyboard>
- </VisualState>
- </VisualStateGroup>
- <VisualStateGroup x:Name="ExpansionStates">
- <VisualState x:Name="Expanded">
- <Storyboard>
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ItemsHost" Storyboard.TargetProperty="(UIElement.Visibility)">
- <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}" />
- </ObjectAnimationUsingKeyFrames>
- </Storyboard>
- </VisualState>
- <VisualState x:Name="Collapsed" />
- </VisualStateGroup>
- </VisualStateManager.VisualStateGroups>
- </Grid>
- <ControlTemplate.Triggers>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="HasHeader" Value="false" />
- <Condition Property="Width" Value="Auto" />
- </MultiTrigger.Conditions>
- <Setter TargetName="PART_Header" Property="MinWidth" Value="75" />
- </MultiTrigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="HasHeader" Value="false" />
- <Condition Property="Height" Value="Auto" />
- </MultiTrigger.Conditions>
- <Setter TargetName="PART_Header" Property="MinHeight" Value="19" />
- </MultiTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style x:Key="ItemContainer" TargetType="{x:Type ListBoxItem}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ListBoxItem}">
- <Border
- x:Name="IconBorder"
- Background="Transparent"
- BorderThickness="0"
- CornerRadius="4">
- <ContentPresenter />
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsSelected" Value="true">
- <Setter TargetName="IconBorder" Property="BitmapEffect">
- <Setter.Value>
- <OuterGlowBitmapEffect GlowColor="Transparent" GlowSize="5" />
- </Setter.Value>
- </Setter>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <!-- 切换button -->
- <Style x:Key="changebutton_local" TargetType="Button">
- <Setter Property="Height" Value="32" />
- <Setter Property="Width" Value="130" />
- <Setter Property="FontSize" Value="18" />
- <Setter Property="Foreground" Value="White" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="Button">
- <Border
- x:Name="border"
- BorderBrush="White"
- BorderThickness="0"
- SnapsToDevicePixels="True">
- <Border.Background>
- <DrawingBrush>
- <DrawingBrush.Drawing>
- <GeometryDrawing Brush="#009DFF">
- <GeometryDrawing.Pen>
- <Pen
- x:Name="pen"
- Brush="{TemplateBinding BorderBrush}"
- Thickness="3" />
- </GeometryDrawing.Pen>
- <GeometryDrawing.Geometry>
- <PathGeometry Figures="m-70 -80 L200 -80 L200 80 L70 80 L-70 80 A 10,10 0 0 1 -80,70 L-80 70 L-80 -70 A 10,10 0 0 1 -70,-80" />
- </GeometryDrawing.Geometry>
- </GeometryDrawing>
- </DrawingBrush.Drawing>
- </DrawingBrush>
- </Border.Background>
- <TextBlock
- Margin="0,5,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Top"
- Foreground="{TemplateBinding Foreground}"
- Text="{TemplateBinding Content}" />
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True" />
- <DataTrigger Binding="{Binding IsChecked}" Value="true">
- <Setter Property="Height" Value="43" />
- <Setter Property="Width" Value="133" />
- <Setter Property="Effect">
- <Setter.Value>
- <DropShadowEffect
- Direction="220"
- Opacity="1"
- ShadowDepth="15"
- Color="Black" />
- </Setter.Value>
- </Setter>
- <Setter TargetName="border" Property="Background">
- <Setter.Value>
- <DrawingBrush>
- <DrawingBrush.Drawing>
- <GeometryDrawing Brush="#009DFF">
- <GeometryDrawing.Pen>
- <Pen Brush="White" Thickness="5" />
- </GeometryDrawing.Pen>
- <GeometryDrawing.Geometry>
- <PathGeometry Figures="m-70 -80 L200 -80 L200 80 L200 80 L50 80 L60 130 L70 80 L-70 80 A 10,10 0 0 1 -80,70 L-80 70 L-80 -70 A 10,10 0 0 1 -70,-80" />
- </GeometryDrawing.Geometry>
- </GeometryDrawing>
- </DrawingBrush.Drawing>
- </DrawingBrush>
- </Setter.Value>
- </Setter>
- </DataTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
-
- <Style.Triggers />
- </Style>
-
- <Style x:Key="changebutton_device" TargetType="Button">
- <Setter Property="Height" Value="32" />
- <Setter Property="Width" Value="130" />
- <Setter Property="FontSize" Value="18" />
- <Setter Property="Foreground" Value="White" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="Button">
- <Border
- x:Name="border"
- BorderBrush="White"
- BorderThickness="0"
- SnapsToDevicePixels="True">
- <Border.Background>
- <DrawingBrush>
- <DrawingBrush.Drawing>
- <GeometryDrawing Brush="#009DFF">
- <GeometryDrawing.Pen>
- <Pen
- x:Name="pen"
- Brush="{TemplateBinding BorderBrush}"
- Thickness="3" />
- </GeometryDrawing.Pen>
- <GeometryDrawing.Geometry>
- <PathGeometry Figures="m-70 -80 L200 -80 L200 80 L70 80 L-70 80 A 10,10 0 0 1 -80,70 L-80 70 L-80 -70 A 10,10 0 0 1 -70,-80" />
- </GeometryDrawing.Geometry>
- </GeometryDrawing>
- </DrawingBrush.Drawing>
- </DrawingBrush>
- </Border.Background>
- <TextBlock
- Margin="0,5,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Top"
- Foreground="{TemplateBinding Foreground}"
- Text="{TemplateBinding Content}" />
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True" />
- <DataTrigger Binding="{Binding IsChecked}" Value="false">
- <Setter Property="Height" Value="43" />
- <Setter Property="Width" Value="133" />
- <Setter Property="Effect">
- <Setter.Value>
- <DropShadowEffect
- Direction="220"
- Opacity="1"
- ShadowDepth="15"
- Color="Black" />
- </Setter.Value>
- </Setter>
- <Setter TargetName="border" Property="Background">
- <Setter.Value>
- <DrawingBrush>
- <DrawingBrush.Drawing>
- <GeometryDrawing Brush="#009DFF">
- <GeometryDrawing.Pen>
- <Pen Brush="White" Thickness="5" />
- </GeometryDrawing.Pen>
- <GeometryDrawing.Geometry>
- <PathGeometry Figures="m-70 -80 L200 -80 L200 80 L200 80 L50 80 L60 130 L70 80 L-70 80 A 10,10 0 0 1 -80,70 L-80 70 L-80 -70 A 10,10 0 0 1 -70,-80" />
- </GeometryDrawing.Geometry>
- </GeometryDrawing>
- </DrawingBrush.Drawing>
- </DrawingBrush>
- </Setter.Value>
- </Setter>
- </DataTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
-
- </Style>
-
- <Style x:Key="closeBtn" TargetType="Button">
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="Button">
- <Grid Name="gr">
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontFamily="../../Fonts/#iconfont"
- FontSize="30"
- Foreground="White"
- Text="" />
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="gr" Property="Background" Value="#22009DFF" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style x:Key="btn" TargetType="Button">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="Button">
- <Border
- Name="gr"
- Background="{TemplateBinding Background}"
- CornerRadius="5"
- Opacity="0.8">
- <ContentPresenter
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- Content="{TemplateBinding Content}" />
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="gr" Property="Opacity" Value="1" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- </Window.Resources>
- <Border
- x:Name="br"
- Background="Transparent"
- BorderBrush="#064d87"
- BorderThickness="2">
- <Border.Effect>
- <DropShadowEffect
- BlurRadius="10"
- ShadowDepth="1"
- Color="#009DFF" />
- </Border.Effect>
- <Grid Background="#061c43">
- <!--<Image Source="../../Image/权限背景.png" Stretch="Fill" />-->
- <Grid Background="Transparent">
- <Grid.RowDefinitions>
- <RowDefinition Height="40" />
- <RowDefinition Height="20" />
- <RowDefinition />
- <RowDefinition Height="60" />
- <!--<RowDefinition Height="13*" />
- <RowDefinition Height="50" />
- <RowDefinition Height="5" />-->
- </Grid.RowDefinitions>
-
- <Border BorderBrush="#064d87" BorderThickness="0,0,0,2">
- <Border.Background>
- <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
- <GradientStop Color="#064d87" />
- <GradientStop Offset="1" Color="#99064d87" />
- </LinearGradientBrush>
- </Border.Background>
- </Border>
-
- <Button
- Width="40"
- HorizontalAlignment="Right"
- HorizontalContentAlignment="Center"
- VerticalContentAlignment="Center"
- Command="{Binding CancelCommand}"
- Style="{StaticResource closeBtn}" />
-
- <!--<TextBlock
- Margin="0,0,10,0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontFamily="../../Fonts/#iconfont"
- FontSize="30"
- Foreground="White"
- Text="" />-->
-
- <StackPanel
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Orientation="Horizontal">
- <TextBlock
- HorizontalAlignment="Center"
- FontSize="24"
- Foreground="#ddd"
- Text="{Binding UserName}" />
- <TextBlock
- Margin="10,0,0,0"
- HorizontalAlignment="Center"
- FontSize="24"
- Foreground="#ddd"
- Text="权限分配" />
- </StackPanel>
-
-
- <!--<TextBlock
- Grid.Row="1"
- Margin="10,0,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Top"
- FontSize="20"
- Foreground="#ddd"
- Text="页面权限分配" />-->
- <!--<TextBlock
- Grid.Row="3"
- Margin="10,0,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="20"
- Foreground="#ddd"
- Text="配料权限分配" />-->
-
- <Grid Grid.Row="2">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="50" />
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="120" />
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="50" />
- </Grid.ColumnDefinitions>
- <TextBlock
- Grid.Column="0"
- Width="20"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="20"
- Foreground="#ddd"
- Text="权限列表"
- TextWrapping="Wrap" />
- <TextBlock
- Grid.Column="4"
- Width="20"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="20"
- Foreground="#ddd"
- Text="当前用户权限"
- TextWrapping="Wrap" />
- <!--#region 页面权限-->
- <Border
- Grid.Column="1"
- BorderBrush="#1874CD"
- BorderThickness="1" />
- <Border
- Grid.Column="3"
- BorderBrush="#1874CD"
- BorderThickness="1" />
- <ScrollViewer
- Grid.Column="1"
- Margin="20,5,5,5"
- CanContentScroll="True"
- Template="{StaticResource ScrollViewerControlTemplate1}">
- <TreeView
- x:Name="MyTreeView"
- HorizontalAlignment="Stretch"
- Background="Transparent"
- BorderBrush="Transparent"
- ItemsSource="{Binding pageTreeViewModels}"
- ScrollViewer.VerticalScrollBarVisibility="Disabled" />
- </ScrollViewer>
- <ScrollViewer
- Grid.Column="3"
- Margin="10,0,10,0"
- CanContentScroll="True"
- Template="{StaticResource ScrollViewerControlTemplate1}">
- <ListBox
- x:Name="RightListBox"
- Grid.Column="3"
- Background="Transparent"
- FocusVisualStyle="{x:Null}"
- ItemContainerStyle="{StaticResource ItemContainer}"
- ItemsSource="{Binding SelectePage}">
- <ListBox.Template>
- <ControlTemplate>
- <StackPanel Background="Transparent" IsItemsHost="True" />
- </ControlTemplate>
- </ListBox.Template>
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Grid Height="28" Margin="10">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="60" />
- </Grid.ColumnDefinitions>
- <TextBlock
- x:Name="tb_Name"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="15"
- Foreground="White"
- Text="{Binding Name}" />
- <Button
- x:Name="BtnDelete"
- Grid.Column="1"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- Background="Transparent"
- Command="{Binding DataContext.DeleteUserPageCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}}"
- CommandParameter="{Binding Path=Text, ElementName=tb_Name}"
- ToolTip="移除">
- <Button.Template>
- <ControlTemplate TargetType="Button">
- <Grid>
- <Rectangle
- x:Name="BtnRetangle"
- Width="17"
- Height="17"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- Stroke="Transparent"
- StrokeThickness="1">
- <Rectangle.Fill>
- <ImageBrush ImageSource="../../Image/按钮/Delete.png" />
- </Rectangle.Fill>
- </Rectangle>
- <ContentPresenter
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Content="{TemplateBinding Content}" />
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="BtnRetangle" Property="Height" Value="19" />
- <Setter TargetName="BtnRetangle" Property="Width" Value="19" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Button.Template>
- </Button>
- </Grid>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </ScrollViewer>
- <StackPanel
- Grid.Column="2"
- HorizontalAlignment="Center"
- VerticalAlignment="Center">
- <Button
- Width="100"
- Height="40"
- Margin="10,20"
- Background="#064d87"
- Command="{Binding AddAllCommand}"
- CommandParameter="page"
- Content="全部添加"
- FontSize="16"
- Foreground="White"
- Style="{StaticResource btn}" />
- <Button
- Width="100"
- Height="40"
- Margin="10,20"
- Background="#064d87"
- Command="{Binding DeleteAllCommand}"
- CommandParameter="page"
- Content="全部移除"
- FontSize="16"
- Foreground="White"
- Style="{StaticResource btn}" />
- </StackPanel>
-
- <!--#endregion-->
- </Grid>
-
- <Grid Grid.Row="4" Visibility="Collapsed">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="50" />
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="100" />
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="50" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="60" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <TextBlock
- Grid.Row="1"
- Width="20"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="20"
- Foreground="#ddd"
- Text="权限列表"
- TextWrapping="Wrap" />
- <TextBlock
- Grid.Row="1"
- Grid.Column="4"
- Width="20"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="20"
- Foreground="#ddd"
- Text="当前用户权限"
- TextWrapping="Wrap" />
-
- <Button
- Grid.Column="1"
- HorizontalAlignment="Right"
- Command="{Binding ChangeMaterailPageCommand}"
- CommandParameter="Local"
- Content="本地原料"
- Style="{DynamicResource changebutton_local}" />
- <Button
- Grid.Column="3"
- HorizontalAlignment="Left"
- Command="{Binding ChangeMaterailPageCommand}"
- CommandParameter="Device"
- Content="设备原料"
- Style="{DynamicResource changebutton_device}" />
- <!--#region 本地原料权限-->
- <Border
- Grid.Row="1"
- Grid.Column="1"
- Grid.ColumnSpan="3"
- BorderBrush="#1874CD"
- BorderThickness="1"
- Visibility="{Binding VisibilityLocal}">
- <Grid Margin="5">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="100" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
-
- <Border
- Grid.Column="0"
- BorderBrush="#1874CD"
- BorderThickness="1" />
- <Border
- Grid.Column="2"
- BorderBrush="#1874CD"
- BorderThickness="1" />
- <ScrollViewer
- Width="230"
- Margin="20,5,5,5"
- HorizontalAlignment="Right"
- CanContentScroll="True"
- Template="{StaticResource ScrollViewerControlTemplate1}">
- <ListBox
- Background="Transparent"
- FocusVisualStyle="{x:Null}"
- ItemContainerStyle="{StaticResource ItemContainer}"
- ItemsSource="{Binding LoaclMaterails}">
- <ListBox.Template>
- <ControlTemplate>
- <StackPanel Background="Transparent" IsItemsHost="True" />
- </ControlTemplate>
- </ListBox.Template>
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Grid Height="28" Margin="5">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="60" />
- </Grid.ColumnDefinitions>
- <TextBlock
- x:Name="tb_Name"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="15"
- Foreground="White"
- Text="{Binding RawMaterialName}" />
- <Button
- x:Name="BtnDelete"
- Grid.Column="1"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- Background="Transparent"
- Command="{Binding DataContext.AddLoaclMaterialCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}}"
- CommandParameter="{Binding Path=Text, ElementName=tb_Name}"
- ToolTip="移除">
- <Button.Template>
- <ControlTemplate TargetType="Button">
- <Grid>
- <Rectangle
- x:Name="BtnRetangle"
- Width="17"
- Height="17"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- Stroke="Transparent"
- StrokeThickness="1">
- <Rectangle.Fill>
- <ImageBrush ImageSource="../../Image/按钮/AddGreen.png" />
- </Rectangle.Fill>
- </Rectangle>
- <ContentPresenter
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Content="{TemplateBinding Content}" />
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="BtnRetangle" Property="Height" Value="19" />
- <Setter TargetName="BtnRetangle" Property="Width" Value="19" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Button.Template>
- </Button>
- </Grid>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </ScrollViewer>
-
-
- <ScrollViewer
- Grid.Column="2"
- Margin="10,0,10,0"
- CanContentScroll="True"
- Template="{StaticResource ScrollViewerControlTemplate1}">
- <ListBox
- Width="230"
- Background="Transparent"
- FocusVisualStyle="{x:Null}"
- ItemContainerStyle="{StaticResource ItemContainer}"
- ItemsSource="{Binding UserLoaclMaterails}">
- <ListBox.Template>
- <ControlTemplate>
- <StackPanel Background="Transparent" IsItemsHost="True" />
- </ControlTemplate>
- </ListBox.Template>
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Grid Height="28" Margin="5">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="60" />
- </Grid.ColumnDefinitions>
- <TextBlock
- x:Name="tb_Name"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="15"
- Foreground="White"
- Text="{Binding RawMaterialName}" />
- <Button
- x:Name="BtnDelete"
- Grid.Column="1"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- Background="Transparent"
- Command="{Binding DataContext.DeleteLoaclMaterialCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}}"
- CommandParameter="{Binding Path=Text, ElementName=tb_Name}"
- ToolTip="移除">
- <Button.Template>
- <ControlTemplate TargetType="Button">
- <Grid>
- <Rectangle
- x:Name="BtnRetangle"
- Width="17"
- Height="17"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- Stroke="Transparent"
- StrokeThickness="1">
- <Rectangle.Fill>
- <ImageBrush ImageSource="../../Image/按钮/Delete.png" />
- </Rectangle.Fill>
- </Rectangle>
- <ContentPresenter
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Content="{TemplateBinding Content}" />
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="BtnRetangle" Property="Height" Value="19" />
- <Setter TargetName="BtnRetangle" Property="Width" Value="19" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Button.Template>
- </Button>
- </Grid>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </ScrollViewer>
- <StackPanel
- Grid.Column="1"
- HorizontalAlignment="Center"
- VerticalAlignment="Center">
- <Button
- Width="70"
- Height="50"
- Margin="10,20"
- Background="#009DFF"
- Command="{Binding AddAllCommand}"
- CommandParameter="local"
- FontSize="16"
- Foreground="White">
- <TextBlock Text="全部 添加" TextWrapping="Wrap" />
- </Button>
- <Button
- Width="70"
- Height="50"
- Margin="10,20"
- Background="#009DFF"
- Command="{Binding DeleteAllCommand}"
- CommandParameter="local"
- FontSize="16"
- Foreground="White">
- <TextBlock Text="全部 移除" TextWrapping="Wrap" />
- </Button>
- </StackPanel>
-
-
-
- </Grid>
- </Border>
- <!--#endregion-->
-
- <!--#region 设备原料权限-->
- <Border
- Grid.Row="1"
- Grid.Column="1"
- Grid.ColumnSpan="3"
- BorderBrush="#1874CD"
- BorderThickness="1"
- Visibility="{Binding VisibilityDevice}">
- <Grid Margin="5">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="100" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
-
- <Border
- Grid.Column="0"
- BorderBrush="#1874CD"
- BorderThickness="1" />
- <Border
- Grid.Column="2"
- BorderBrush="#1874CD"
- BorderThickness="1" />
- <ScrollViewer
- Width="230"
- Margin="20,5,5,5"
- HorizontalAlignment="Right"
- CanContentScroll="True"
- Template="{StaticResource ScrollViewerControlTemplate1}">
- <ListBox
- Background="Transparent"
- FocusVisualStyle="{x:Null}"
- ItemContainerStyle="{StaticResource ItemContainer}"
- ItemsSource="{Binding DeviceMaterails}">
- <ListBox.Template>
- <ControlTemplate>
- <StackPanel Background="Transparent" IsItemsHost="True" />
- </ControlTemplate>
- </ListBox.Template>
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Grid Height="28" Margin="5">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="60" />
- </Grid.ColumnDefinitions>
- <TextBlock
- x:Name="tb_Name"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="15"
- Foreground="White"
- Text="{Binding RawMaterialName}" />
- <Button
- x:Name="BtnDelete"
- Grid.Column="1"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- Background="Transparent"
- Command="{Binding DataContext.AddDeviceMaterialCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}}"
- CommandParameter="{Binding Path=Text, ElementName=tb_Name}"
- ToolTip="移除">
- <Button.Template>
- <ControlTemplate TargetType="Button">
- <Grid>
- <Rectangle
- x:Name="BtnRetangle"
- Width="17"
- Height="17"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- Stroke="Transparent"
- StrokeThickness="1">
- <Rectangle.Fill>
- <ImageBrush ImageSource="../../Image/按钮/AddGreen.png" />
- </Rectangle.Fill>
- </Rectangle>
- <ContentPresenter
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Content="{TemplateBinding Content}" />
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="BtnRetangle" Property="Height" Value="19" />
- <Setter TargetName="BtnRetangle" Property="Width" Value="19" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Button.Template>
- </Button>
- </Grid>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </ScrollViewer>
-
-
- <ScrollViewer
- Grid.Column="2"
- Margin="10,0,10,0"
- CanContentScroll="True"
- Template="{StaticResource ScrollViewerControlTemplate1}">
- <ListBox
- Width="230"
- Background="Transparent"
- FocusVisualStyle="{x:Null}"
- ItemContainerStyle="{StaticResource ItemContainer}"
- ItemsSource="{Binding UserDeviceMaterails}">
- <ListBox.Template>
- <ControlTemplate>
- <StackPanel Background="Transparent" IsItemsHost="True" />
- </ControlTemplate>
- </ListBox.Template>
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Grid Height="28" Margin="5">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="60" />
- </Grid.ColumnDefinitions>
- <TextBlock
- x:Name="tb_Name"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="15"
- Foreground="White"
- Text="{Binding RawMaterialName}" />
- <Button
- x:Name="BtnDelete"
- Grid.Column="1"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- Background="Transparent"
- Command="{Binding DataContext.DeleteDeviceMaterialCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}}"
- CommandParameter="{Binding Path=Text, ElementName=tb_Name}"
- ToolTip="移除">
- <Button.Template>
- <ControlTemplate TargetType="Button">
- <Grid>
- <Rectangle
- x:Name="BtnRetangle"
- Width="17"
- Height="17"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- Stroke="Transparent"
- StrokeThickness="1">
- <Rectangle.Fill>
- <ImageBrush ImageSource="../../Image/按钮/Delete.png" />
- </Rectangle.Fill>
- </Rectangle>
- <ContentPresenter
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Content="{TemplateBinding Content}" />
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="BtnRetangle" Property="Height" Value="19" />
- <Setter TargetName="BtnRetangle" Property="Width" Value="19" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Button.Template>
- </Button>
- </Grid>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </ScrollViewer>
- <StackPanel
- Grid.Column="1"
- HorizontalAlignment="Center"
- VerticalAlignment="Center">
- <Button
- Width="70"
- Height="50"
- Margin="10,20"
- Background="#009DFF"
- Command="{Binding AddAllCommand}"
- CommandParameter="device"
- FontSize="16"
- Foreground="White">
- <TextBlock Text="全部 添加" TextWrapping="Wrap" />
- </Button>
- <Button
- Width="70"
- Height="50"
- Margin="10,20"
- Background="#009DFF"
- Command="{Binding DeleteAllCommand}"
- CommandParameter="device"
- FontSize="16"
- Foreground="White">
- <TextBlock Text="全部 移除" TextWrapping="Wrap" />
- </Button>
- </StackPanel>
-
-
-
- </Grid>
- </Border>
- <!--#endregion-->
- </Grid>
- <Border
- Grid.Row="3"
- Margin="0,5,0,0"
- BorderBrush="#064d87"
- BorderThickness="0,1,0,0">
- <StackPanel
- Margin="0,0,50,0"
- HorizontalAlignment="Right"
- Orientation="Horizontal">
- <Button
- Width="120"
- Height="40"
- Margin="0,0,50,0"
- HorizontalAlignment="Right"
- Background="#064d87"
- BorderThickness="0"
- Command="{Binding SaveCommand}"
- Content="保存"
- FontSize="20"
- Foreground="White"
- Style="{StaticResource btn}"
- TabIndex="3" />
- <Button
- Grid.Column="1"
- Width="120"
- Height="40"
- HorizontalAlignment="Left"
- Background="#064d87"
- BorderThickness="0"
- Command="{Binding CancelCommand}"
- Content="取消"
- FontSize="20"
- Foreground="White"
- Style="{StaticResource btn}"
- TabIndex="3" />
- </StackPanel>
- </Border>
- </Grid>
-
- </Grid>
- </Border>
- </Window>
|