|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446 |
- <UserControl
- x:Class="BPASmartClient.CustomResource.Pages.View.UserLogView"
- 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:pry="clr-namespace:BPASmartClient.CustomResource.UserControls"
- xmlns:vm="clr-namespace:BPASmartClient.CustomResource.Pages.ViewModel"
- d:DesignHeight="450"
- d:DesignWidth="800"
- mc:Ignorable="d">
-
- <UserControl.DataContext>
- <vm:UserLogViewModel />
- </UserControl.DataContext>
-
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary>
- <!--<convert:TextDisplayConvert x:Key="textDisplayConvert" />
- <convert:IsEnableConvert x:Key="isEnableConvert" />
- <convert:AnalogAlarmConvert x:Key="analogAlarmConvert" />
- <convert:DiscreteAlarmConvert x:Key="discreteAlarmConvert" />
- <convert:AlarmTypeTextConvert x:Key="alarmTypeTextConvert" />-->
- <SolidColorBrush x:Key="BorderSolid" Color="#332AB2E7" />
- <SolidColorBrush x:Key="FontColor" Color="#FF2AB2E7" />
- <SolidColorBrush x:Key="TitleFontColor" Color="#FF2AB2E7" />
- <SolidColorBrush x:Key="CursorColor" Color="Aqua" />
- <SolidColorBrush x:Key="TitleBorderColor" Color="#332AB2E7" />
-
- <Style x:Key="TextBlockStyle" TargetType="TextBlock">
- <Setter Property="FontFamily" Value="楷体" />
- <Setter Property="FontSize" Value="18" />
- <Setter Property="Foreground" Value="{StaticResource TextBlockForeground}" />
- <Setter Property="VerticalAlignment" Value="Center" />
- <Setter Property="HorizontalAlignment" Value="Center" />
- </Style>
-
- <Style x:Key="TextBoxStyle" TargetType="TextBox">
- <Setter Property="FontFamily" Value="楷体" />
- <Setter Property="FontSize" Value="22" />
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="Foreground" Value="{StaticResource TextBlockForeground}" />
- <Setter Property="BorderBrush" Value="#FF23CACA" />
- <Setter Property="CaretBrush" Value="Aqua" />
- <Setter Property="VerticalAlignment" Value="Center" />
- </Style>
-
- <Style x:Key="DataTextBlockStyle" TargetType="TextBlock">
- <Setter Property="HorizontalAlignment" Value="Center" />
- <Setter Property="VerticalAlignment" Value="Center" />
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="Foreground" Value="#20FDFA" />
- <Setter Property="FontSize" Value="14" />
- </Style>
-
- <ControlTemplate x:Key="ButTemplate" TargetType="Button">
- <Border
- x:Name="br"
- Background="Transparent"
- BorderBrush="#FF19B7EC"
- BorderThickness="2">
- <StackPanel
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Orientation="Horizontal">
- <ContentControl
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Content="{TemplateBinding Content}"
- Foreground="{TemplateBinding Foreground}" />
- </StackPanel>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="br" Property="Background" Value="#2219B7EC" />
- </Trigger>
-
- <Trigger Property="IsPressed" Value="true">
- <Setter TargetName="br" Property="Background" Value="#2219B7EC" />
- </Trigger>
-
- </ControlTemplate.Triggers>
- </ControlTemplate>
-
- <!--#region 用户输入框样式-->
- <Style x:Key="SearchTextBoxStyle" TargetType="TextBox">
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="CaretBrush" Value="#009DFF" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="TextBox">
- <Border
- x:Name="border"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- CornerRadius="0"
- SnapsToDevicePixels="true">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="40" />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <TextBlock
- x:Name="PasswordTextBlock"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontFamily="../../Fonts/#iconfont"
- FontSize="16"
- Foreground="{TemplateBinding BorderBrush}"
- Text="" />
-
- <TextBlock
- Name="markText"
- Grid.Column="1"
- Margin="10,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="#88009dff"
- Text="请输入账号名称"
- Visibility="Collapsed" />
-
- <ScrollViewer
- x:Name="PART_ContentHost"
- Grid.Column="1"
- MinHeight="20"
- VerticalAlignment="Center"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Grid>
-
- </Border>
-
- <ControlTemplate.Triggers>
- <Trigger Property="IsEnabled" Value="false">
- <Setter TargetName="border" Property="Opacity" Value="0.56" />
- </Trigger>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="border" Property="BorderBrush" Value="#FF7EB4EA" />
- </Trigger>
- <Trigger Property="IsKeyboardFocused" Value="true">
- <Setter TargetName="border" Property="BorderBrush" Value="#FF569DE5" />
- </Trigger>
- <DataTrigger Binding="{Binding Path=Text, RelativeSource={RelativeSource Mode=self}}" Value="">
- <Setter TargetName="markText" Property="Visibility" Value="Visible" />
- </DataTrigger>
- </ControlTemplate.Triggers>
-
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!--#endregion-->
-
- </ResourceDictionary>
- </ResourceDictionary.MergedDictionaries>
- </ResourceDictionary>
- </UserControl.Resources>
-
- <Grid Margin="10">
- <Grid.RowDefinitions>
- <RowDefinition Height="50" />
- <RowDefinition Height="30" />
- <RowDefinition />
- </Grid.RowDefinitions>
- <StackPanel
- Margin="0,8"
- HorizontalAlignment="Right"
- Orientation="Horizontal">
-
- <TextBox
- Width="200"
- Margin="20,0"
- BorderBrush="#009DFF"
- FontSize="16"
- Foreground="#aadddddd"
- Style="{DynamicResource SearchTextBoxStyle}"
- TabIndex="1"
- Text="{Binding SearchUser}"
- Visibility="{Binding IsVisibility}" />
-
- <DatePicker
- Background="Transparent"
- BorderBrush="#aa3aa7f3"
- BorderThickness="2"
- SelectedDate="{Binding StartDateTime}"
- Style="{StaticResource PickerStyle}"
- Text="请输入开始时间"
- Visibility="{Binding IsVisibility}" />
-
- <DatePicker
- Margin="20,0,20,0"
- Background="Transparent"
- BorderBrush="#aa3aa7f3"
- BorderThickness="2"
- SelectedDate="{Binding EndDateTime}"
- Style="{StaticResource PickerStyle}"
- Text="请输入结束时间"
- Visibility="{Binding IsVisibility}" />
-
- <Button
- Width="140"
- Height="30"
- Background="#FF19B7EC"
- Command="{Binding ControlCommand}"
- Content="{Binding ControlButText}"
- FontFamily="楷体"
- FontSize="18"
- Template="{StaticResource ButTemplate}"
- Visibility="{Binding IsVisibility}">
- <Button.Foreground>
- <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
- <GradientStop Color="#FFBB662A" />
- <GradientStop Offset="1" Color="White" />
- </LinearGradientBrush>
- </Button.Foreground>
- </Button>
-
- <Button
- Width="140"
- Height="30"
- Margin="20,0,0,0"
- Background="#FF19B7EC"
- Command="{Binding SwitchCommand}"
- Content="{Binding ButContent}"
- FontFamily="楷体"
- FontSize="18"
- Template="{StaticResource ButTemplate}">
- <Button.Foreground>
- <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
- <GradientStop Color="#FFBB662A" />
- <GradientStop Offset="1" Color="White" />
- </LinearGradientBrush>
- </Button.Foreground>
- </Button>
-
- </StackPanel>
-
- <!--#region 表格标题栏设置-->
- <Grid Grid.Row="1" Background="#ff0C255F">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="0.3*" />
- <ColumnDefinition Width="0.3*" />
- <ColumnDefinition Width="0.3*" />
- <ColumnDefinition Width="0.3*" />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
-
- <TextBlock
- Grid.Column="0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="{StaticResource TitleFontColor}"
- Text="日期" />
-
- <Grid Grid.Column="1">
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="{StaticResource TitleFontColor}"
- Text="时间" />
-
- <Border
- BorderBrush="{StaticResource TitleBorderColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
-
- <TextBlock
- Grid.Column="2"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="{StaticResource TitleFontColor}"
- Text="操作权限" />
-
-
- <Grid Grid.Column="3">
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="{StaticResource TitleFontColor}"
- Text="用户名" />
-
- <Border
- BorderBrush="{StaticResource TitleBorderColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <TextBlock
- Grid.Column="4"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="{StaticResource TitleFontColor}"
- Text="消息日志" />
-
- </Grid>
- <!--#endregion-->
-
- <!--#region 表格数据显示-->
- <ScrollViewer
- Grid.Row="2"
- HorizontalScrollBarVisibility="Hidden"
- VerticalScrollBarVisibility="Hidden">
-
- <Grid>
- <!--#region 实时报警信息-->
- <ItemsControl ItemsSource="{Binding UserLogs}" Visibility="{Binding CurrentDataVis}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Grid x:Name="gr" Height="30">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="0.3*" />
- <ColumnDefinition Width="0.3*" />
- <ColumnDefinition Width="0.3*" />
- <ColumnDefinition Width="0.3*" />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
-
- <TextBlock
- Grid.Column="0"
- Style="{StaticResource DataTextBlockStyle}"
- Text="{Binding Date}" />
-
- <Grid Grid.Column="1">
- <TextBlock Style="{StaticResource DataTextBlockStyle}" Text="{Binding Time}" />
- <Border BorderBrush="{StaticResource BorderSolid}" BorderThickness="1,0,1,0" />
- </Grid>
-
- <TextBlock
- Grid.Column="2"
- Style="{StaticResource DataTextBlockStyle}"
- Text="{Binding Permission}" />
-
- <Grid Grid.Column="3">
- <TextBlock
- Margin="10,0,0,0"
- HorizontalAlignment="Center"
- Style="{StaticResource DataTextBlockStyle}"
- Text="{Binding UserName}" />
- <Border BorderBrush="{StaticResource BorderSolid}" BorderThickness="1,0,1,0" />
- </Grid>
-
- <TextBlock
- Grid.Column="4"
- Margin="10,0,0,0"
- HorizontalAlignment="Left"
- Style="{StaticResource DataTextBlockStyle}"
- Text="{Binding LogInfo}" />
-
- <Border
- Grid.ColumnSpan="6"
- BorderBrush="{StaticResource BorderSolid}"
- BorderThickness="1" />
-
- </Grid>
-
- <DataTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="gr" Property="Background" Value="#112AB2E7" />
- </Trigger>
- </DataTemplate.Triggers>
-
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- <!--#endregion-->
-
- <!--#region 历史报警信息-->
- <ItemsControl ItemsSource="{Binding HistoryUserLog}" Visibility="{Binding HistoryDataVis}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Grid x:Name="gr" Height="30">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="0.3*" />
- <ColumnDefinition Width="0.3*" />
- <ColumnDefinition Width="0.3*" />
- <ColumnDefinition Width="0.3*" />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
-
- <TextBlock
- Grid.Column="0"
- Style="{StaticResource DataTextBlockStyle}"
- Text="{Binding Date}" />
-
- <Grid Grid.Column="1">
- <TextBlock Style="{StaticResource DataTextBlockStyle}" Text="{Binding Time}" />
- <Border BorderBrush="{StaticResource BorderSolid}" BorderThickness="1,0,1,0" />
- </Grid>
-
- <TextBlock
- Grid.Column="2"
- Style="{StaticResource DataTextBlockStyle}"
- Text="{Binding Permission}" />
-
- <Grid Grid.Column="3">
- <TextBlock
- Margin="10,0,0,0"
- HorizontalAlignment="Left"
- Style="{StaticResource DataTextBlockStyle}"
- Text="{Binding UserName}" />
- <Border BorderBrush="{StaticResource BorderSolid}" BorderThickness="1,0,1,0" />
- </Grid>
-
- <TextBlock
- Grid.Column="4"
- Margin="10,0,0,0"
- HorizontalAlignment="Left"
- Style="{StaticResource DataTextBlockStyle}"
- Text="{Binding LogInfo}" />
-
- <Border
- Grid.ColumnSpan="6"
- BorderBrush="{StaticResource BorderSolid}"
- BorderThickness="1" />
-
- </Grid>
-
- <DataTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="gr" Property="Background" Value="#112AB2E7" />
- </Trigger>
- </DataTemplate.Triggers>
-
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- <!--#endregion-->
- </Grid>
- </ScrollViewer>
- <!--#endregion-->
-
-
- </Grid>
-
- </UserControl>
|