-
Notifications
You must be signed in to change notification settings - Fork 28
/
MainWindow.xaml
206 lines (196 loc) · 14.5 KB
/
MainWindow.xaml
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<Window
x:Class="ITATKWinUI.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:ITATKWinUI"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid>
<!-- If Custom Title Bar isn't used, remove AppTitleBar Grid and custom RowDefinitions -->
<Grid.RowDefinitions>
<RowDefinition x:Name="TitleBarRow" Height="44"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid x:Name="AppTitleBar">
<Image Source="Assets/PowerShell5.png"
HorizontalAlignment="Left"
Width="16" Height="16"
Margin="8,0"/>
<TextBlock x:Name="AppTitleTextBlock" Text="IT Admin Toolkit"
TextWrapping="NoWrap"
VerticalAlignment="Center"
Margin="28,0,0,0"/>
<AutoSuggestBox QueryIcon="Find"
PlaceholderText="Search"
IsTabStop="False"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Width="400" Height="32" Visibility="Collapsed"/>
</Grid>
<Grid Grid.Row="1">
<StackPanel Name="LoadingStack" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="Loading..." Name="LoadingText" Width="150" TextAlignment="Center"/>
<ProgressBar Name="LoadingProgressBar" Width="150" IsIndeterminate="True" ShowPaused="False" ShowError="False" />
</StackPanel>
<NavigationView
Name="MainNav"
Visibility="Collapsed"
IsSettingsVisible="True"
IsBackButtonVisible="Collapsed"
IsBackEnabled="False"
SelectionChanged="MainNav_SelectionChanged"
AlwaysShowHeader="False"
PaneDisplayMode="Auto"
SelectionFollowsFocus="Disabled"
IsTabStop="False"
OpenPaneLength="250"
>
<NavigationView.MenuItems>
<NavigationViewItem Name="DashboardNavButton" Icon="Home" Content="Dashboard"/>
<!-- TODO: Add All Scripts functionality
<NavigationViewItem Name="AllScripts" Icon="ViewAll" Content="All Scripts" Visibility="Collapsed"/>-->
<NavigationViewItemSeparator />
<NavigationViewItemHeader Content="Categories"/>
</NavigationView.MenuItems>
<NavigationView.FooterMenuItems>
<NavigationViewItem Content="Reporting" Icon="Page2" />
<!-- TODO: Add in extra scheduling functionality
<NavigationViewItem Content="Scheduler" />
-->
</NavigationView.FooterMenuItems>
<!--
<NavigationView.AutoSuggestBox>
<AutoSuggestBox QueryIcon="Find" PlaceholderText="Search" TextChanged="AutoSuggestBox_TextChanged" QuerySubmitted="AutoSuggestBox_QuerySubmitted" SuggestionChosen="AutoSuggestBox_SuggestionChosen"/>
</NavigationView.AutoSuggestBox>-->
<SplitView IsPaneOpen="True" Name="ContentSplitView" OpenPaneLength="300" DisplayMode="Inline" PanePlacement="Right">
<SplitView.Pane>
<ScrollViewer ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollMode="Auto" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollMode="Auto" ZoomMode="Enabled" >
<StackPanel Name="SplitViewStackPanel">
<ProgressRing Name="MachineProgressRing" HorizontalAlignment="Center" IsActive="false" Width="25" Height="25" />
<TextBlock Text="(Querying Remote Machine)" Visibility="Collapsed" Name="MachineProgressCaption" HorizontalAlignment="Center" />
<StackPanel Name="AdditionalInfoPanel" Padding="10" HorizontalAlignment="Center">
<TextBlock Text="Machine Information" FontSize="16" HorizontalAlignment="Center"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<TextBlock Text="Machine:" VerticalAlignment="Center"/>
<TextBox IsReadOnly="True" Name="MachineName" Width="180" Margin="5" />
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<TextBlock Text="Model: " VerticalAlignment="Center"/>
<TextBox IsReadOnly="True" Name="MachineModel" Width="180" Margin="5" />
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<TextBlock Text="BIOS: " VerticalAlignment="Center"/>
<TextBox IsReadOnly="True" Name="MachineBIOS" Width="180" Margin="5" />
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<TextBlock Text="CPU: " VerticalAlignment="Center"/>
<TextBox IsReadOnly="True" Name="MachineCPU" Width="180" Margin="5" />
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<TextBlock Text="RAM (GB): " VerticalAlignment="Center"/>
<TextBox IsReadOnly="True" Name="MachineMemory" Width="180" Margin="5" />
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<TextBlock Text="Disk Size (GB): " VerticalAlignment="Center"/>
<TextBox IsReadOnly="True" Name="MachineDiskSize" Width="180" Margin="5" />
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<TextBlock Text="Disk Free (GB): " VerticalAlignment="Center"/>
<TextBox IsReadOnly="True" Name="MachineDiskFree" Width="180" Margin="5" />
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<TextBlock Text="Win Edition: " VerticalAlignment="Center" />
<TextBox IsReadOnly="True" Name="MachineWinEdition" Width="180" Margin="5" />
</StackPanel>
<!-- TODO: Will add at a later time -->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Visibility="Collapsed">
<TextBlock Text="Win Version: " VerticalAlignment="Center"/>
<TextBox IsReadOnly="True" Name="MachineWinVer" Width="180" Margin="5" />
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<TextBlock Text="OS Build: " VerticalAlignment="Center"/>
<TextBox IsReadOnly="True" Name="MachineOSBuild" Width="180" Margin="5" />
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<TextBlock Text="Domain: " VerticalAlignment="Center"/>
<TextBox IsReadOnly="True" Name="MachineDomain" Width="180" Margin="5" />
</StackPanel>
<!-- TODO: Will add at a later time -->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Visibility="Collapsed">
<TextBlock Text="AD OU: " VerticalAlignment="Center"/>
<TextBox IsReadOnly="True" Name="MachineOU" Width="180" Margin="5" />
</StackPanel>
<!-- TODO: Will add at a later time -->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Visibility="Collapsed">
<TextBlock Text="AAD Status: " VerticalAlignment="Center" />
<TextBox IsReadOnly="True" Name="MachineAADJoinStatus" Width="180" Margin="5" />
</StackPanel>
</StackPanel>
</StackPanel>
</ScrollViewer>
</SplitView.Pane>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto" x:Name="MachineInputRowConfig" />
<RowDefinition Height="*" x:Name="ContentFrameRowConfig" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollMode="Auto"/>
<RowDefinition Height="auto" x:Name="TerminalRowConfig" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollMode="Auto"/>
<RowDefinition Height="auto" x:Name="StatusRowConfig" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollMode="Auto"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" Name="MachineInputs" HorizontalAlignment="Right" Grid.Row="0">
<SymbolIcon Name="PingSymbol" Visibility="Collapsed" Symbol="Target" />
<!--<ComboBox IsEditable="True" Width="200" PlaceholderText="Machine" HorizontalAlignment="Right" Margin="5" Name="MachineComboBox" SelectionChanged="MachineComboBox_SelectionChanged" />-->
<TextBox Name="MachineComboBox" Margin="5" PlaceholderText="Machine" HorizontalAlignment="Right" Width="200" TextChanged="MachineComboBox_TextChangedAsync" IsSpellCheckEnabled="False" />
<TeachingTip x:Name="MachineInputTeachingTip" Title="Important" Subtitle="The selected script requires machine input, please provide a target then try again.">
<TeachingTip.IconSource>
<SymbolIconSource Symbol="Download" />
</TeachingTip.IconSource>
</TeachingTip>
<TextBox Name="MultipleMachineInput" Width="200" Height="175" HorizontalAlignment="Right" Margin="5" Visibility="Collapsed" PlaceholderText="Machines (1 per line)" IsSpellCheckEnabled="False" TextWrapping="Wrap" AcceptsReturn="True" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollMode="Auto" TextChanged="MultipleMachineInput_TextChanged" />
<StackPanel Orientation="Horizontal" VerticalAlignment="Top">
<StackPanel>
<ToggleButton Name="MachineMultipleToggleButton" Click="MachineMultipleToggleButton_Click" ToolTipService.ToolTip="Toggle Multiple" Margin="0,5,5,5">
<SymbolIcon Symbol="Orientation" />
</ToggleButton>
<Button Name="MachineMultipleClearButton" Click="MachineMultipleClearButton_Click" ToolTipService.ToolTip="Clear Input" Margin="0,0,5,5" Visibility="Collapsed">
<SymbolIcon Symbol="Clear" />
</Button>
</StackPanel>
<ToggleButton Name="MachineDetailsToggleButton" Click="MachineDetailsToggleButton_Click" ToolTipService.ToolTip="Toggle Information Pane" Margin="0,5,5,5">
<SymbolIcon Symbol="OpenPane" />
</ToggleButton>
</StackPanel>
</StackPanel>
<ScrollViewer Grid.Row="1" x:Name="ContentFrameScrollViewer" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollMode="Auto" ZoomMode="Enabled" >
<Frame x:Name="contentFrame" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollMode="Auto" Grid.Row="1" />
</ScrollViewer>
<StackPanel Grid.Row="2" x:Name="TerminalRow" Visibility="Collapsed">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<Button Name="CopyTerminal" Click="CopyTerminal_Click" ToolTipService.ToolTip="Copy Output" Width="20" Height="20" Padding="0" Margin="5,0,0,0">
<TextBlock FontSize="16" Text="" FontFamily="Segoe MDL2 Assets" />
</Button>
<Button Name="ClearTerminal" Click="ClearTerminal_Click" ToolTipService.ToolTip="Clear Terminal" Width="20" Height="20" Padding="0" Margin="5,0,0,0">
<TextBlock FontSize="16" Text="" FontFamily="Segoe MDL2 Assets" />
</Button>
<Button Name="FullScreenTerminal" Click="FullScreenTerminal_Click" ToolTipService.ToolTip="Full Screen" Width="20" Height="20" Padding="0" Margin="5">
<TextBlock FontSize="16" Text="" FontFamily="Segoe MDL2 Assets" />
</Button>
</StackPanel>
<TextBox Height="150" x:Name="ScriptTerminal" Visibility="Collapsed" Text="{x:Bind Path=local:MainWindow.MyText}" Padding="10,0,10,10" HorizontalAlignment="Stretch" IsReadOnly="True" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollMode="Auto" TextWrapping="Wrap" x:FieldModifier="Public" />
</StackPanel>
<Grid x:Name="StatusRow" Grid.Row="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="27" />
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<ToggleButton Name="HideScriptTerminal" Click="HideScriptTerminal_Click" ToolTipService.ToolTip="Toggle Terminal" Width="25" Height="25" Padding="0" Grid.Column="0" IsChecked="false" Margin="1" Visibility="Collapsed">
<SymbolIcon Symbol="GoToStart"/>
</ToggleButton>
<ProgressBar Width="100" x:Name="StatusProgressBar" IsIndeterminate="True" Grid.Column="1" HorizontalAlignment="Right" Visibility="Collapsed"/>
</Grid>
</Grid>
</SplitView>
</NavigationView>
</Grid>
</Grid>
</Window>