@@ -727,25 +727,25 @@ $Xaml = @'
727727 <TextBlock FontSize="14" FontFamily="Segoe UI" Foreground="#EBEBEB" Text="DNS:" Width="120" HorizontalAlignment="Left"/>
728728 <TextBox x:Name="Control_NetConfig_Tbx_DNS" BorderBrush="#ABADB3" Width="430" IsEnabled="False"/>
729729 </StackPanel>
730+ <StackPanel Orientation="Horizontal" Margin="0,0,0,10">
731+ <TextBlock FontSize="14" FontFamily="Segoe UI" Foreground="#EBEBEB" Text="Time Server IP:" Width="120" HorizontalAlignment="Left"/>
732+ <TextBox x:Name="Control_NetConfig_Tbx_TimeServer" BorderBrush="#ABADB3" Width="430" />
733+ </StackPanel>
730734 <StackPanel x:Name="Control_NetConfig_Stp_Optional">
731735 <TextBlock FontSize="16" FontFamily="Segoe UI" Foreground="#EBEBEB" Text="Optional Configuration" Margin="0,0,0,10"/>
732736 <StackPanel Orientation="Horizontal" Margin="0,0,0,10">
733737 <TextBlock FontSize="14" FontFamily="Segoe UI" Foreground="#EBEBEB" Text="VLAN ID:" Width="120" HorizontalAlignment="Left"/>
734738 <TextBox x:Name="Control_NetConfig_Tbx_VlanID" BorderBrush="#ABADB3" Width="430" />
735739 </StackPanel>
736740 <StackPanel Orientation="Horizontal" Margin="0,0,0,10">
737- <TextBlock FontSize="14" FontFamily="Segoe UI" Foreground="#EBEBEB" Text="DNS Forwarder:" Width="120" HorizontalAlignment="Left"/>
741+ <TextBlock FontSize="14" FontFamily="Segoe UI" Foreground="#EBEBEB" Text="DNS Forwarder IP :" Width="120" HorizontalAlignment="Left"/>
738742 <TextBox x:Name="Control_NetConfig_Tbx_DnsForwarder" BorderBrush="#ABADB3" Width="430"/>
739743 </StackPanel>
740- <StackPanel Orientation="Horizontal" Margin="0,0,0,10">
741- <TextBlock FontSize="14" FontFamily="Segoe UI" Foreground="#EBEBEB" Text="Time Server:" Width="120" HorizontalAlignment="Left"/>
742- <TextBox x:Name="Control_NetConfig_Tbx_TimeServer" BorderBrush="#ABADB3" Width="430" />
743- </StackPanel>
744744 </StackPanel>
745745 </StackPanel>
746746 <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
747747 <Button x:Name="Control_NetConfig_Btn_Previous" Content="Previous" Height="23.5" Width="100" HorizontalAlignment="Center" VerticalAlignment="Center" />
748- <Button x:Name="Control_NetConfig_Btn_Next" Content="Next" Height="23.5" Width="100" Margin="10,0,0,0" HorizontalAlignment="Center" VerticalAlignment="Center" />
748+ <Button x:Name="Control_NetConfig_Btn_Next" Content="Next" Height="23.5" Width="100" Margin="10,0,0,0" HorizontalAlignment="Center" VerticalAlignment="Center" IsEnabled="False" />
749749 </StackPanel>
750750 </StackPanel>
751751 <!--#endregion NetConfig-->
@@ -1519,12 +1519,14 @@ Function F_VerifyFields_NetConfig {
15191519 else {
15201520 if (
15211521 (
1522- $syncHash.Control_NetConfig_Rbt_DHCP.IsChecked -eq $true
1522+ $syncHash.Control_NetConfig_Rbt_DHCP.IsChecked -eq $true -and
1523+ ($syncHash.Control_NetConfig_Tbx_TimeServer.Text -and ($syncHash.Control_NetConfig_Tbx_TimeServer.BorderBrush.color -ne " #FFFF0000" ))
15231524 ) -or
15241525 (
15251526 $syncHash.Control_NetConfig_Rbt_Static.IsChecked -eq $true -and
15261527 ($syncHash.Control_NetConfig_Tbx_IpAddress.Text -and ($syncHash.Control_NetConfig_Tbx_IpAddress.BorderBrush.color -ne " #FFFF0000" )) -and
1527- ($syncHash.Control_NetConfig_Tbx_Gateway.Text -and ($syncHash.Control_NetConfig_Tbx_Gateway.BorderBrush.color -ne " #FFFF0000" ))
1528+ ($syncHash.Control_NetConfig_Tbx_Gateway.Text -and ($syncHash.Control_NetConfig_Tbx_Gateway.BorderBrush.color -ne " #FFFF0000" )) -and
1529+ ($syncHash.Control_NetConfig_Tbx_TimeServer.Text -and ($syncHash.Control_NetConfig_Tbx_TimeServer.BorderBrush.color -ne " #FFFF0000" ))
15281530 )
15291531 ) {$syncHash.Control_NetConfig_Btn_Next.IsEnabled = $true }
15301532 Else {$syncHash.Control_NetConfig_Btn_Next.IsEnabled = $false }
@@ -2161,6 +2163,16 @@ $syncHash.Control_NetConfig_Tbx_Dns.Add_TextChanged({
21612163 F_VerifyFields_NetConfig
21622164})
21632165
2166+ $syncHash.Control_NetConfig_Tbx_TimeServer.Add_TextChanged ({
2167+ F_Regex - field ' Control_NetConfig_Tbx_TimeServer' - field_value $syncHash.Control_NetConfig_Tbx_TimeServer.Text - regex $Regex.IpAddress - message $Text_Generic.Regex_IpAddress
2168+ F_VerifyFields_NetConfig
2169+ })
2170+
2171+ $syncHash.Control_NetConfig_Tbx_DnsForwarder.Add_TextChanged ({
2172+ F_Regex - field ' Control_NetConfig_Tbx_DnsForwarder' - field_value $syncHash.Control_NetConfig_Tbx_DnsForwarder.Text - regex $Regex.IpAddress - message $Text_Generic.Regex_IpAddress
2173+ F_VerifyFields_NetConfig
2174+ })
2175+
21642176# endregion Events NetConfig
21652177
21662178# region Events Job
0 commit comments