AccountManagerView.xaml 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <UserControl x:Class="MECF.Framework.UI.Core.Accounts.AccountManagerView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. mc:Ignorable="d"
  7. d:DesignHeight="770" d:DesignWidth="1200" >
  8. <DockPanel>
  9. <Border BorderThickness="1" BorderBrush="Black" DockPanel.Dock="Right" Width="300">
  10. <StackPanel >
  11. <Label Content="{DynamicResource GlobalLableAccountViewAccountManagement}" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" FontSize="25" BorderBrush="Black" BorderThickness="1" Height="60"/>
  12. <WrapPanel Margin="15">
  13. <!--Button Content="菜单权限" Margin="15" Height="25" Name="btnPermission" FontSize="15" Click="btnPermission_Click" /-->
  14. <Button Content="{DynamicResource GlobalLableAccountViewButtonAdd}" Margin="15" Height="25" Name="btnCreateAccount" FontSize="15" Click="button_CreateAccount_Click"/>
  15. <Button Content="{DynamicResource GlobalLableAccountViewButtonProperty}" Margin="15" Height="25" Name="btnUserProperty" FontSize="15" Click="btnUserProperty_Click" IsEnabled="{Binding ElementName=dataGrid1,Path=SelectedItems.Count}" />
  16. <Button Content="{DynamicResource GlobalLableAccountViewButtonPassword}" Margin="15" Height="25" Name="btnUserPwd" Click="btnUserPwd_Click" FontSize="15" IsEnabled="{Binding ElementName=dataGrid1,Path=SelectedItems.Count}" />
  17. <Button Content="{DynamicResource GlobalLableAccountViewButtonRole}" Margin="15" Height="25" Name="btnRoleEdit" Click="btnRoleEdit_Click" FontSize="15" />
  18. <Button Content="{DynamicResource GlobalLableAccountViewButtonDelete}" Margin="15" Height="25" Name="btnDeleteAccount" Click="btnDeleteAccount_Click" FontSize="15" IsEnabled="{Binding ElementName=dataGrid1,Path=SelectedItems.Count}" />
  19. <Button Content="{DynamicResource GlobalLableAccountViewButtonInformation}" Margin="15" FontSize="15" Height="25" Name="button_MyAccount" Click="button_MyAccount_Click" />
  20. <!--Button Content="在线用户" Margin="15" FontSize="15" Height="25" Name="btnShowOnline" Click="btnShowOnline_Click" Visibility="Hidden"/-->
  21. </WrapPanel>
  22. <StackPanel Margin="30,0">
  23. <CheckBox Content="{DynamicResource GlobalLableAccountViewOnlyDisplay}" Height="23" Margin="0,16,29,0" Name="checkBoxToggleAvailable" FontSize="15" Click="checkBoxToggleAvailable_Click" />
  24. <TextBlock Text="{DynamicResource GlobalLableAccountViewTotalAccountNum}" Height="28" FontSize="15"/>
  25. <TextBlock Text="{Binding TotalAccountNum, Mode=OneWay }" Height="28" Name="label2" FontSize="15"/>
  26. <TextBlock Text="{DynamicResource GlobalLableAccountViewEnabledAccountNum}" Height="28" FontSize="15"/>
  27. <TextBlock Text="{Binding EnabledAccountNum, Mode=OneWay }" Height="28" Name="label4" FontSize="15"/>
  28. </StackPanel>
  29. </StackPanel>
  30. </Border>
  31. <DataGrid AutoGenerateColumns="False" Margin="5" Name="dataGrid1" ItemsSource="{Binding AccountList,Mode=OneWay}" CanUserDeleteRows="True" CanUserAddRows="True" RowHeight="25" SelectionMode="Single" FontSize="15" MinColumnWidth="25" BorderBrush="Black" BorderThickness="1">
  32. <DataGrid.Columns>
  33. <DataGridTextColumn Binding="{Binding No,Mode=OneWay}" CanUserReorder="False" CanUserSort="True" Header="No." IsReadOnly="True" Width="50" >
  34. <DataGridTextColumn.HeaderTemplate >
  35. <DataTemplate>
  36. <TextBlock Text="{DynamicResource GlobalLableAccountViewNo}" />
  37. </DataTemplate>
  38. </DataGridTextColumn.HeaderTemplate>
  39. </DataGridTextColumn>
  40. <DataGridTextColumn Binding="{Binding AccountId,Mode=OneWay}" CanUserReorder="False" CanUserSort="True" Header="Login Name" IsReadOnly="True" Width="110" >
  41. <DataGridTextColumn.HeaderTemplate >
  42. <DataTemplate>
  43. <TextBlock Text="{DynamicResource GlobalLableAccountViewLoginName}" />
  44. </DataTemplate>
  45. </DataGridTextColumn.HeaderTemplate>
  46. </DataGridTextColumn>
  47. <DataGridTemplateColumn Header="Enabled" Width="70" CanUserSort="True" SortMemberPath="IsEnabled">
  48. <DataGridTemplateColumn.CellTemplate>
  49. <DataTemplate>
  50. <CheckBox IsEnabled="True" IsChecked="{Binding IsEnabled, Mode=OneWay}" Focusable="False" ClickMode="Release" IsHitTestVisible="False" IsTabStop="False" />
  51. </DataTemplate>
  52. </DataGridTemplateColumn.CellTemplate>
  53. <DataGridTemplateColumn.HeaderTemplate >
  54. <DataTemplate>
  55. <TextBlock Text="{DynamicResource GlobalLableAccountViewEnabled}" />
  56. </DataTemplate>
  57. </DataGridTemplateColumn.HeaderTemplate>
  58. </DataGridTemplateColumn>
  59. <DataGridTextColumn Binding="{Binding RealName,Mode=OneWay}" CanUserReorder="False" CanUserSort="True" Header="Name" IsReadOnly="True" Width="110" >
  60. <DataGridTextColumn.HeaderTemplate >
  61. <DataTemplate>
  62. <TextBlock Text="{DynamicResource GlobalLableAccountViewName}" />
  63. </DataTemplate>
  64. </DataGridTextColumn.HeaderTemplate>
  65. </DataGridTextColumn>
  66. <DataGridTextColumn Binding="{Binding Role,Mode=OneWay}" CanUserReorder="False" CanUserSort="True" Header="Role" IsReadOnly="True" Width="100" >
  67. <DataGridTextColumn.HeaderTemplate >
  68. <DataTemplate>
  69. <TextBlock Text="{DynamicResource GlobalLableAccountViewRole}" />
  70. </DataTemplate>
  71. </DataGridTextColumn.HeaderTemplate>
  72. </DataGridTextColumn>
  73. <DataGridTextColumn Binding="{Binding Department,Mode=OneWay}" CanUserReorder="False" CanUserSort="True" Header="Department" IsReadOnly="True" Width="100" >
  74. <DataGridTextColumn.HeaderTemplate >
  75. <DataTemplate>
  76. <TextBlock Text="{DynamicResource GlobalLableAccountViewDepartment}" />
  77. </DataTemplate>
  78. </DataGridTextColumn.HeaderTemplate>
  79. </DataGridTextColumn>
  80. <DataGridTextColumn Binding="{Binding LastLoginTime,Mode=OneWay,StringFormat={}\{0:yyyy/MM/dd HH:mm:ss\}}" CanUserSort="True" Header="Last Login" IsReadOnly="True" Width="170" >
  81. <DataGridTextColumn.HeaderTemplate >
  82. <DataTemplate>
  83. <TextBlock Text="{DynamicResource GlobalLableAccountViewLastLogin}" />
  84. </DataTemplate>
  85. </DataGridTextColumn.HeaderTemplate>
  86. </DataGridTextColumn>
  87. <DataGridTextColumn Binding="{Binding Telephone,Mode=OneWay}" CanUserReorder="False" CanUserSort="True" Header="Telephone" IsReadOnly="True" Width="100" >
  88. <DataGridTextColumn.HeaderTemplate >
  89. <DataTemplate>
  90. <TextBlock Text="{DynamicResource GlobalLableAccountViewTelephone}" />
  91. </DataTemplate>
  92. </DataGridTextColumn.HeaderTemplate>
  93. </DataGridTextColumn>
  94. <DataGridTextColumn Binding="{Binding Email,Mode=OneWay}" CanUserReorder="False" CanUserSort="True" Header="Mailbox" IsReadOnly="True" Width="100*" >
  95. <DataGridTextColumn.HeaderTemplate >
  96. <DataTemplate>
  97. <TextBlock Text="{DynamicResource GlobalLableAccountViewMailbox}" />
  98. </DataTemplate>
  99. </DataGridTextColumn.HeaderTemplate>
  100. </DataGridTextColumn>
  101. <DataGridTextColumn Binding="{Binding Description,Mode=OneWay}" Visibility="Collapsed" CanUserReorder="False" CanUserSort="True" Header="描述" IsReadOnly="True" Width="400*" >
  102. <DataGridTextColumn.HeaderTemplate >
  103. <DataTemplate>
  104. <TextBlock Text="{DynamicResource GlobalLableAccountViewDescription}" />
  105. </DataTemplate>
  106. </DataGridTextColumn.HeaderTemplate>
  107. </DataGridTextColumn>
  108. </DataGrid.Columns>
  109. </DataGrid>
  110. </DockPanel>
  111. </UserControl>