| | |
| | | xmlns:pu="https://opensource.panuon.com/wpf-ui" |
| | | xmlns:ctl="clr-namespace:WPFProject.Controls" |
| | | mc:Ignorable="d" |
| | | xmlns:dc="clr-namespace:HMI.UI.Converter;assembly=HMI.UI" |
| | | WindowStartupLocation="CenterOwner" |
| | | WindowState="Maximized" |
| | | x:Name="window" |
| | |
| | | pu:WindowXCaption.Foreground="#FFF"> |
| | | <Window.Resources> |
| | | <hc:LangConverter x:Key="lc"/> |
| | | <dc:CollectionVisibility x:Key="cv"/> |
| | | <Style x:Key="UserMenu" TargetType="Menu" BasedOn="{StaticResource {x:Static pu:StyleKeys.MenuStyle}}"> |
| | | <Setter Property="Background" Value="{StaticResource PrimaryColor}"/> |
| | | <Setter Property="Foreground" Value="#FFF"/> |
| | |
| | | |
| | | <pu:WindowXCaption.HeaderTemplate> |
| | | <DataTemplate> |
| | | <DockPanel DataContext="{Binding ElementName=window}" WindowChrome.IsHitTestVisibleInChrome="True" |
| | | VerticalAlignment="Center" Height="100"> |
| | | <DockPanel DataContext="{Binding ElementName=window}" WindowChrome.IsHitTestVisibleInChrome="True" VerticalAlignment="Center" Height="100"> |
| | | <StackPanel Orientation="Horizontal"> |
| | | <Image DockPanel.Dock="Left" Source="{Binding WindowLogo}" Margin="5,0,20,0" Height="60" VerticalAlignment="Center" Stretch="Fill" |
| | | RenderOptions.BitmapScalingMode="HighQuality" /> |
| | |
| | | </TextBlock> |
| | | </StackPanel> |
| | | |
| | | <StackPanel DockPanel.Dock="Right" VerticalAlignment="Top" Margin="10,10,0,0" Orientation="Horizontal"> |
| | | <Menu Margin="0" Padding="0" VerticalAlignment="Top" |
| | | <Grid DockPanel.Dock="Right" VerticalAlignment="Stretch"> |
| | | <Grid.RowDefinitions> |
| | | <RowDefinition /> |
| | | <RowDefinition Height="Auto"/> |
| | | </Grid.RowDefinitions> |
| | | <StackPanel Grid.Row="0" VerticalAlignment="Top" Margin="10,10,0,0" Orientation="Horizontal"> |
| | | <Menu Margin="0" Padding="0" VerticalAlignment="Top" |
| | | VerticalContentAlignment="Center" Style="{StaticResource UserMenu}" |
| | | |
| | | Background="Transparent"> |
| | | <MenuItem x:Name="userMenu" Header="{Binding WelcomeTitle}" FontSize="16"> |
| | | <MenuItem Icon="" Cursor="Hand" FontSize="14" Header="退出登录" |
| | | <MenuItem x:Name="userMenu" Header="{Binding WelcomeTitle}" FontSize="16"> |
| | | <MenuItem Icon="" Cursor="Hand" FontSize="14" Header="退出登录" |
| | | x:Name="MiLogout" Click="MenuItem_Click"/> |
| | | <MenuItem Cursor="Hand" FontSize="14" Icon="" |
| | | <MenuItem Cursor="Hand" FontSize="14" Icon="" |
| | | Header="重新启动" |
| | | x:Name="MiRestart" |
| | | Click="MenuItem_Click"/> |
| | | </MenuItem> |
| | | </Menu> |
| | | </MenuItem> |
| | | </Menu> |
| | | |
| | | <Button x:Name="BtnSwitchTheme" |
| | | <Button x:Name="BtnSwitchTheme" |
| | | FontSize="18" |
| | | FontFamily="/HMI.UI;component/Resources/Font/#iconfont" |
| | | Content="" |
| | | RenderTransformOrigin="0.5,0.5" |
| | | Click="Button_Click"> |
| | | <Button.Style> |
| | | <Style TargetType="Button" BasedOn="{StaticResource {x:Static pu:WindowXCaption.MinimizeButtonStyleKey}}"> |
| | | <Setter Property="Focusable" Value="False"/> |
| | | <Style.Triggers> |
| | | <DataTrigger Binding="{Binding ShowMenu}" Value="True"> |
| | | <Setter Property="Button.RenderTransform"> |
| | | <Setter.Value> |
| | | <RotateTransform x:Name="MyAnimatedTransform" Angle="180" /> |
| | | </Setter.Value> |
| | | </Setter> |
| | | </DataTrigger> |
| | | </Style.Triggers> |
| | | </Style> |
| | | </Button.Style> |
| | | </Button> |
| | | <Button.Style> |
| | | <Style TargetType="Button" BasedOn="{StaticResource {x:Static pu:WindowXCaption.MinimizeButtonStyleKey}}"> |
| | | <Setter Property="Focusable" Value="False"/> |
| | | <Style.Triggers> |
| | | <DataTrigger Binding="{Binding ShowMenu}" Value="True"> |
| | | <Setter Property="Button.RenderTransform"> |
| | | <Setter.Value> |
| | | <RotateTransform x:Name="MyAnimatedTransform" Angle="180" /> |
| | | </Setter.Value> |
| | | </Setter> |
| | | </DataTrigger> |
| | | </Style.Triggers> |
| | | </Style> |
| | | </Button.Style> |
| | | </Button> |
| | | |
| | | <Button FontSize="18" Click="Button_Click" x:Name="minBtn"> |
| | | <Button.Style> |
| | | <Style TargetType="Button" BasedOn="{StaticResource {x:Static pu:WindowXCaption.MinimizeButtonStyleKey}}"> |
| | | <Setter Property="Focusable" Value="False"/> |
| | | <Setter Property="IsHitTestVisible" Value="True"/> |
| | | </Style> |
| | | </Button.Style> |
| | | </Button> |
| | | <Button FontSize="18" Click="Button_Click" x:Name="minBtn"> |
| | | <Button.Style> |
| | | <Style TargetType="Button" BasedOn="{StaticResource {x:Static pu:WindowXCaption.MinimizeButtonStyleKey}}"> |
| | | <Setter Property="Focusable" Value="False"/> |
| | | <Setter Property="IsHitTestVisible" Value="True"/> |
| | | </Style> |
| | | </Button.Style> |
| | | </Button> |
| | | |
| | | <Button FontSize="18" Click="Button_Click" x:Name="maxBtn"> |
| | | <Button.Style> |
| | | <Style TargetType="Button" BasedOn="{StaticResource {x:Static pu:WindowXCaption.MaximizeButtonStyleKey}}"> |
| | | <Setter Property="Focusable" Value="False"/> |
| | | </Style> |
| | | </Button.Style> |
| | | </Button> |
| | | <Button FontSize="18" Click="Button_Click" x:Name="maxBtn"> |
| | | <Button.Style> |
| | | <Style TargetType="Button" BasedOn="{StaticResource {x:Static pu:WindowXCaption.MaximizeButtonStyleKey}}"> |
| | | <Setter Property="Focusable" Value="False"/> |
| | | </Style> |
| | | </Button.Style> |
| | | </Button> |
| | | |
| | | <Button FontSize="18" Click="Button_Click" x:Name="closeBtn"> |
| | | <Button.Style> |
| | | <Style TargetType="Button" BasedOn="{StaticResource {x:Static pu:WindowXCaption.CloseButtonStyleKey}}"> |
| | | <Setter Property="Focusable" Value="False"/> |
| | | </Style> |
| | | </Button.Style> |
| | | </Button> |
| | | </StackPanel> |
| | | <Button FontSize="18" Click="Button_Click" x:Name="closeBtn"> |
| | | <Button.Style> |
| | | <Style TargetType="Button" BasedOn="{StaticResource {x:Static pu:WindowXCaption.CloseButtonStyleKey}}"> |
| | | <Setter Property="Focusable" Value="False"/> |
| | | </Style> |
| | | </Button.Style> |
| | | </Button> |
| | | </StackPanel> |
| | | <Button Grid.Row="1" Margin="20,0,0,20" Foreground="#FFF" |
| | | Visibility="{Binding Alarms.Count,Converter={StaticResource cv}}" |
| | | HorizontalContentAlignment="Left" Style="{StaticResource LinkButton}" |
| | | Click="Clear_AllAlarm_Click" |
| | | Content="清除全部报警"/> |
| | | </Grid> |
| | | |
| | | <ListBox x:Name="list" |
| | | |
| | | Margin="20,15,10,15" |
| | | Background="#6FFFFFFF" |
| | | BorderThickness="0" |
| | |
| | | pu:ListBoxHelper.ItemsIcon="" |
| | | ItemsSource="{Binding Alarms}" |
| | | Loaded="list_Loaded" |
| | | |
| | | FontSize="15" |
| | | Foreground="#FFF" |
| | | |
| | | FontSize="15" Foreground="#FFF" |
| | | pu:IconHelper.FontFamily="/Panuon.WPF.UI;component/Resources/Fonts/#PanuonIcon" |
| | | pu:IconHelper.Foreground="Green" |
| | | pu:IconHelper.FontSize="20" |
| | | pu:IconHelper.Margin="5,0,5,0" |
| | | FontWeight="UltraBlack" |
| | | |
| | | |
| | | pu:ListBoxHelper.ItemsSeparatorVisibility="Visible" |
| | | pu:ListBoxHelper.ItemsSeparatorBrush="Transparent" |
| | | pu:ListBoxHelper.ItemsRemoveButtonVisibility="Visible"> |