UI/Console/HDTNewSequence.xaml
|
<!--
MDT'S New Task Sequence WIZARD, on one page. MDT SPREADS THIS OVER SEVEN PAGES - General Settings, Select Template, Select OS, Product Key, OS Settings, Admin Password, Summary - and every one of them carries Next, Back and Cancel. Seven pages is right when each holds a branching decision; here they hold nine boxes between them, and the wizard's own furniture would be most of what is on screen. ONE PAGE ALSO MEANS THE SUMMARY IS THE PAGE. MDT's Summary exists because by page seven nobody remembers page two; there is nothing to summarise when it is all still visible. WHAT IS ABSENT: MDT's Product Key page. This engine has no product-key handling, and a box that wrote a key nothing reads would be worse than its absence - see DESIGN 12, a window may not do anything the cmdlets cannot. NO x:Class AND NO CODE-BEHIND, as every other window here. Handlers are attached in PowerShell, by name. --> <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="New Task Sequence" Width="620" Height="620" WindowStartupLocation="CenterOwner" ResizeMode="NoResize" ShowInTaskbar="False" Background="{DynamicResource HDTWindowBrush}" FontFamily="Segoe UI" FontSize="12"> <Window.Resources> <Style TargetType="TextBlock" x:Key="HDTFieldLabel"> <Setter Property="Foreground" Value="{DynamicResource HDTPanelTextBrush}" /> <Setter Property="FontSize" Value="12" /> <Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="Margin" Value="0,0,10,10" /> </Style> <Style TargetType="TextBox"> <Setter Property="Background" Value="{DynamicResource HDTPanelBrush}" /> <Setter Property="Foreground" Value="{DynamicResource HDTPanelTextBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource HDTBorderBrush}" /> <Setter Property="BorderThickness" Value="1" /> <Setter Property="Padding" Value="6,5,6,5" /> <Setter Property="Margin" Value="0,0,0,10" /> <Setter Property="VerticalContentAlignment" Value="Center" /> </Style> <Style TargetType="ComboBox"> <!-- AND IT MUST NOT LOOK READ-ONLY. WPF's default ComboBox template paints its own grey chrome and ignores Background, so a dropdown beside white boxes reads as a disabled one. IsEditable puts a real text box in the closed control, which takes the Background; IsReadOnly keeps it from being typed into. No ComboBox here uses an ItemTemplate, so what it shows is what it showed before. --> <Setter Property="IsEditable" Value="True" /> <Setter Property="IsReadOnly" Value="True" /> <Setter Property="Background" Value="{DynamicResource HDTPanelBrush}" /> <Setter Property="Foreground" Value="{DynamicResource HDTPanelTextBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource HDTBorderBrush}" /> <Setter Property="BorderThickness" Value="1" /> <Setter Property="Margin" Value="0,0,0,10" /> </Style> <!-- THE ? THE EDITOR'S PAGES USE. A Border rather than a bare glyph because WPF raises a tooltip only over what is painted. --> <Style TargetType="Border" x:Key="HDTHelpDot"> <Setter Property="Background" Value="Transparent" /> <Setter Property="Width" Value="22" /> <Setter Property="Height" Value="22" /> <Setter Property="CornerRadius" Value="11" /> <Setter Property="BorderBrush" Value="{DynamicResource HDTBorderBrush}" /> <Setter Property="BorderThickness" Value="1" /> <Setter Property="HorizontalAlignment" Value="Right" /> <Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="Cursor" Value="Help" /> <Setter Property="Margin" Value="0,0,0,10" /> <Setter Property="ToolTipService.ShowDuration" Value="60000" /> <Setter Property="ToolTipService.InitialShowDelay" Value="200" /> </Style> <Style TargetType="TextBlock" x:Key="HDTHelpGlyph"> <Setter Property="Text" Value="?" /> <Setter Property="Foreground" Value="{DynamicResource HDTLabelBrush}" /> <Setter Property="FontSize" Value="12" /> <Setter Property="FontWeight" Value="Bold" /> <Setter Property="HorizontalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" /> </Style> </Window.Resources> <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="*" /> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <!-- The console's banner, so this reads as part of the same tool. --> <Border Grid.Row="0" Background="{DynamicResource HDTBannerBrush}" Padding="16,12,16,12"> <StackPanel> <TextBlock x:Name="HDTNewSequenceTitleText" Foreground="{DynamicResource HDTBannerTextBrush}" FontSize="18" FontWeight="SemiBold" /> <TextBlock x:Name="HDTNewSequenceRootText" Foreground="{DynamicResource HDTBannerLabelBrush}" FontFamily="Consolas, Courier New" FontSize="11" Margin="0,3,0,0" TextTrimming="CharacterEllipsis" /> </StackPanel> </Border> <Grid Grid.Row="1" Margin="16,14,16,0"> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="150" /> <ColumnDefinition Width="*" /> <ColumnDefinition Width="30" /> </Grid.ColumnDefinitions> <TextBlock Grid.Row="0" Grid.Column="0" x:Name="HDTNewSequenceIdLabel" Style="{StaticResource HDTFieldLabel}" /> <TextBox Grid.Row="0" Grid.Column="1" x:Name="HDTNewSequenceIdBox" FontFamily="Consolas, Courier New" /> <Border Grid.Row="0" Grid.Column="2" Style="{StaticResource HDTHelpDot}"> <Border.ToolTip> <ToolTip MaxWidth="380"> <TextBlock TextWrapping="Wrap" x:Name="HDTNewSequenceIdHint" /> </ToolTip> </Border.ToolTip> <TextBlock Style="{StaticResource HDTHelpGlyph}" /> </Border> <TextBlock Grid.Row="1" Grid.Column="0" x:Name="HDTNewSequenceNameLabel" Style="{StaticResource HDTFieldLabel}" /> <TextBox Grid.Row="1" Grid.Column="1" x:Name="HDTNewSequenceNameBox" /> <Border Grid.Row="1" Grid.Column="2" Style="{StaticResource HDTHelpDot}"> <Border.ToolTip> <ToolTip MaxWidth="380"> <TextBlock TextWrapping="Wrap" x:Name="HDTNewSequenceNameHint" /> </ToolTip> </Border.ToolTip> <TextBlock Style="{StaticResource HDTHelpGlyph}" /> </Border> <TextBlock Grid.Row="2" Grid.Column="0" x:Name="HDTNewSequenceTemplateLabel" Style="{StaticResource HDTFieldLabel}" /> <ComboBox Grid.Row="2" Grid.Column="1" x:Name="HDTNewSequenceTemplateBox" DisplayMemberPath="Name" SelectedValuePath="Id" /> <Border Grid.Row="2" Grid.Column="2" Style="{StaticResource HDTHelpDot}"> <Border.ToolTip> <ToolTip MaxWidth="380"> <TextBlock TextWrapping="Wrap" x:Name="HDTNewSequenceTemplateHint" /> </ToolTip> </Border.ToolTip> <TextBlock Style="{StaticResource HDTHelpGlyph}" /> </Border> <TextBlock Grid.Row="3" Grid.Column="0" x:Name="HDTNewSequenceImageLabel" Style="{StaticResource HDTFieldLabel}" /> <ComboBox Grid.Row="3" Grid.Column="1" x:Name="HDTNewSequenceImageBox" DisplayMemberPath="Display" SelectedValuePath="Id" /> <Border Grid.Row="3" Grid.Column="2" Style="{StaticResource HDTHelpDot}"> <Border.ToolTip> <ToolTip MaxWidth="380"> <TextBlock TextWrapping="Wrap" x:Name="HDTNewSequenceImageHint" /> </ToolTip> </Border.ToolTip> <TextBlock Style="{StaticResource HDTHelpGlyph}" /> </Border> <TextBlock Grid.Row="4" Grid.Column="0" x:Name="HDTNewSequenceFullNameLabel" Style="{StaticResource HDTFieldLabel}" /> <TextBox Grid.Row="4" Grid.Column="1" x:Name="HDTNewSequenceFullNameBox" /> <Border Grid.Row="4" Grid.Column="2" Style="{StaticResource HDTHelpDot}"> <Border.ToolTip> <ToolTip MaxWidth="380"> <TextBlock TextWrapping="Wrap" x:Name="HDTNewSequenceFullNameHint" /> </ToolTip> </Border.ToolTip> <TextBlock Style="{StaticResource HDTHelpGlyph}" /> </Border> <TextBlock Grid.Row="5" Grid.Column="0" x:Name="HDTNewSequenceOrgLabel" Style="{StaticResource HDTFieldLabel}" /> <TextBox Grid.Row="5" Grid.Column="1" x:Name="HDTNewSequenceOrgBox" /> <Border Grid.Row="5" Grid.Column="2" Style="{StaticResource HDTHelpDot}"> <Border.ToolTip> <ToolTip MaxWidth="380"> <TextBlock TextWrapping="Wrap" x:Name="HDTNewSequenceOrgHint" /> </ToolTip> </Border.ToolTip> <TextBlock Style="{StaticResource HDTHelpGlyph}" /> </Border> <!-- A PLAIN TEXT BOX, DELIBERATELY, AND THE ? SAYS WHY. The value is stored readable in the sequence: WinPE has to use it with nobody present, so it cannot be protected by a key that ships in the same boot image. A masked box would imply a secret this is not keeping, and the honest control is to treat the share and the media as credentials. --> <TextBlock Grid.Row="6" Grid.Column="0" x:Name="HDTNewSequencePasswordLabel" Style="{StaticResource HDTFieldLabel}" /> <TextBox Grid.Row="6" Grid.Column="1" x:Name="HDTNewSequencePasswordBox" FontFamily="Consolas, Courier New" /> <Border Grid.Row="6" Grid.Column="2" Style="{StaticResource HDTHelpDot}"> <Border.ToolTip> <ToolTip MaxWidth="420"> <TextBlock TextWrapping="Wrap" x:Name="HDTNewSequencePasswordHint" /> </ToolTip> </Border.ToolTip> <TextBlock Style="{StaticResource HDTHelpGlyph}" /> </Border> <!-- WHAT IS WRONG WITH THE ANSWERS, said as they are typed rather than on the last press. Test-HDTConsoleNewSequence decides it; this shows it. --> <TextBlock Grid.Row="7" Grid.ColumnSpan="3" x:Name="HDTNewSequenceMessageText" Foreground="{DynamicResource HDTErrorBrush}" TextWrapping="Wrap" Margin="0,4,0,0" /> </Grid> <Border Grid.Row="2" Margin="16,0,16,0" Padding="0,8,0,8"> <TextBlock x:Name="HDTNewSequenceCommandText" Foreground="{DynamicResource HDTCommandTextBrush}" FontFamily="Consolas, Courier New" FontSize="11" TextWrapping="Wrap" /> </Border> <Border Grid.Row="3" Background="{DynamicResource HDTFooterBrush}" Padding="16,12,16,12"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Right"> <Button x:Name="HDTNewSequenceCreateButton" MinWidth="96" IsDefault="True" /> <Button x:Name="HDTCancelButton" MinWidth="96" Margin="8,0,0,0" IsCancel="True" /> </StackPanel> </Border> </Grid> </Window> |