|
101 | 101 | <DataTrigger Binding="{Binding (networkManager:ProfileViewInfo.Name)}" Value="{x:Static networkManager:ProfileViewManager+Name.Ping}"> |
102 | 102 | <Setter Property="IsChecked" Value="{Binding DataContext.Ping_Enabled, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" /> |
103 | 103 | </DataTrigger> |
| 104 | + <DataTrigger Binding="{Binding (networkManager:ProfileViewInfo.Name)}" Value="{x:Static networkManager:ProfileViewManager+Name.PingMonitor}"> |
| 105 | + <Setter Property="IsChecked" Value="{Binding DataContext.PingMonitor_Enabled, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" /> |
| 106 | + </DataTrigger> |
104 | 107 | <DataTrigger Binding="{Binding (networkManager:ProfileViewInfo.Name)}" Value="{x:Static networkManager:ProfileViewManager+Name.Traceroute}"> |
105 | 108 | <Setter Property="IsChecked" Value="{Binding DataContext.Traceroute_Enabled, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" /> |
106 | 109 | </DataTrigger> |
|
561 | 564 | </StackPanel> |
562 | 565 | </ScrollViewer> |
563 | 566 | </TabItem> |
| 567 | + <TabItem Header="{x:Static localization:Strings.PingMonitor}"> |
| 568 | + <ScrollViewer Style="{StaticResource DefaultScrollViewer}"> |
| 569 | + <StackPanel> |
| 570 | + <StackPanel IsEnabled="{Binding PingMonitor_Enabled}"> |
| 571 | + <Grid> |
| 572 | + <Grid.Resources> |
| 573 | + <Style TargetType="{x:Type TextBlock}" BasedOn="{StaticResource CenterTextBlock}" /> |
| 574 | + <Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource DefaultTextBox}" /> |
| 575 | + </Grid.Resources> |
| 576 | + <Grid.RowDefinitions> |
| 577 | + <RowDefinition Height="Auto" /> |
| 578 | + <RowDefinition Height="10" /> |
| 579 | + <RowDefinition Height="Auto" /> |
| 580 | + </Grid.RowDefinitions> |
| 581 | + <Grid.ColumnDefinitions> |
| 582 | + <ColumnDefinition Width="1*" /> |
| 583 | + <ColumnDefinition Width="10" /> |
| 584 | + <ColumnDefinition Width="1*" /> |
| 585 | + <ColumnDefinition Width="34" /> |
| 586 | + </Grid.ColumnDefinitions> |
| 587 | + <TextBlock Grid.Column="0" Grid.Row="0" Text="{x:Static localization:Strings.InheritHostFromDefault}" /> |
| 588 | + <mah:ToggleSwitch Grid.Column="2" Grid.Row="0" OnLabel="" OffLabel="" IsChecked="{Binding PingMonitor_InheritHost}" /> |
| 589 | + <TextBlock Grid.Column="0" Grid.Row="2" Text="{x:Static localization:Strings.Host}" /> |
| 590 | + <TextBox x:Name="TextBoxPingMonitorHost" Grid.Column="2" Grid.Row="2" IsEnabled="{Binding PingMonitor_InheritHost, Converter={StaticResource BooleanReverseConverter}}" mah:TextBoxHelper.Watermark="{x:Static localization:StaticStrings.ExampleHostname}"> |
| 591 | + <TextBox.Style> |
| 592 | + <Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource DefaultTextBox}"> |
| 593 | + <Style.Triggers> |
| 594 | + <DataTrigger Binding="{Binding PingMonitor_InheritHost}" Value="True"> |
| 595 | + <Setter Property="TextBox.Text"> |
| 596 | + <Setter.Value> |
| 597 | + <Binding Path="Host" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" /> |
| 598 | + </Setter.Value> |
| 599 | + </Setter> |
| 600 | + </DataTrigger> |
| 601 | + <DataTrigger Binding="{Binding PingMonitor_InheritHost}" Value="False"> |
| 602 | + <Setter Property="TextBox.Text"> |
| 603 | + <Setter.Value> |
| 604 | + <Binding Path="PingMonitor_Host" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged"> |
| 605 | + <Binding.ValidationRules> |
| 606 | + <validators:EmptyValidator ValidatesOnTargetUpdated="True" /> |
| 607 | + </Binding.ValidationRules> |
| 608 | + </Binding> |
| 609 | + </Setter.Value> |
| 610 | + </Setter> |
| 611 | + </DataTrigger> |
| 612 | + </Style.Triggers> |
| 613 | + </Style> |
| 614 | + </TextBox.Style> |
| 615 | + </TextBox> |
| 616 | + </Grid> |
| 617 | + </StackPanel> |
| 618 | + </StackPanel> |
| 619 | + </ScrollViewer> |
| 620 | + </TabItem> |
564 | 621 | <TabItem Header="{x:Static localization:Strings.Traceroute}"> |
565 | 622 | <ScrollViewer Style="{StaticResource DefaultScrollViewer}"> |
566 | 623 | <StackPanel> |
|
1475 | 1532 | <Setter Property="IsEnabled" Value="False" /> |
1476 | 1533 | </MultiDataTrigger.Setters> |
1477 | 1534 | </MultiDataTrigger> |
| 1535 | + <!-- Ping Monitor --> |
| 1536 | + <MultiDataTrigger> |
| 1537 | + <MultiDataTrigger.Conditions> |
| 1538 | + <Condition Binding="{Binding PingMonitor_Enabled}" Value="True"/> |
| 1539 | + <Condition Binding="{Binding PingMonitor_InheritHost}" Value="False"/> |
| 1540 | + <Condition Binding="{Binding ElementName=TextBoxPingMonitorHost, Path=(Validation.HasError)}" Value="True" /> |
| 1541 | + </MultiDataTrigger.Conditions> |
| 1542 | + <MultiDataTrigger.Setters> |
| 1543 | + <Setter Property="IsEnabled" Value="False" /> |
| 1544 | + </MultiDataTrigger.Setters> |
| 1545 | + </MultiDataTrigger> |
1478 | 1546 | <!-- Traceroute --> |
1479 | 1547 | <MultiDataTrigger> |
1480 | 1548 | <MultiDataTrigger.Conditions> |
|
0 commit comments