-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
109 lines (109 loc) · 6.04 KB
/
MainWindow.xaml
File metadata and controls
109 lines (109 loc) · 6.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<Window x:Class="GetWMIBasic.MainWindow"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:GetWMIBasic"
mc:Ignorable="d"
Title="Get WMI Basic"
Height="200"
Width="800"
MinWidth="600"
MaxWidth="1000"
ResizeMode="NoResize"
SizeToContent="WidthAndHeight">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="5*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<Menu IsMainMenu="True" >
<MenuItem Header="_File">
<MenuItem Header="Connect to _Another Computer" Click="ConnectToAnotherComputer_Button"></MenuItem>
<MenuItem Header="Exit" Click="Exit_Button"></MenuItem>
</MenuItem>
<MenuItem Header="Actions">
<MenuItem Header="Restart Machine" Click="Restart_Button"></MenuItem>
<MenuItem Header="Shutdown Machine" Click="Shutdown_Button"></MenuItem>
</MenuItem>
<MenuItem Header="View">
<MenuItem Header="Refresh" Click="Refresh_Button"></MenuItem>
</MenuItem>
<MenuItem Header="Try throw exception">
<MenuItem Header="Regular Exception" Click="RegularException_Click"></MenuItem>
<MenuItem Header="Critical Exception" Click="CriticalException_Click" ></MenuItem>
</MenuItem>
</Menu>
</Grid>
<Grid Grid.Row="1">
<Grid.Margin>
<Thickness Left="5" Right="5"></Thickness>
</Grid.Margin>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0">
<GroupBox Header="Hardware Information">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*" MinWidth="200"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0">BIOS Manufacturer</Label>
<TextBox IsReadOnly="True" x:Name="BIOS_Manufacturer" Grid.Row="0" Grid.Column="1" Background="#FFECECEC" VerticalAlignment="Center"></TextBox>
<Label Grid.Row="1" Grid.Column="0">BIOS Name</Label>
<TextBox IsReadOnly="True" x:Name="BIOS_Name" Grid.Row="1" Grid.Column="1" Background="#FFECECEC" VerticalAlignment="Center"></TextBox>
<Label Grid.Row="2" Grid.Column="0">BIOS S/N</Label>
<TextBox IsReadOnly="True" x:Name="BIOS_SN" Grid.Row="2" Grid.Column="1" Background="#FFECECEC" VerticalAlignment="Center"></TextBox>
<Label Grid.Row="3" Grid.Column="0">BIOS Version</Label>
<TextBox IsReadOnly="True" x:Name="BIOS_Version" Grid.Row="3" Grid.Column="1" Background="#FFECECEC" VerticalAlignment="Center"></TextBox>
</Grid>
</GroupBox>
</StackPanel>
<StackPanel Grid.Column="1">
<GroupBox Header="Operating System Information">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*" MinWidth="200"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0">Computer Name</Label>
<TextBox IsReadOnly="True" x:Name="Computer_Name" Grid.Row="0" Grid.Column="1" Background="#FFECECEC" VerticalAlignment="Center"></TextBox>
<Label Grid.Row="1" Grid.Column="0">Domain/Workgroup</Label>
<TextBox IsReadOnly="True" x:Name="Computer_Domain" Grid.Row="1" Grid.Column="1" Background="#FFECECEC" VerticalAlignment="Center"></TextBox>
<Label Grid.Row="2" Grid.Column="0">Physical Memory</Label>
<TextBox IsReadOnly="True" x:Name="Computer_Memory" Grid.Row="2" Grid.Column="1" Background="#FFECECEC" VerticalAlignment="Center"></TextBox>
<Label Grid.Row="3" Grid.Column="0">System Type</Label>
<TextBox IsReadOnly="True" x:Name="Computer_SysType" Grid.Row="3" Grid.Column="1" Background="#FFECECEC" VerticalAlignment="Center"></TextBox>
</Grid>
</GroupBox>
</StackPanel>
</Grid>
<Grid Grid.Row="2">
<Grid.Margin>
<Thickness Top="5" Left="5" Right="5" Bottom="5"></Thickness>
</Grid.Margin>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="9*"/>
</Grid.ColumnDefinitions>
<TextBlock Name="Bottom_Label" Grid.Column="0" VerticalAlignment="Center" Margin="10,0,10,0">Welcome</TextBlock>
<ProgressBar Name="Bottom_ProgressBar" Grid.Column="1" Height="20" VerticalAlignment="Center"></ProgressBar>
</Grid>
</Grid>
</Window>