| | |
| | | xmlns:pw="https://opensource.panuon.com/wpf" |
| | | xmlns:pu="https://opensource.panuon.com/wpf-ui" |
| | | xmlns:uic="clr-namespace:HMI.UI.Converter;assembly=HMI.UI" |
| | | xmlns:dp="clr-namespace:HMI.UI.DpUtil;assembly=HMI.UI" |
| | | mc:Ignorable="d" |
| | | Title="Form" |
| | | SizeToContent="Height" |
| | | Width="600" |
| | | WindowStartupLocation="CenterOwner" |
| | | BorderBrush="#3E3E45" |
| | | BorderThickness="1" |
| | | Foreground="Black" |
| | | pu:WindowXCaption.Background="{StaticResource MainBorder}" |
| | | pu:WindowXModalDialog.ButtonStyle="{StaticResource ModalButton}" |
| | | pu:WindowXCaption.Foreground="#FFF" |
| | | pu:WindowXCaption.Buttons="Close" |
| | | pu:WindowXModalDialog.Buttons="OKCancel" |
| | | pu:WindowXModalDialog.CancelButtonContent="取消" |
| | | pu:WindowXModalDialog.OKButtonContent="保存" |
| | | pu:WindowXModalDialog.ButtonPanelMargin="0,30,10,10"> |
| | | <Window.Resources> |
| | | <ResourceDictionary> |
| | | <ResourceDictionary.MergedDictionaries> |
| | | <pu:StyleDictionary Includes="TreeView" /> |
| | | <ResourceDictionary Source="/HMI.UI;component/Style/PanuonResource.xaml"/> |
| | | <ResourceDictionary Source="/HMI.UI;component/Resources/Font/Font.xaml"/> |
| | | <ResourceDictionary Source="/HMI.UI;component/Style/Colors.xaml"/> |
| | | </ResourceDictionary.MergedDictionaries> |
| | | <uic:PathImageConverter x:Key="path2Image"/> |
| | | <uic:DataGridRowNumberConverter x:Key="rowNumber"/> |
| | | </ResourceDictionary> |
| | | </Window.Resources> |
| | | |
| | | Style="{StaticResource ModalWindow}"> |
| | | <Grid Margin="10"> |
| | | <StackPanel> |
| | | <pu:FormGroup x:Name="FgName" Style="{StaticResource RequiredInputFormGroupStyle}" |
| | | Header="用户名称" GroupName="MyFormGroup"> |
| | | <StackPanel x:Name="formPanel"> |
| | | <pu:FormGroup x:Name="FgCode" Style="{StaticResource InputFormGroupStyle}" |
| | | dp:FormGroupHelper.ValidateMethod="ValidateCode" |
| | | Header="{DynamicResource HMI.User.Code}" |
| | | dp:FormGroupHelper.IsRequired="True" GroupName="MyFormGroup"> |
| | | <TextBox x:Name="TbCode" Style="{StaticResource EditorTextBoxStyle}" /> |
| | | </pu:FormGroup> |
| | | |
| | | <pu:FormGroup x:Name="FgName" Style="{StaticResource InputFormGroupStyle}" |
| | | Header="{DynamicResource HMI.User.RealName}" |
| | | dp:FormGroupHelper.IsRequired="True" GroupName="MyFormGroup"> |
| | | <TextBox x:Name="TbName" Style="{StaticResource EditorTextBoxStyle}" /> |
| | | </pu:FormGroup> |
| | | |
| | | <pu:FormGroup x:Name="FgUsername" Style="{StaticResource RequiredInputFormGroupStyle}" |
| | | Header="账号" GroupName="MyFormGroup"> |
| | | <pu:FormGroup x:Name="FgUsername" Style="{StaticResource InputFormGroupStyle}" |
| | | dp:FormGroupHelper.ValidateMethod="ValidateUsername" |
| | | Header="{DynamicResource HMI.User.Account}" |
| | | dp:FormGroupHelper.IsRequired="True" GroupName="MyFormGroup"> |
| | | <TextBox x:Name="TbUsername" Style="{StaticResource EditorTextBoxStyle}" /> |
| | | </pu:FormGroup> |
| | | |
| | | <pu:FormGroup x:Name="FgPassword" Style="{StaticResource RequiredInputFormGroupStyle}" |
| | | Header="密码" GroupName="MyFormGroup"> |
| | | <TextBox x:Name="TbPassword" Style="{StaticResource EditorTextBoxStyle}" /> |
| | | <pu:FormGroup x:Name="FgPassword" Style="{StaticResource InputFormGroupStyle}" |
| | | Header="{DynamicResource HMI.User.Password}" |
| | | dp:FormGroupHelper.IsRequired="True" GroupName="MyFormGroup"> |
| | | <PasswordBox x:Name="TbPassword" pu:PasswordBoxHelper.PlainButtonVisibility="VisibleOnHover" |
| | | Style="{StaticResource SignInPasswordBoxStyle}" /> |
| | | </pu:FormGroup> |
| | | |
| | | <pu:FormGroup x:Name="FgRoleCode" Orientation="Vertical" |
| | | Style="{StaticResource RequiredInputFormGroupStyle}" Header="角色" GroupName="MyFormGroup"> |
| | | Style="{StaticResource InputFormGroupStyle}" |
| | | Header="{DynamicResource HMI.Role}" GroupName="MyFormGroup"> |
| | | <DataGrid x:Name="table" Style="{StaticResource DefaultDataGrid}" SelectionMode="Single" |
| | | ItemsSource="{Binding Roles}"> |
| | | <DataGrid.Columns> |
| | | <DataGridTemplateColumn Header="授予" Width="Auto" CanUserResize="False"> |
| | | <DataGridTemplateColumn Width="Auto" CanUserResize="False"> |
| | | <DataGridTemplateColumn.Header> |
| | | <TextBlock Text="{DynamicResource App.Granted}"/> |
| | | </DataGridTemplateColumn.Header> |
| | | <DataGridTemplateColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <CheckBox VerticalAlignment="Center" |
| | |
| | | Binding="{Binding Converter={StaticResource rowNumber}, |
| | | RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGridRow},AncestorLevel=1}}" |
| | | CanUserResize="False"/> |
| | | <DataGridTextColumn Width="*" Binding="{Binding RoleCode}" Header="角色编号" /> |
| | | <DataGridTextColumn Width="*" Binding="{Binding RoleName}" Header="角色名称" /> |
| | | <DataGridTextColumn Width="*" Binding="{Binding RoleCode}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource HMI.Role.Code}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | <DataGridTextColumn Width="*" Binding="{Binding RoleName}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource HMI.Role.Name}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | </DataGrid.Columns> |
| | | </DataGrid> |
| | | </pu:FormGroup> |