Polish header controls and fix information tab layout issues

This commit is contained in:
Meik
2026-03-05 11:04:53 +01:00
parent 03fc189639
commit c29ca72b2b
5 changed files with 304 additions and 216 deletions

View File

@@ -233,6 +233,67 @@
</Style> </Style>
<Style TargetType="Image" <Style TargetType="Image"
x:Key="ImageStyle" /> x:Key="ImageStyle" />
<Style TargetType="Image"
x:Key="SignalMarkerStyle"
BasedOn="{StaticResource ImageStyle}">
<Setter Property="RenderTransformOrigin"
Value="0.5,0.5" />
<Setter Property="RenderTransform">
<Setter.Value>
<ScaleTransform ScaleX="0.8"
ScaleY="0.8" />
</Setter.Value>
</Setter>
<Setter Property="SnapsToDevicePixels"
Value="False" />
</Style>
<Style TargetType="Button"
x:Key="HeaderIconButtonStyle">
<Setter Property="Foreground"
Value="{DynamicResource navForeground}" />
<Setter Property="Background"
Value="{DynamicResource headerControlBackgroundColor}" />
<Setter Property="BorderBrush"
Value="{DynamicResource panelBorderColor}" />
<Setter Property="BorderThickness"
Value="1" />
<Setter Property="Cursor"
Value="Hand" />
<Setter Property="Width"
Value="32" />
<Setter Property="Height"
Value="32" />
<Setter Property="Padding"
Value="0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="HeaderButtonBorder"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="10">
<ContentPresenter HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver"
Value="True">
<Setter TargetName="HeaderButtonBorder"
Property="Background"
Value="{DynamicResource inactiveButtonColor}" />
</Trigger>
<Trigger Property="IsPressed"
Value="True">
<Setter TargetName="HeaderButtonBorder"
Property="Opacity"
Value="0.9" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<DrawingImage x:Key="OverlayOffline"> <DrawingImage x:Key="OverlayOffline">
<DrawingImage.Drawing> <DrawingImage.Drawing>
@@ -280,33 +341,34 @@
HorizontalAlignment="Left" HorizontalAlignment="Left"
Margin="14,14,0,0" Margin="14,14,0,0"
x:Name="Logo" /> x:Name="Logo" />
<TextBlock x:Name="Close_Text" <Button x:Name="Close_Text"
MouseDown="OnMinimizeClicked" Style="{StaticResource HeaderIconButtonStyle}"
HorizontalAlignment="Right" HorizontalAlignment="Right"
VerticalAlignment="Top" VerticalAlignment="Top"
Width="28" Margin="0,12,12,0"
Height="28" Panel.ZIndex="500"
FontSize="16" ToolTip="{x:Static resx:Resources.close}"
TextAlignment="Center" PreviewMouseDown="OnMinimizeClicked">
Padding="0,2,0,0" <TextBlock Text="X"
Background="{DynamicResource headerControlBackgroundColor}" FontSize="15"
Foreground="{DynamicResource navForeground}" FontWeight="Bold"
FontWeight="Bold" TextAlignment="Center"
Margin="0,12,12,0" VerticalAlignment="Center"
Cursor="Hand" HorizontalAlignment="Center" />
ToolTip="{x:Static resx:Resources.close}" </Button>
Panel.ZIndex="500"><Run Text="X" /></TextBlock> <Button x:Name="RefreshIcon"
<Image x:Name="RefreshIcon" Style="{StaticResource HeaderIconButtonStyle}"
Source="{DynamicResource nav_appbar_refresh}" HorizontalAlignment="Right"
Tag="ICO" VerticalAlignment="Top"
Panel.ZIndex="500" Margin="0,12,88,0"
HorizontalAlignment="Right" Panel.ZIndex="500"
Width="20" ToolTip="Refresh"
Height="20" PreviewMouseDown="OnRefreshClicked">
VerticalAlignment="Top" <Image Source="{DynamicResource nav_appbar_refresh}"
Margin="0,16,88,0" Tag="ICO"
MouseDown="OnRefreshClicked" Width="16"
Cursor="Hand" /> Height="16" />
</Button>
<!--<TextBlock MouseDown="OnCloseClicked" HorizontalAlignment="Right" FontSize="20" FontWeight="Bold" Margin="0,-5,5,0" Cursor="Hand" Panel.ZIndex="500" >X</TextBlock>--> <!--<TextBlock MouseDown="OnCloseClicked" HorizontalAlignment="Right" FontSize="20" FontWeight="Bold" Margin="0,-5,5,0" Cursor="Hand" Panel.ZIndex="500" >X</TextBlock>-->
<Image Source="{DynamicResource nav_appbar_network_server_disconnect}" <Image Source="{DynamicResource nav_appbar_network_server_disconnect}"
Tag="ICO" Tag="ICO"
@@ -472,10 +534,8 @@
<Image Source="Resources/StateOverlays/OverlayNewContentButton.png" <Image Source="Resources/StateOverlays/OverlayNewContentButton.png"
Visibility="Collapsed" Visibility="Collapsed"
Panel.ZIndex="18" Panel.ZIndex="18"
Style="{StaticResource ImageStyle}" Style="{StaticResource SignalMarkerStyle}"
Tag="Signal" Tag="Signal"
Width="12"
Height="12"
Stretch="None" Stretch="None"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
@@ -530,10 +590,8 @@
<Image Source="Resources/StateOverlays/OverlayNewContentButton.png" <Image Source="Resources/StateOverlays/OverlayNewContentButton.png"
Visibility="Collapsed" Visibility="Collapsed"
Panel.ZIndex="18" Panel.ZIndex="18"
Style="{StaticResource ImageStyle}" Style="{StaticResource SignalMarkerStyle}"
Tag="Signal" Tag="Signal"
Width="12"
Height="12"
Stretch="None" Stretch="None"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
@@ -587,10 +645,8 @@
<Image Source="Resources/StateOverlays/OverlayNewContentButton.png" <Image Source="Resources/StateOverlays/OverlayNewContentButton.png"
Visibility="Collapsed" Visibility="Collapsed"
Panel.ZIndex="18" Panel.ZIndex="18"
Style="{StaticResource ImageStyle}" Style="{StaticResource SignalMarkerStyle}"
Tag="Signal" Tag="Signal"
Width="12"
Height="12"
Stretch="None" Stretch="None"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
@@ -645,10 +701,8 @@
<Image Source="Resources/StateOverlays/OverlayNewContentButton.png" <Image Source="Resources/StateOverlays/OverlayNewContentButton.png"
Visibility="Collapsed" Visibility="Collapsed"
Panel.ZIndex="18" Panel.ZIndex="18"
Style="{StaticResource ImageStyle}" Style="{StaticResource SignalMarkerStyle}"
Tag="Signal" Tag="Signal"
Width="12"
Height="12"
Stretch="None" Stretch="None"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
@@ -703,10 +757,8 @@
<Image Source="Resources/StateOverlays/OverlayNewContentButton.png" <Image Source="Resources/StateOverlays/OverlayNewContentButton.png"
Visibility="Collapsed" Visibility="Collapsed"
Panel.ZIndex="18" Panel.ZIndex="18"
Style="{StaticResource ImageStyle}" Style="{StaticResource SignalMarkerStyle}"
Tag="Signal" Tag="Signal"
Width="12"
Height="12"
Stretch="None" Stretch="None"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"

View File

@@ -39,7 +39,24 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid Background="{Binding Path=PrioColor}" Grid.RowSpan="3" x:Name="annColor"></Grid> <Grid Background="{Binding Path=PrioColor}" Grid.RowSpan="3" x:Name="annColor"></Grid>
<DockPanel Grid.Column="1" > <DockPanel Grid.Column="1" >
<Image Source="pack://application:,,,/Resources/StateOverlays/OverlayNewContentButton.png" Panel.ZIndex="18" Stretch="None" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="{Binding Path=IsUnread, Converter={StaticResource BoolToVis}}" x:Name="signal" Width="12" Height="12" Cursor="Hand" ToolTip="{x:Static resx:Resources.removeMarkup}" Margin="5,0,0,0" /> <Image Source="pack://application:,,,/Resources/StateOverlays/OverlayNewContentButton.png"
Panel.ZIndex="18"
Stretch="None"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Visibility="{Binding Path=IsUnread, Converter={StaticResource BoolToVis}}"
x:Name="signal"
Width="15"
Height="15"
Cursor="Hand"
ToolTip="{x:Static resx:Resources.removeMarkup}"
Margin="5,0,0,0"
RenderTransformOrigin="0.5,0.5">
<Image.RenderTransform>
<ScaleTransform ScaleX="0.8"
ScaleY="0.8" />
</Image.RenderTransform>
</Image>
<TextBlock x:Name="txtDate" Grid.Row="0" Margin="10,0,5,0" HorizontalAlignment="Left" VerticalAlignment="Center" FontStyle="Italic" Foreground="{DynamicResource subtleTextColor}" Text="{Binding Path=CreatedDate,StringFormat={}{0:dd.MM.yyyy},FallbackValue='01.01.2021'}"></TextBlock> <TextBlock x:Name="txtDate" Grid.Row="0" Margin="10,0,5,0" HorizontalAlignment="Left" VerticalAlignment="Center" FontStyle="Italic" Foreground="{DynamicResource subtleTextColor}" Text="{Binding Path=CreatedDate,StringFormat={}{0:dd.MM.yyyy},FallbackValue='01.01.2021'}"></TextBlock>
</DockPanel> </DockPanel>

View File

@@ -47,6 +47,7 @@
</Trigger> </Trigger>
</Style.Triggers> </Style.Triggers>
</Style> </Style>
<Style x:Key="InfoTextBoxStyle" <Style x:Key="InfoTextBoxStyle"
TargetType="{x:Type TextBox}"> TargetType="{x:Type TextBox}">
<Setter Property="Foreground" <Setter Property="Foreground"
@@ -58,7 +59,7 @@
<Setter Property="BorderThickness" <Setter Property="BorderThickness"
Value="1" /> Value="1" />
<Setter Property="Padding" <Setter Property="Padding"
Value="8,3" /> Value="8,4" />
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}"> <ControlTemplate TargetType="{x:Type TextBox}">
@@ -72,10 +73,63 @@
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Style> </Style>
<Style x:Key="InfoRowIconStyle"
TargetType="{x:Type Image}">
<Setter Property="Width"
Value="24" />
<Setter Property="Height"
Value="24" />
<Setter Property="Canvas.Left"
Value="0" />
<Setter Property="Canvas.Top"
Value="0" />
</Style>
<Style x:Key="InfoRowLabelStyle"
TargetType="{x:Type Label}">
<Setter Property="Foreground"
Value="{DynamicResource sectionTitleColor}" />
<Setter Property="FontSize"
Value="16" />
<Setter Property="Canvas.Left"
Value="40" />
<Setter Property="Canvas.Top"
Value="-2" />
</Style>
<Style x:Key="InfoRowValueStyle"
TargetType="{x:Type TextBox}"
BasedOn="{StaticResource InfoTextBoxStyle}">
<Setter Property="Width"
Value="310" />
<Setter Property="Height"
Value="28" />
<Setter Property="FontSize"
Value="15" />
<Setter Property="Canvas.Left"
Value="12" />
<Setter Property="Canvas.Top"
Value="20" />
</Style>
<Style x:Key="InfoRowCopyStyle"
TargetType="{x:Type Image}">
<Setter Property="Cursor"
Value="Hand" />
<Setter Property="Width"
Value="22" />
<Setter Property="Height"
Value="22" />
<Setter Property="Canvas.Left"
Value="325" />
<Setter Property="Canvas.Top"
Value="23" />
</Style>
</UserControl.Resources> </UserControl.Resources>
<!--ComputerInformation--> <Grid x:Name="GridInfo"
<Grid x:Name="GridInfo" x:FieldModifier="private" x:FieldModifier="private"
Width="500"> Width="500">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="100*" /> <ColumnDefinition Width="100*" />
@@ -83,20 +137,15 @@
<ColumnDefinition Width="185*" /> <ColumnDefinition Width="185*" />
<ColumnDefinition Width="30*" /> <ColumnDefinition Width="30*" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="6*" />
<RowDefinition Height="7*" />
</Grid.RowDefinitions>
<Canvas x:Name="CanvasInfo" <Canvas x:Name="CanvasInfo"
Grid.Column="1" Grid.Column="1"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Grid.Row="0"
Height="560"> Height="560">
<Image Source="{DynamicResource appbar_information}" <Image Source="{DynamicResource appbar_information}"
Width="36" Width="32"
Height="36" Height="32"
Margin="0,6,0,0" Canvas.Top="8"
Tag="MAINICO" /> Tag="MAINICO" />
<Label Foreground="{DynamicResource sectionTitleColor}" <Label Foreground="{DynamicResource sectionTitleColor}"
Content="{x:Static resx:Resources.information}" Content="{x:Static resx:Resources.information}"
@@ -109,244 +158,175 @@
Canvas.Left="0" Canvas.Left="0"
Width="350"> Width="350">
<Canvas Width="350" <Canvas Width="350"
Height="54"> Height="50">
<Image Source="{DynamicResource appbar_monitor}" <Image Source="{DynamicResource appbar_monitor}"
Height="30" Style="{StaticResource InfoRowIconStyle}"
x:Name="icoComputer_Inline" x:Name="icoComputer_Inline"
x:FieldModifier="private" /> x:FieldModifier="private" />
<Label Foreground="{DynamicResource sectionTitleColor}" <Label x:Name="LblComputername"
x:Name="LblComputername"
x:FieldModifier="private" x:FieldModifier="private"
Content="{x:Static resx:Resources.computername}" Style="{StaticResource InfoRowLabelStyle}"
FontSize="16" Content="{x:Static resx:Resources.computername}" />
Canvas.Top="4" <TextBox x:Name="TxtComputername"
Canvas.Left="40" />
<TextBox Canvas.Left="15"
Width="300"
Height="24"
FontSize="16"
VerticalAlignment="Center"
Style="{StaticResource InfoTextBoxStyle}"
x:Name="TxtComputername"
x:FieldModifier="private" x:FieldModifier="private"
Style="{StaticResource InfoRowValueStyle}"
IsReadOnly="true" IsReadOnly="true"
Canvas.Top="26"
PreviewMouseDoubleClick="Info_TXT_OnMouseDoubleClick" /> PreviewMouseDoubleClick="Info_TXT_OnMouseDoubleClick" />
<Image Cursor="Hand" <Image x:Name="icoCopyComputer"
Source="{DynamicResource appbar_page_copy}"
Height="22"
x:Name="icoCopyComputer"
x:FieldModifier="private" x:FieldModifier="private"
Style="{StaticResource InfoRowCopyStyle}"
Source="{DynamicResource appbar_page_copy}"
Tag="MAINICO" Tag="MAINICO"
Canvas.Left="315"
Canvas.Top="26"
Width="24"
PreviewMouseDown="ClickCopyIcon" /> PreviewMouseDown="ClickCopyIcon" />
</Canvas> </Canvas>
<Canvas Width="350" <Canvas Width="350"
Height="54"> Height="50">
<Image Source="{DynamicResource appbar_network}" <Image Source="{DynamicResource appbar_network}"
Height="30" Style="{StaticResource InfoRowIconStyle}"
x:Name="icoNetwork_Inline" x:Name="icoNetwork_Inline"
x:FieldModifier="private" /> x:FieldModifier="private" />
<Label Foreground="{DynamicResource sectionTitleColor}" <Label x:Name="LblIpaddress"
FontSize="16"
x:Name="LblIpaddress"
x:FieldModifier="private" x:FieldModifier="private"
Content="{x:Static resx:Resources.ipaddress}" Style="{StaticResource InfoRowLabelStyle}"
Canvas.Top="4" Content="{x:Static resx:Resources.ipaddress}" />
Canvas.Left="40" /> <TextBox x:Name="TxtIpaddress"
<TextBox Canvas.Left="15"
Width="300"
Height="24"
VerticalAlignment="Center"
FontSize="16"
Style="{StaticResource InfoTextBoxStyle}"
x:Name="TxtIpaddress"
x:FieldModifier="private" x:FieldModifier="private"
Style="{StaticResource InfoRowValueStyle}"
IsReadOnly="true" IsReadOnly="true"
Canvas.Top="26"
PreviewMouseDoubleClick="Info_TXT_OnMouseDoubleClick" /> PreviewMouseDoubleClick="Info_TXT_OnMouseDoubleClick" />
<Image Cursor="Hand" <Image x:Name="icoCopyNetwork"
Source="{DynamicResource appbar_page_copy}"
Height="22"
x:Name="icoCopyNetwork"
x:FieldModifier="private" x:FieldModifier="private"
Style="{StaticResource InfoRowCopyStyle}"
Source="{DynamicResource appbar_page_copy}"
Tag="MAINICO" Tag="MAINICO"
Canvas.Left="315"
Canvas.Top="26"
Width="24"
PreviewMouseDown="ClickCopyIcon" /> PreviewMouseDown="ClickCopyIcon" />
</Canvas> </Canvas>
<Canvas Width="350" <Canvas Width="350"
Height="54" Height="50"
x:Name="CanvasHostname" x:Name="CanvasHostname"
x:FieldModifier="private"> x:FieldModifier="private">
<Image Source="{DynamicResource appbar_remotehost}" <Image Source="{DynamicResource appbar_remotehost}"
Height="30" Style="{StaticResource InfoRowIconStyle}"
x:Name="icoHost_Inline" x:Name="icoHost_Inline"
x:FieldModifier="private" /> x:FieldModifier="private" />
<Label Foreground="{DynamicResource sectionTitleColor}" <Label x:Name="LblHostname"
x:Name="LblHostname"
x:FieldModifier="private" x:FieldModifier="private"
Content="{x:Static resx:Resources.Hostname}" Style="{StaticResource InfoRowLabelStyle}"
FontSize="16" Content="{x:Static resx:Resources.Hostname}" />
Canvas.Top="4" <TextBox x:Name="TxtHostname"
Canvas.Left="40" />
<TextBox Canvas.Left="15"
Width="300"
Height="24"
FontSize="16"
VerticalAlignment="Center"
Style="{StaticResource InfoTextBoxStyle}"
x:Name="TxtHostname"
x:FieldModifier="private" x:FieldModifier="private"
Style="{StaticResource InfoRowValueStyle}"
IsReadOnly="true" IsReadOnly="true"
Canvas.Top="26"
PreviewMouseDoubleClick="Info_TXT_OnMouseDoubleClick" /> PreviewMouseDoubleClick="Info_TXT_OnMouseDoubleClick" />
<Image Cursor="Hand" <Image x:Name="icoCopyHost"
Source="{DynamicResource appbar_page_copy}"
Height="22"
x:Name="icoCopyHost"
x:FieldModifier="private" x:FieldModifier="private"
Style="{StaticResource InfoRowCopyStyle}"
Source="{DynamicResource appbar_page_copy}"
Tag="MAINICO" Tag="MAINICO"
Canvas.Left="315"
Canvas.Top="26"
Width="24"
PreviewMouseDown="ClickCopyIcon" /> PreviewMouseDown="ClickCopyIcon" />
</Canvas> </Canvas>
<Canvas Width="350" <Canvas Width="350"
Height="54"> Height="50">
<Image Source="{DynamicResource appbar_people}" <Image Source="{DynamicResource appbar_people}"
Height="30" Style="{StaticResource InfoRowIconStyle}"
x:Name="icoUser_Inline" x:Name="icoUser_Inline"
x:FieldModifier="private" /> x:FieldModifier="private" />
<Label Foreground="{DynamicResource sectionTitleColor}" <Label x:Name="LblUsername"
FontSize="16"
x:Name="LblUsername"
x:FieldModifier="private" x:FieldModifier="private"
Content="{x:Static resx:Resources.username}" Style="{StaticResource InfoRowLabelStyle}"
Canvas.Top="4" Content="{x:Static resx:Resources.username}" />
Canvas.Left="40" /> <TextBox x:Name="TxtUsername"
<TextBox Canvas.Left="15"
Width="300"
Height="24"
VerticalAlignment="Center"
FontSize="16"
Style="{StaticResource InfoTextBoxStyle}"
x:Name="TxtUsername"
x:FieldModifier="private" x:FieldModifier="private"
Style="{StaticResource InfoRowValueStyle}"
IsEnabled="true" IsEnabled="true"
IsReadOnly="true" IsReadOnly="true"
Canvas.Top="26"
PreviewMouseDoubleClick="Info_TXT_OnMouseDoubleClick" /> PreviewMouseDoubleClick="Info_TXT_OnMouseDoubleClick" />
<Image Cursor="Hand" <Image x:Name="icoCopyUser"
Source="{DynamicResource appbar_page_copy}"
Height="22"
x:Name="icoCopyUser"
x:FieldModifier="private" x:FieldModifier="private"
Style="{StaticResource InfoRowCopyStyle}"
Source="{DynamicResource appbar_page_copy}"
Tag="MAINICO" Tag="MAINICO"
Canvas.Left="315"
Canvas.Top="26"
Width="24"
PreviewMouseDown="ClickCopyIcon" /> PreviewMouseDown="ClickCopyIcon" />
</Canvas> </Canvas>
<Canvas Width="350" <Canvas Width="350"
Height="54"> Height="50">
<Image Source="{DynamicResource appbar_reset}" <Image Source="{DynamicResource appbar_reset}"
Height="30" Style="{StaticResource InfoRowIconStyle}"
x:Name="icoRestart_Inline" x:Name="icoRestart_Inline"
x:FieldModifier="private" x:FieldModifier="private"
Tag="MAINICO" /> Tag="MAINICO" />
<Label Foreground="{DynamicResource sectionTitleColor}" <Label x:Name="LblLastreboot"
FontSize="16"
x:Name="LblLastreboot"
x:FieldModifier="private" x:FieldModifier="private"
Content="{x:Static resx:Resources.lastreboot}" Style="{StaticResource InfoRowLabelStyle}"
Canvas.Top="4" Content="{x:Static resx:Resources.lastreboot}" />
Canvas.Left="40" /> <TextBox x:Name="TxtLastreboot"
<TextBox Canvas.Left="15"
Width="300"
Height="24"
VerticalAlignment="Center"
FontSize="16"
Style="{StaticResource InfoTextBoxStyle}"
x:Name="TxtLastreboot"
x:FieldModifier="private" x:FieldModifier="private"
Style="{StaticResource InfoRowValueStyle}"
IsReadOnly="true" IsReadOnly="true"
Canvas.Top="26"
MouseDoubleClick="Info_TXT_OnMouseDoubleClick" /> MouseDoubleClick="Info_TXT_OnMouseDoubleClick" />
<Image Cursor="Hand" <Image x:Name="icoCopyRestart"
Source="{DynamicResource appbar_page_copy}"
Height="22"
x:Name="icoCopyRestart"
x:FieldModifier="private" x:FieldModifier="private"
Style="{StaticResource InfoRowCopyStyle}"
Source="{DynamicResource appbar_page_copy}"
Tag="MAINICO" Tag="MAINICO"
Canvas.Left="315"
Canvas.Top="26"
Width="24"
PreviewMouseDown="ClickCopyIcon" /> PreviewMouseDown="ClickCopyIcon" />
</Canvas> </Canvas>
<Canvas Width="350" <Canvas Width="350"
Height="74"> Height="86">
<Image Source="{DynamicResource appbar_folder_ellipsis}" <Image Source="{DynamicResource appbar_folder_ellipsis}"
Height="30" Style="{StaticResource InfoRowIconStyle}"
x:Name="icoDrive_Inline" x:Name="icoDrive_Inline"
x:FieldModifier="private" x:FieldModifier="private"
Tag="MAINICO" /> Tag="MAINICO" />
<Label Foreground="{DynamicResource sectionTitleColor}" <Label x:Name="LblDrives"
x:Name="LblDrives"
x:FieldModifier="private" x:FieldModifier="private"
Content="{x:Static resx:Resources.drives}" Style="{StaticResource InfoRowLabelStyle}"
FontSize="16" Content="{x:Static resx:Resources.drives}" />
Canvas.Top="4" <StackPanel Canvas.Left="8"
Canvas.Left="40" /> Canvas.Top="24"
<StackPanel Canvas.Left="15"
Canvas.Top="28"
Orientation="Vertical" Orientation="Vertical"
Width="300"> Width="334">
<StackPanel x:Name="StPaDrives" <StackPanel x:Name="StPaDrives"
x:FieldModifier="private" x:FieldModifier="private"
Width="300" Width="334"
CanHorizontallyScroll="True" CanHorizontallyScroll="True"
CanVerticallyScroll="True" CanVerticallyScroll="True"
MinHeight="30" MinHeight="30"
MaxHeight="30" MaxHeight="30"
HorizontalAlignment="Center" HorizontalAlignment="Left"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Orientation="Horizontal" /> Orientation="Horizontal" />
<StackPanel x:Name="StPaDrives2" <StackPanel x:Name="StPaDrives2"
x:FieldModifier="private" x:FieldModifier="private"
Width="300" Width="334"
CanHorizontallyScroll="True" CanHorizontallyScroll="True"
CanVerticallyScroll="True" CanVerticallyScroll="True"
MinHeight="30" MinHeight="30"
MaxHeight="30" MaxHeight="30"
HorizontalAlignment="Center" HorizontalAlignment="Left"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Orientation="Horizontal" /> Orientation="Horizontal" />
</StackPanel> </StackPanel>
</Canvas> </Canvas>
<Canvas Width="350" <Canvas Width="350"
Height="130"> Height="110">
<Label Content="{x:Static resx:Resources.genReportHeader}" <Label Content="{x:Static resx:Resources.genReportHeader}"
Foreground="{DynamicResource sectionTitleColor}" Foreground="{DynamicResource sectionTitleColor}"
Canvas.Left="58"
Canvas.Top="0"
FontSize="16" FontSize="16"
HorizontalAlignment="Center" Width="334"
VerticalAlignment="Top" /> Canvas.Left="8"
Canvas.Top="0"
HorizontalContentAlignment="Center" />
<Button Foreground="{DynamicResource buttonTextColor}" <Button Foreground="{DynamicResource buttonTextColor}"
HorizontalAlignment="Left"
Style="{StaticResource ButtonStyle}" Style="{StaticResource ButtonStyle}"
Width="250" Width="250"
Height="38" Height="36"
x:Name="BtnClientReport" x:Name="BtnClientReport"
x:FieldModifier="private" x:FieldModifier="private"
Content="{x:Static resx:Resources.genReport}" Content="{x:Static resx:Resources.genReport}"
@@ -355,10 +335,9 @@
Canvas.Left="50" Canvas.Left="50"
Canvas.Top="24" /> Canvas.Top="24" />
<Button Foreground="{DynamicResource buttonTextColor}" <Button Foreground="{DynamicResource buttonTextColor}"
HorizontalAlignment="Center"
Style="{StaticResource ButtonStyle}" Style="{StaticResource ButtonStyle}"
Width="250" Width="250"
Height="38" Height="36"
x:Name="BtnRemoteSupport" x:Name="BtnRemoteSupport"
x:FieldModifier="private" x:FieldModifier="private"
Tag="LABEL" Tag="LABEL"
@@ -367,13 +346,13 @@
Click="OnRemoteSupportClicked" Click="OnRemoteSupportClicked"
Visibility="Visible" Visibility="Visible"
Canvas.Left="50" Canvas.Left="50"
Canvas.Top="70" /> Canvas.Top="66" />
<Grid Panel.ZIndex="100" <Grid Panel.ZIndex="100"
x:Name="PRGSGrid" x:Name="PRGSGrid"
x:FieldModifier="private" x:FieldModifier="private"
Visibility="Hidden" Visibility="Hidden"
Canvas.Left="100" Canvas.Left="100"
Canvas.Top="31"> Canvas.Top="29">
<uctrl:CustomProgressBar x:Name="PRGS" <uctrl:CustomProgressBar x:Name="PRGS"
x:FieldModifier="private" x:FieldModifier="private"
Visibility="Visible" Visibility="Visible"
@@ -386,14 +365,18 @@
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" /> VerticalAlignment="Center" />
</Grid> </Grid>
<Label x:Name="LblCustomerPanelVersion"
x:FieldModifier="private"
FontSize="12"
Canvas.Left="118"
Canvas.Top="112" />
</Canvas> </Canvas>
</StackPanel> </StackPanel>
<Label x:Name="LblCustomerPanelVersion"
x:FieldModifier="private"
FontSize="12"
Width="334"
Canvas.Left="8"
Canvas.Top="536"
HorizontalContentAlignment="Center"
Foreground="{DynamicResource subtleTextColor}" />
<Canvas Canvas.Left="150" <Canvas Canvas.Left="150"
Canvas.Top="10" Canvas.Top="10"
x:Name="copied" x:Name="copied"
@@ -418,5 +401,4 @@
</Canvas> </Canvas>
</Canvas> </Canvas>
</Grid> </Grid>
<!--ComputerInformation-->
</UserControl> </UserControl>

View File

@@ -148,24 +148,50 @@ namespace C4IT_CustomerPanel.UserControls
RemoteHost = Environment.GetEnvironmentVariable("ClientName2"); RemoteHost = Environment.GetEnvironmentVariable("ClientName2");
#endif #endif
TxtHostname.Text = RemoteHost; TxtHostname.Text = RemoteHost;
if (string.IsNullOrEmpty(RemoteHost)) CanvasHostname.Visibility = string.IsNullOrEmpty(RemoteHost)
CanvasHostname.Visibility = Visibility.Collapsed; ? Visibility.Collapsed
: Visibility.Visible;
TxtUsername.Text = Environment.UserDomainName + "\\" + Environment.UserName; TxtUsername.Text = Environment.UserDomainName + "\\" + Environment.UserName;
TxtIpaddress.Text = InformationHelper.GetIp4Address(MainWindow.MainInstance.ConfigSettings.ShowIpInfoOnlyInCorporateNetwork); TxtIpaddress.Text = InformationHelper.GetIp4Address(MainWindow.MainInstance.ConfigSettings.ShowIpInfoOnlyInCorporateNetwork);
DriveInfo[] dInfo = InformationHelper.GetDrives(); DriveInfo[] dInfo = InformationHelper.GetDrives();
TxtLastreboot.Text = InformationHelper.GetLastReboot().ToString(CultureInfo.CurrentUICulture); TxtLastreboot.Text = InformationHelper.GetLastReboot().ToString(CultureInfo.CurrentUICulture);
StPaDrives.Children.Clear();
StPaDrives2.Children.Clear();
int fixedDriveCount = 0;
foreach (DriveInfo drive in dInfo)
{
if (drive.DriveType == DriveType.Fixed)
fixedDriveCount++;
}
int cardsPerRow = fixedDriveCount <= 1 ? 1 : 2;
double availableDriveWidth = StPaDrives.Width > 0 ? StPaDrives.Width : 334;
double driveCardWidth = Math.Max(120, (availableDriveWidth / cardsPerRow) - 4);
int k = 0; int k = 0;
foreach (DriveInfo drive in dInfo) foreach (DriveInfo drive in dInfo)
{ {
if ((drive.DriveType == DriveType.Fixed)) if ((drive.DriveType == DriveType.Fixed))
{ {
Grid gri = new Grid { HorizontalAlignment = HorizontalAlignment.Center }; Grid gri = new Grid
Label lb = new Label { HorizontalAlignment = HorizontalAlignment.Center }; {
HorizontalAlignment = HorizontalAlignment.Stretch,
Width = driveCardWidth
};
Label lb = new Label
{
HorizontalAlignment = HorizontalAlignment.Stretch,
HorizontalContentAlignment = HorizontalAlignment.Center,
FontSize = 11,
Padding = new Thickness(2, 0, 2, 0)
};
StackPanel sp = new StackPanel StackPanel sp = new StackPanel
{ {
HorizontalAlignment = HorizontalAlignment.Center, HorizontalAlignment = HorizontalAlignment.Left,
Margin = new Thickness(10, 0, 0, 0) Margin = new Thickness((k % cardsPerRow) == 0 ? 0 : 8, 0, 0, 0),
Width = driveCardWidth
}; };
var pbg = new CustomProgressBar var pbg = new CustomProgressBar
{ {
@@ -174,10 +200,8 @@ namespace C4IT_CustomerPanel.UserControls
lb.Content = drive.Name + " - " + InformationHelper.FormatBytes(drive.TotalSize - drive.TotalFreeSpace, false) + " / " + InformationHelper.FormatBytes(drive.TotalSize, true); lb.Content = drive.Name + " - " + InformationHelper.FormatBytes(drive.TotalSize - drive.TotalFreeSpace, false) + " / " + InformationHelper.FormatBytes(drive.TotalSize, true);
lb.ToolTip = lb.Content; lb.ToolTip = lb.Content;
lb.ClipToBounds = true; lb.ClipToBounds = true;
sp.Width = StPaDrives.Width / dInfo.Length; pbg.Width = driveCardWidth;
pbg.Width = sp.Width;
pbg.Height = 20; pbg.Height = 20;
sp.HorizontalAlignment = HorizontalAlignment.Center;
sp.Orientation = Orientation.Vertical; sp.Orientation = Orientation.Vertical;
gri.Children.Add(pbg); gri.Children.Add(pbg);
pbg.ProgressValue = (int)((drive.TotalSize - drive.TotalFreeSpace) * 100 / drive.TotalSize); pbg.ProgressValue = (int)((drive.TotalSize - drive.TotalFreeSpace) * 100 / drive.TotalSize);
@@ -194,11 +218,7 @@ namespace C4IT_CustomerPanel.UserControls
k++; k++;
} }
} }
if (k <= 1) StPaDrives2.Visibility = k > 2 ? Visibility.Visible : Visibility.Collapsed;
{
// StPaDrives2.Height = 0;
// BtnRemoteSupport.Margin = new Thickness(0, -35, 0, 0);
}
} }
catch (Exception) catch (Exception)
{ {

View File

@@ -35,7 +35,24 @@
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<DockPanel Margin="-10,0,0,0"> <DockPanel Margin="-10,0,0,0">
<Image Margin="5,0,5,0" Source="pack://application:,,,/Resources/StateOverlays/OverlayNewContentButton.png" Panel.ZIndex="18" Stretch="None" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="{Binding Path=IsUnread, Converter={StaticResource BoolToVis}}" x:Name="signal" Width="12" Height="12" Cursor="Hand" ToolTip="{x:Static resx:Resources.removeMarkup}"/> <Image Margin="5,0,5,0"
Source="pack://application:,,,/Resources/StateOverlays/OverlayNewContentButton.png"
Panel.ZIndex="18"
Stretch="None"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Visibility="{Binding Path=IsUnread, Converter={StaticResource BoolToVis}}"
x:Name="signal"
Width="15"
Height="15"
Cursor="Hand"
ToolTip="{x:Static resx:Resources.removeMarkup}"
RenderTransformOrigin="0.5,0.5">
<Image.RenderTransform>
<ScaleTransform ScaleX="0.8"
ScaleY="0.8" />
</Image.RenderTransform>
</Image>
<TextBlock x:Name="txtTicketType" Margin="5,0,0,0" Grid.Column="0" HorizontalAlignment="Left" Text="{Binding Path=TicketType,FallbackValue='Störung'}" FontStyle="Italic" Foreground="{DynamicResource subtleTextColor}" Width="95"></TextBlock> <TextBlock x:Name="txtTicketType" Margin="5,0,0,0" Grid.Column="0" HorizontalAlignment="Left" Text="{Binding Path=TicketType,FallbackValue='Störung'}" FontStyle="Italic" Foreground="{DynamicResource subtleTextColor}" Width="95"></TextBlock>
</DockPanel> </DockPanel>
<DockPanel Grid.Column="1" Margin="10,0,0,0"> <DockPanel Grid.Column="1" Margin="10,0,0,0">