Files
CustomerPanel-Test/UserControls/ComputerInformation.xaml

427 lines
20 KiB
XML

<UserControl x:Class="C4IT_CustomerPanel.UserControls.ComputerInformation"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:resx="clr-namespace:C4IT_CustomerPanel.Properties"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:uctrl="clr-namespace:C4IT_CustomerPanel.UserControls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:C4IT_CustomerPanel.UserControls"
mc:Ignorable="d"
d:DesignHeight="450"
d:DesignWidth="800">
<UserControl.Resources>
<Style TargetType="Button"
x:Key="ButtonStyle">
<Setter Property="Foreground"
Value="{DynamicResource buttonTextColor}" />
<Setter Property="Background"
Value="{DynamicResource inactiveButtonColor}" />
<Setter Property="BorderBrush"
Value="{DynamicResource panelBorderColor}" />
<Setter Property="BorderThickness"
Value="1" />
<Setter Property="Padding"
Value="12,6" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="10">
<ContentPresenter HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="{TemplateBinding Padding}" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver"
Value="True">
<Setter Property="Background"
Value="{DynamicResource activeButtonColor}" />
<Setter Property="Foreground"
Value="White" />
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="InfoTextBoxStyle"
TargetType="{x:Type TextBox}">
<Setter Property="Foreground"
Value="{DynamicResource sectionTitleColor}" />
<Setter Property="Background"
Value="{DynamicResource inputBackgroundColor}" />
<Setter Property="BorderBrush"
Value="{DynamicResource inputBorderColor}" />
<Setter Property="BorderThickness"
Value="1" />
<Setter Property="Padding"
Value="8,0" />
<Setter Property="VerticalContentAlignment"
Value="Center" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="8">
<ScrollViewer x:Name="PART_ContentHost" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="InfoRowIconStyle"
TargetType="{x:Type Image}">
<Setter Property="Width"
Value="48" />
<Setter Property="Height"
Value="48" />
<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="Padding"
Value="0" />
<Setter Property="Margin"
Value="0" />
<Setter Property="Height"
Value="22" />
<Setter Property="VerticalContentAlignment"
Value="Center" />
<Setter Property="HorizontalContentAlignment"
Value="Left" />
<Setter Property="Canvas.Left"
Value="64" />
<Setter Property="Canvas.Top"
Value="10" />
</Style>
<Style x:Key="InfoRowValueStyle"
TargetType="{x:Type TextBox}"
BasedOn="{StaticResource InfoTextBoxStyle}">
<Setter Property="Width"
Value="300" />
<Setter Property="Height"
Value="25" />
<Setter Property="FontSize"
Value="16" />
<Setter Property="Canvas.Left"
Value="15" />
<Setter Property="Canvas.Top"
Value="33" />
</Style>
<Style x:Key="InfoRowCopyStyle"
TargetType="{x:Type Image}">
<Setter Property="Cursor"
Value="Hand" />
<Setter Property="Width"
Value="28" />
<Setter Property="Height"
Value="25" />
<Setter Property="Canvas.Left"
Value="312" />
<Setter Property="Canvas.Top"
Value="33" />
</Style>
</UserControl.Resources>
<Grid x:Name="GridInfo"
x:FieldModifier="private"
Width="500">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100*" />
<ColumnDefinition Width="185*" />
<ColumnDefinition Width="185*" />
<ColumnDefinition Width="30*" />
</Grid.ColumnDefinitions>
<Canvas x:Name="CanvasInfo"
Grid.Column="1"
Grid.ColumnSpan="2"
Height="560">
<Image Source="{DynamicResource appbar_information}"
Width="32"
Height="32"
Canvas.Top="8"
Tag="MAINICO" />
<Label Foreground="{DynamicResource sectionTitleColor}"
Content="{x:Static resx:Resources.information}"
FontSize="19"
FontWeight="SemiBold"
Canvas.Top="8"
Height="32"
VerticalContentAlignment="Center"
Padding="0"
Canvas.Left="40" />
<StackPanel Canvas.Top="56"
Canvas.Left="0"
Width="350">
<Canvas Width="350"
Height="60"
Margin="0,0,0,8">
<Image Source="{DynamicResource appbar_monitor}"
Style="{StaticResource InfoRowIconStyle}"
x:Name="icoComputer_Inline"
x:FieldModifier="private" />
<Label x:Name="LblComputername"
x:FieldModifier="private"
Style="{StaticResource InfoRowLabelStyle}"
Content="{x:Static resx:Resources.computername}" />
<TextBox x:Name="TxtComputername"
x:FieldModifier="private"
Style="{StaticResource InfoRowValueStyle}"
IsReadOnly="true"
PreviewMouseDoubleClick="Info_TXT_OnMouseDoubleClick" />
<Image x:Name="icoCopyComputer"
x:FieldModifier="private"
Style="{StaticResource InfoRowCopyStyle}"
Source="{DynamicResource appbar_page_copy}"
Tag="MAINICO"
PreviewMouseDown="ClickCopyIcon" />
</Canvas>
<Canvas Width="350"
Height="60"
Margin="0,0,0,8">
<Image Source="{DynamicResource appbar_network}"
Style="{StaticResource InfoRowIconStyle}"
x:Name="icoNetwork_Inline"
x:FieldModifier="private" />
<Label x:Name="LblIpaddress"
x:FieldModifier="private"
Style="{StaticResource InfoRowLabelStyle}"
Content="{x:Static resx:Resources.ipaddress}" />
<TextBox x:Name="TxtIpaddress"
x:FieldModifier="private"
Style="{StaticResource InfoRowValueStyle}"
IsReadOnly="true"
PreviewMouseDoubleClick="Info_TXT_OnMouseDoubleClick" />
<Image x:Name="icoCopyNetwork"
x:FieldModifier="private"
Style="{StaticResource InfoRowCopyStyle}"
Source="{DynamicResource appbar_page_copy}"
Tag="MAINICO"
PreviewMouseDown="ClickCopyIcon" />
</Canvas>
<Canvas Width="350"
Height="60"
Margin="0,0,0,8"
x:Name="CanvasHostname"
x:FieldModifier="private">
<Image Source="{DynamicResource appbar_remotehost}"
Style="{StaticResource InfoRowIconStyle}"
x:Name="icoHost_Inline"
x:FieldModifier="private" />
<Label x:Name="LblHostname"
x:FieldModifier="private"
Style="{StaticResource InfoRowLabelStyle}"
Content="{x:Static resx:Resources.Hostname}" />
<TextBox x:Name="TxtHostname"
x:FieldModifier="private"
Style="{StaticResource InfoRowValueStyle}"
IsReadOnly="true"
PreviewMouseDoubleClick="Info_TXT_OnMouseDoubleClick" />
<Image x:Name="icoCopyHost"
x:FieldModifier="private"
Style="{StaticResource InfoRowCopyStyle}"
Source="{DynamicResource appbar_page_copy}"
Tag="MAINICO"
PreviewMouseDown="ClickCopyIcon" />
</Canvas>
<Canvas Width="350"
Height="60"
Margin="0,0,0,8">
<Image Source="{DynamicResource appbar_people}"
Style="{StaticResource InfoRowIconStyle}"
x:Name="icoUser_Inline"
x:FieldModifier="private" />
<Label x:Name="LblUsername"
x:FieldModifier="private"
Style="{StaticResource InfoRowLabelStyle}"
Content="{x:Static resx:Resources.username}" />
<TextBox x:Name="TxtUsername"
x:FieldModifier="private"
Style="{StaticResource InfoRowValueStyle}"
IsEnabled="true"
IsReadOnly="true"
PreviewMouseDoubleClick="Info_TXT_OnMouseDoubleClick" />
<Image x:Name="icoCopyUser"
x:FieldModifier="private"
Style="{StaticResource InfoRowCopyStyle}"
Source="{DynamicResource appbar_page_copy}"
Tag="MAINICO"
PreviewMouseDown="ClickCopyIcon" />
</Canvas>
<Canvas Width="350"
Height="60"
Margin="0,0,0,10">
<Image Source="{DynamicResource appbar_reset}"
Style="{StaticResource InfoRowIconStyle}"
x:Name="icoRestart_Inline"
x:FieldModifier="private"
Tag="MAINICO" />
<Label x:Name="LblLastreboot"
x:FieldModifier="private"
Style="{StaticResource InfoRowLabelStyle}"
Content="{x:Static resx:Resources.lastreboot}" />
<TextBox x:Name="TxtLastreboot"
x:FieldModifier="private"
Style="{StaticResource InfoRowValueStyle}"
IsReadOnly="true"
MouseDoubleClick="Info_TXT_OnMouseDoubleClick" />
<Image x:Name="icoCopyRestart"
x:FieldModifier="private"
Style="{StaticResource InfoRowCopyStyle}"
Source="{DynamicResource appbar_page_copy}"
Tag="MAINICO"
PreviewMouseDown="ClickCopyIcon" />
</Canvas>
<Canvas Width="350"
Height="86"
Margin="0,0,0,18">
<Image Source="{DynamicResource appbar_folder_ellipsis}"
Style="{StaticResource InfoRowIconStyle}"
x:Name="icoDrive_Inline"
x:FieldModifier="private"
Tag="MAINICO" />
<Label x:Name="LblDrives"
x:FieldModifier="private"
Style="{StaticResource InfoRowLabelStyle}"
Content="{x:Static resx:Resources.drives}" />
<StackPanel Canvas.Left="8"
Canvas.Top="24"
Orientation="Vertical"
Width="334">
<StackPanel x:Name="StPaDrives"
x:FieldModifier="private"
Width="334"
CanHorizontallyScroll="True"
CanVerticallyScroll="True"
MinHeight="30"
MaxHeight="30"
HorizontalAlignment="Left"
VerticalAlignment="Stretch"
Orientation="Horizontal" />
<StackPanel x:Name="StPaDrives2"
x:FieldModifier="private"
Width="334"
CanHorizontallyScroll="True"
CanVerticallyScroll="True"
MinHeight="30"
MaxHeight="30"
HorizontalAlignment="Left"
VerticalAlignment="Stretch"
Orientation="Horizontal" />
</StackPanel>
</Canvas>
<Canvas Width="350"
Height="110">
<Label Content="{x:Static resx:Resources.genReportHeader}"
Foreground="{DynamicResource sectionTitleColor}"
FontSize="16"
Width="334"
Canvas.Left="8"
Canvas.Top="0"
HorizontalContentAlignment="Center" />
<Button Foreground="{DynamicResource buttonTextColor}"
Style="{DynamicResource PrimaryActionButtonStyle}"
Width="250"
Height="36"
x:Name="BtnClientReport"
x:FieldModifier="private"
Content="{x:Static resx:Resources.genReport}"
FontSize="16"
Click="OnReportClicked"
Canvas.Left="50"
Canvas.Top="24" />
<Button Foreground="{DynamicResource buttonTextColor}"
Style="{StaticResource ButtonStyle}"
Background="{DynamicResource activeButtonColor}"
Width="250"
Height="36"
x:Name="BtnRemoteSupport"
x:FieldModifier="private"
Tag="LABEL"
Content="Remote Support"
FontSize="16"
Click="OnRemoteSupportClicked"
Visibility="Visible"
Canvas.Left="50"
Canvas.Top="66" />
<Grid Panel.ZIndex="100"
x:Name="PRGSGrid"
x:FieldModifier="private"
Visibility="Hidden"
Canvas.Left="100"
Canvas.Top="29">
<uctrl:CustomProgressBar x:Name="PRGS"
x:FieldModifier="private"
Visibility="Visible"
Width="150"
Height="25"
VerticalAlignment="Bottom" />
<TextBlock x:Name="PRGSText"
x:FieldModifier="private"
Text=""
HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Grid>
</Canvas>
</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.Top="10"
x:Name="copied"
x:FieldModifier="private"
Opacity="0"
Visibility="Collapsed">
<Border BorderThickness="1"
BorderBrush="{DynamicResource panelBorderColor}"
CornerRadius="10"
Background="{DynamicResource cardBackgroundColor}"
Width="250"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Panel.ZIndex="100">
<TextBlock Text="{x:Static resx:Resources.copied}"
Foreground="{DynamicResource sectionTitleColor}"
FontSize="15"
Height="25"
VerticalAlignment="Center"
HorizontalAlignment="Center" />
</Border>
</Canvas>
</Canvas>
</Grid>
</UserControl>