| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- <Window x:Class="CCDCountWpf.WpfFrom.ChangeUserWindow"
- 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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:local="clr-namespace:CCDCountWpf.WpfFrom"
- mc:Ignorable="d"
- Title="ChangeUserWindow" Height="430" Width="450" ResizeMode="NoResize"
- WindowStartupLocation="CenterScreen" Icon="/FromImage/mmexport1752891278116.jpg" Loaded="Window_Loaded">
- <Grid Background="#FF2C3E50">
- <Grid Height="60" VerticalAlignment="Top" Background="#FF2980B9">
- <Label Content="{DynamicResource EditUser}" Margin="0,15,0,0" FontWeight="Bold" FontSize="20" VerticalAlignment="Top" HorizontalAlignment="Center" Grid.Column="1" Foreground="White"/>
- </Grid>
- <StackPanel Orientation="Horizontal" Margin="0,60,0,0" HorizontalAlignment="Center">
- <StackPanel HorizontalAlignment="Left" Margin="0,0,0,0">
- <Label Content="ID:" HorizontalAlignment="Left" Margin="0,10,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="20" Foreground="White"/>
- <Label Content="{DynamicResource Username}" HorizontalAlignment="Left" Margin="0,7,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="20" Foreground="White"/>
- <Label Content="{DynamicResource PreviousPassword}" HorizontalAlignment="Left" Margin="0,7,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="20" Foreground="White"/>
- <Label Content="{DynamicResource NewPassword}" HorizontalAlignment="Left" Margin="0,7,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="20" Foreground="White"/>
- <Label Content="{DynamicResource RetypeNewPassword}" HorizontalAlignment="Left" Margin="0,7,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="20" Foreground="White"/>
- <Label Content="{DynamicResource Permission}" HorizontalAlignment="Left" Margin="0,7,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="20" Foreground="White"/>
- </StackPanel>
- <StackPanel HorizontalAlignment="Left" Margin="10,0,0,0">
- <TextBox x:Name="UserIDTbx" HorizontalAlignment="Left" Margin="0,15,0,0" Width="120" FontWeight="Bold" FontSize="20" Background="{x:Null}" IsReadOnly="True" Foreground="White"/>
- <TextBox x:Name="UserNameTbx" HorizontalAlignment="Left" Margin="0,15,0,0" Width="120" FontWeight="Bold" FontSize="20" Background="{x:Null}" IsReadOnly="False" Foreground="White"/>
- <PasswordBox x:Name="UserOldPassTbx" HorizontalAlignment="Left" Margin="0,15,0,0" VerticalAlignment="Top" Width="120" FontWeight="Bold" FontSize="20" Background="{x:Null}" Foreground="White" />
- <PasswordBox x:Name="UserNewPassTbx" HorizontalAlignment="Left" Margin="0,15,0,0" VerticalAlignment="Top" Width="120" FontWeight="Bold" FontSize="20" Background="{x:Null}" Foreground="White" />
- <PasswordBox x:Name="UserReNewPassTbx" HorizontalAlignment="Left" Margin="0,15,0,0" VerticalAlignment="Top" Width="120" FontWeight="Bold" FontSize="20" Background="{x:Null}" Foreground="White" />
- <ComboBox x:Name="UserLevelCbx" HorizontalAlignment="Left" Margin="0,12,0,0" VerticalAlignment="Top" Width="120" FontWeight="Bold" FontSize="20" Background="{x:Null}" IsReadOnly="True">
- <ComboBox.Template>
- <ControlTemplate TargetType="ComboBox">
- <Grid>
- <ToggleButton
- Foreground="White"
- IsChecked="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}"
- ClickMode="Press">
- <ToggleButton.Template>
- <ControlTemplate TargetType="ToggleButton">
- <Border x:Name="Border" Background="#FF2C3E50" BorderBrush="#FFABADB3" BorderThickness="1">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition Width="20" />
- </Grid.ColumnDefinitions>
- <ContentPresenter Grid.Column="0" Margin="3" />
- <Path x:Name="Arrow" Grid.Column="1"
- Fill="White"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Data="M 0 0 L 4 4 L 8 0 Z" />
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="Border" Property="Background" Value="LightBlue" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </ToggleButton.Template>
- </ToggleButton>
- <ContentPresenter x:Name="ContentSite"
- IsHitTestVisible="False"
- Content="{TemplateBinding SelectionBoxItem}"
- ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
- Margin="3,3,23,3"
- VerticalAlignment="Center"
- HorizontalAlignment="Left"
- TextBlock.Foreground="White"/>
- <Popup x:Name="Popup"
- Placement="Bottom"
- IsOpen="{TemplateBinding IsDropDownOpen}"
- AllowsTransparency="True"
- Focusable="False"
- PopupAnimation="Slide">
- <Border x:Name="DropDownBorder"
- Background="#FF2C3E50"
- BorderBrush="#FF2C3E50"
- BorderThickness="1">
- <ScrollViewer Margin="0,3,0,3"
- SnapsToDevicePixels="True">
- <ItemsPresenter KeyboardNavigation.DirectionalNavigation="Contained" />
- </ScrollViewer>
- </Border>
- </Popup>
- </Grid>
- </ControlTemplate>
- </ComboBox.Template>
- <ComboBox.ItemContainerStyle>
- <Style TargetType="ComboBoxItem">
- <Setter Property="Background" Value="#FF2C3E50" />
- <Setter Property="Foreground" Value="White" />
- <Style.Triggers>
- <Trigger Property="IsHighlighted" Value="True">
- <Setter Property="Background" Value="LightBlue" />
- </Trigger>
- </Style.Triggers>
- </Style>
- </ComboBox.ItemContainerStyle>
- </ComboBox>
- </StackPanel>
- </StackPanel>
- <StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0,0,0,10">
- <Button x:Name="UserChangeBtn" Content="{DynamicResource Edit}" BorderThickness="1" HorizontalAlignment="Center" Margin="0,10,10,0" VerticalAlignment="Center" Width="80" Height="40" Background="#FF2980B9" FontWeight="Bold" FontSize="20" Foreground="White" Click="UserChangeBtn_Click" Cursor="Hand">
- <Button.Template>
- <ControlTemplate TargetType="Button">
- <Border CornerRadius="5"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
- <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- <Button x:Name="UserResetPassBtn" Content="{DynamicResource PasswordReset}" BorderThickness="1" Margin="5,10,5,0" VerticalAlignment="Center" Height="40" Background="#FF2980B9" FontWeight="Bold" FontSize="20" Foreground="White" Click="UserResetPassBtn_Click" Cursor="Hand" Padding="1,1,1,1" Grid.IsSharedSizeScope="True" HorizontalAlignment="Center" MinWidth="120">
- <Button.Template>
- <ControlTemplate TargetType="Button">
- <Border CornerRadius="5"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
- <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- <Button x:Name="UserCancelBtn" Content="{DynamicResource Cancel}" BorderThickness="1" HorizontalAlignment="Center" Margin="10,10,0,0" VerticalAlignment="Center" Width="80" Height="40" Background="#FF2980B9" FontWeight="Bold" FontSize="20" Foreground="White" Click="UserCancelBtn_Click" Cursor="Hand">
- <Button.Template>
- <ControlTemplate TargetType="Button">
- <Border CornerRadius="5"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
- <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- </StackPanel>
- </Grid>
- </Window>
|