Files
CustomerPanel-Test/UserControls/ComputerInformation.xaml

399 lines
18 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,3" />
<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>
</UserControl.Resources>
<!--ComputerInformation-->
<Grid x:Name="GridInfo" x:FieldModifier="private"
Width="500"
Canvas.Left="512"
Canvas.Top="10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100*" />
<ColumnDefinition Width="185*" />
<ColumnDefinition Width="134*" />
<ColumnDefinition Width="51*" />
<ColumnDefinition Width="30*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="7*" />
<RowDefinition Height="7*" />
<RowDefinition Height="7*" />
<RowDefinition Height="7*" />
<RowDefinition Height="7*" />
<RowDefinition Height="7*" />
<RowDefinition Height="7*" />
<RowDefinition Height="7*" />
</Grid.RowDefinitions>
<Canvas Grid.Column="1"
Grid.ColumnSpan="3"
Grid.Row="1"
Height="70">
<Image Source="{DynamicResource appbar_monitor}"
Height="34"
x:Name="icoComputer_Inline" x:FieldModifier="private" />
<Label Foreground="{DynamicResource sectionTitleColor}"
x:Name="LblComputername" x:FieldModifier="private"
Content="{x:Static resx:Resources.computername}"
FontSize="16"
Canvas.Top="10"
Canvas.Left="40" />
<TextBox Canvas.Left="15"
Width="300"
FontSize="16"
VerticalAlignment="Center"
Style="{StaticResource InfoTextBoxStyle}"
x:Name="TxtComputername" x:FieldModifier="private"
IsReadOnly="true"
Canvas.Top="45"
Height="25"
PreviewMouseDoubleClick="Info_TXT_OnMouseDoubleClick" />
<Image Cursor="Hand"
Source="{DynamicResource appbar_page_copy}"
Height="25"
x:Name="icoCopyComputer" x:FieldModifier="private"
Tag="MAINICO"
HorizontalAlignment="Right"
Canvas.Left="315"
Canvas.Top="45"
Width="28"
PreviewMouseDown="ClickCopyIcon" />
</Canvas>
<Canvas Grid.Column="1"
Grid.ColumnSpan="3"
Grid.Row="2"
Height="70">
<Image Source="{DynamicResource appbar_network}"
Height="34"
x:Name="icoNetwork_Inline" x:FieldModifier="private" />
<Label Foreground="{DynamicResource sectionTitleColor}"
FontSize="16"
x:Name="LblIpaddress" x:FieldModifier="private"
Content="{x:Static resx:Resources.ipaddress}"
Canvas.Top="10"
Canvas.Left="40" />
<TextBox Canvas.Left="15"
Width="300"
Height="25"
VerticalAlignment="Center"
FontSize="16"
Style="{StaticResource InfoTextBoxStyle}"
x:Name="TxtIpaddress" x:FieldModifier="private"
IsReadOnly="true"
Canvas.Top="45"
PreviewMouseDoubleClick="Info_TXT_OnMouseDoubleClick" />
<Image Cursor="Hand"
Source="{DynamicResource appbar_page_copy}"
Height="25"
x:Name="icoCopyNetwork" x:FieldModifier="private"
Tag="MAINICO"
HorizontalAlignment="Right"
Canvas.Left="312"
Canvas.Top="45"
Width="28"
PreviewMouseDown="ClickCopyIcon" />
</Canvas>
<Canvas Grid.Column="1"
Grid.ColumnSpan="3"
Grid.Row="3"
Height="70"
x:Name="CanvasHostname" x:FieldModifier="private">
<Image Source="{DynamicResource appbar_remotehost}"
Height="34"
x:Name="icoHost_Inline" x:FieldModifier="private"/>
<Label Foreground="{DynamicResource sectionTitleColor}"
x:Name="LblHostname" x:FieldModifier="private"
Content="{x:Static resx:Resources.Hostname}"
FontSize="16"
Canvas.Top="10"
Canvas.Left="40" />
<TextBox Canvas.Left="15"
Width="300"
FontSize="16"
VerticalAlignment="Center"
Style="{StaticResource InfoTextBoxStyle}"
x:Name="TxtHostname" x:FieldModifier="private"
IsReadOnly="true"
Canvas.Top="45"
Height="25"
PreviewMouseDoubleClick="Info_TXT_OnMouseDoubleClick" />
<Image Cursor="Hand"
Source="{DynamicResource appbar_page_copy}"
Height="25"
x:Name="icoCopyHost" x:FieldModifier="private"
Tag="MAINICO"
HorizontalAlignment="Right"
Canvas.Left="315"
Canvas.Top="45"
Width="28"
PreviewMouseDown="ClickCopyIcon" />
</Canvas>
<Canvas Grid.Column="1"
Grid.ColumnSpan="3"
Grid.Row="4"
Height="70">
<Image Source="{DynamicResource appbar_people}"
Height="34"
x:Name="icoUser_Inline" x:FieldModifier="private" />
<Label Foreground="{DynamicResource sectionTitleColor}"
FontSize="16"
x:Name="LblUsername" x:FieldModifier="private"
Content="{x:Static resx:Resources.username}"
Canvas.Top="10"
Canvas.Left="40" />
<TextBox Canvas.Left="15"
Width="300"
Height="25"
VerticalAlignment="Center"
FontSize="16"
Style="{StaticResource InfoTextBoxStyle}"
x:Name="TxtUsername" x:FieldModifier="private"
IsEnabled="true"
IsReadOnly="true"
Canvas.Top="45"
PreviewMouseDoubleClick="Info_TXT_OnMouseDoubleClick" />
<Image Cursor="Hand"
Source="{DynamicResource appbar_page_copy}"
Height="25"
x:Name="icoCopyUser" x:FieldModifier="private"
Tag="MAINICO"
HorizontalAlignment="Right"
Canvas.Left="312"
Canvas.Top="45"
Width="28"
PreviewMouseDown="ClickCopyIcon" />
</Canvas>
<Canvas Grid.Column="1"
Grid.ColumnSpan="3"
Grid.Row="5"
Height="70">
<Image Source="{DynamicResource appbar_reset}"
Height="34"
x:Name="icoRestart_Inline" x:FieldModifier="private"
Tag="MAINICO" />
<Label Foreground="{DynamicResource sectionTitleColor}"
FontSize="16"
x:Name="LblLastreboot" x:FieldModifier="private"
Content="{x:Static resx:Resources.lastreboot}"
Canvas.Top="10"
Canvas.Left="40" />
<TextBox Canvas.Left="15"
Width="300"
Height="25"
VerticalAlignment="Center"
FontSize="16"
Style="{StaticResource InfoTextBoxStyle}"
x:Name="TxtLastreboot" x:FieldModifier="private"
IsReadOnly="true"
Canvas.Top="45"
MouseDoubleClick="Info_TXT_OnMouseDoubleClick" />
<Image Cursor="Hand"
Source="{DynamicResource appbar_page_copy}"
Height="25"
x:Name="icoCopyRestart" x:FieldModifier="private"
Tag="MAINICO"
HorizontalAlignment="Right"
Canvas.Left="312"
Canvas.Top="45"
Width="28"
PreviewMouseDown="ClickCopyIcon" />
</Canvas>
<Canvas Grid.Column="1"
Grid.ColumnSpan="3"
Grid.Row="6"
Height="70">
<Image Source="{DynamicResource appbar_folder_ellipsis}"
Height="34"
x:Name="icoDrive_Inline" x:FieldModifier="private"
Tag="MAINICO" />
<Label Foreground="{DynamicResource sectionTitleColor}"
x:Name="LblDrives" x:FieldModifier="private"
Content="{x:Static resx:Resources.drives}"
FontSize="16"
Canvas.Top="10"
Canvas.Left="40" />
<StackPanel Canvas.Left="15"
Canvas.Top="40"
Orientation="Vertical"
Width="300">
<StackPanel x:Name="StPaDrives" x:FieldModifier="private"
CanHorizontallyScroll="True"
CanVerticallyScroll="True"
MinHeight="30"
HorizontalAlignment="Center"
VerticalAlignment="Stretch"
MaxHeight="30"
Orientation="Horizontal" />
<StackPanel x:Name="StPaDrives2" x:FieldModifier="private"
CanHorizontallyScroll="True"
CanVerticallyScroll="True"
MinHeight="30"
HorizontalAlignment="Center"
VerticalAlignment="Stretch"
MaxHeight="30"
Orientation="Horizontal" />
</StackPanel>
</Canvas>
<Canvas Grid.Column="1"
Grid.ColumnSpan="3"
Grid.Row="7"
Height="70">
<Label Content="{x:Static resx:Resources.genReportHeader}"
Foreground="{DynamicResource sectionTitleColor}"
Canvas.Left="53"
Canvas.Top="15"
FontSize="16"
HorizontalAlignment="Center"
VerticalAlignment="Top" />
<Grid Width="300"
Canvas.Left="15"
Canvas.Top="50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="43*" />
<ColumnDefinition Width="57*" />
</Grid.ColumnDefinitions>
<Button Foreground="{DynamicResource buttonTextColor}"
HorizontalAlignment="Left"
Style="{StaticResource ButtonStyle}"
Width="250"
Height="40"
x:Name="BtnClientReport" x:FieldModifier="private"
Content="{x:Static resx:Resources.genReport}"
FontSize="18"
Click="OnReportClicked"
Grid.ColumnSpan="2"
Margin="25,0,0,0" />
</Grid>
<Grid Width="300"
Canvas.Left="15"
Canvas.Top="110">
<Button Foreground="{DynamicResource buttonTextColor}"
HorizontalAlignment="Center"
Style="{StaticResource ButtonStyle}"
Width="250"
Height="40"
x:Name="BtnRemoteSupport" x:FieldModifier="private"
Tag="LABEL"
Content="Remote Support"
FontSize="18"
Click="OnRemoteSupportClicked"
Visibility="Visible" />
</Grid>
<Grid Panel.ZIndex="100"
x:Name="PRGSGrid" x:FieldModifier="private"
Visibility="Hidden"
Canvas.Left="90"
Canvas.Top="57">
<uctrl:CustomProgressBar x:Name="PRGS" x:FieldModifier="private"
Visibility="Visible"
Canvas.Left="300"
Width="150"
Height="25"
VerticalAlignment="Bottom" />
<TextBlock x:Name="PRGSText" x:FieldModifier="private"
Text=""
HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Grid>
<Label x:Name="LblCustomerPanelVersion" x:FieldModifier="private"
FontSize="12"
Margin="115 205 0 0" />
</Canvas>
<Canvas Margin="150 0 0 0"
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>
</Grid>
<!--ComputerInformation-->
</UserControl>