|
7 | 7 | xmlns:Validator="clr-namespace:NETworkManager.Validators" |
8 | 8 | xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro" |
9 | 9 | xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls" |
| 10 | + xmlns:IconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks" |
10 | 11 | xmlns:Dialog="clr-namespace:MahApps.Metro.Controls.Dialogs;assembly=MahApps.Metro" |
11 | 12 | Dialog:DialogParticipation.Register="{Binding}" |
12 | 13 | mc:Ignorable="d" Loaded="UserControl_Loaded"> |
|
41 | 42 | </TextBox.Style> |
42 | 43 | </TextBox> |
43 | 44 | <StackPanel Margin="0,0,0,20"> |
44 | | - <StackPanel Orientation="Horizontal"> |
45 | | - <Button Content="{DynamicResource String_Button_Default}" Command="{Binding RestoreDefaultSettingsLocationCommand}" Margin="0,0,10,0"> |
46 | | - <Button.Style> |
47 | | - <Style TargetType="{x:Type Button}" BasedOn="{StaticResource DefaultButton}"> |
48 | | - <Setter Property="IsEnabled" Value="False" /> |
49 | | - <Setter Property="Visibility" Value="Collapsed" /> |
50 | | - <Style.Triggers> |
51 | | - <DataTrigger Binding="{Binding ElementName=toggleSwitchIsPortable,Path=IsChecked}" Value="False" > |
52 | | - <Setter Property="IsEnabled" Value="True" /> |
53 | | - </DataTrigger> |
54 | | - <DataTrigger Value="False"> |
55 | | - <DataTrigger.Binding> |
56 | | - <Binding Converter="{StaticResource IsDefaultSettingsLocationToBoolConverter}" ElementName="txtLocation" Path="Text"/> |
57 | | - </DataTrigger.Binding> |
58 | | - <Setter Property="Visibility" Value="Visible" /> |
59 | | - </DataTrigger> |
60 | | - </Style.Triggers> |
61 | | - </Style> |
62 | | - </Button.Style> |
63 | | - </Button> |
64 | | - <Button Content="{DynamicResource String_Button_Change}" Command="{Binding ChangeSettingsCommand}"> |
65 | | - <Button.Style> |
66 | | - <Style TargetType="{x:Type Button}" BasedOn="{StaticResource DefaultButton}"> |
67 | | - <Setter Property="IsEnabled" Value="False" /> |
68 | | - <Style.Triggers> |
69 | | - <MultiDataTrigger> |
70 | | - <MultiDataTrigger.Conditions> |
71 | | - <Condition Binding="{Binding ElementName=toggleSwitchIsPortable, Path=IsChecked}" Value="False" /> |
72 | | - <Condition Binding="{Binding ElementName=txtLocation, Path=(Validation.HasError)}" Value="False" /> |
73 | | - <Condition Binding="{Binding ElementName=txtLocation, Path=Text, Converter={StaticResource IsSettingsLocationToBoolConverter}}" Value="False" /> |
74 | | - <Condition Binding="{Binding MovingFiles}" Value="False" /> |
75 | | - <Condition Binding="{Binding MakingPortable}" Value="False" /> |
76 | | - </MultiDataTrigger.Conditions> |
77 | | - <Setter Property="IsEnabled" Value="True" /> |
78 | | - </MultiDataTrigger> |
79 | | - </Style.Triggers> |
80 | | - </Style> |
81 | | - </Button.Style> |
| 45 | + <Grid> |
| 46 | + <Grid.ColumnDefinitions> |
| 47 | + <ColumnDefinition Width="*" /> |
| 48 | + <ColumnDefinition Width="10" /> |
| 49 | + <ColumnDefinition Width="Auto" /> |
| 50 | + </Grid.ColumnDefinitions> |
| 51 | + <StackPanel Grid.Column="0" Orientation="Horizontal"> |
| 52 | + <Button Content="{DynamicResource String_Button_Default}" Command="{Binding RestoreDefaultSettingsLocationCommand}" Margin="0,0,10,0"> |
| 53 | + <Button.Style> |
| 54 | + <Style TargetType="{x:Type Button}" BasedOn="{StaticResource DefaultButton}"> |
| 55 | + <Setter Property="IsEnabled" Value="False" /> |
| 56 | + <Setter Property="Visibility" Value="Collapsed" /> |
| 57 | + <Style.Triggers> |
| 58 | + <DataTrigger Binding="{Binding ElementName=toggleSwitchIsPortable,Path=IsChecked}" Value="False" > |
| 59 | + <Setter Property="IsEnabled" Value="True" /> |
| 60 | + </DataTrigger> |
| 61 | + <DataTrigger Value="False"> |
| 62 | + <DataTrigger.Binding> |
| 63 | + <Binding Converter="{StaticResource IsDefaultSettingsLocationToBoolConverter}" ElementName="txtLocation" Path="Text"/> |
| 64 | + </DataTrigger.Binding> |
| 65 | + <Setter Property="Visibility" Value="Visible" /> |
| 66 | + </DataTrigger> |
| 67 | + </Style.Triggers> |
| 68 | + </Style> |
| 69 | + </Button.Style> |
| 70 | + </Button> |
| 71 | + <Button Content="{DynamicResource String_Button_Change}" Command="{Binding ChangeSettingsCommand}"> |
| 72 | + <Button.Style> |
| 73 | + <Style TargetType="{x:Type Button}" BasedOn="{StaticResource DefaultButton}"> |
| 74 | + <Setter Property="IsEnabled" Value="False" /> |
| 75 | + <Style.Triggers> |
| 76 | + <MultiDataTrigger> |
| 77 | + <MultiDataTrigger.Conditions> |
| 78 | + <Condition Binding="{Binding ElementName=toggleSwitchIsPortable, Path=IsChecked}" Value="False" /> |
| 79 | + <Condition Binding="{Binding ElementName=txtLocation, Path=(Validation.HasError)}" Value="False" /> |
| 80 | + <Condition Binding="{Binding ElementName=txtLocation, Path=Text, Converter={StaticResource IsSettingsLocationToBoolConverter}}" Value="False" /> |
| 81 | + <Condition Binding="{Binding MovingFiles}" Value="False" /> |
| 82 | + <Condition Binding="{Binding MakingPortable}" Value="False" /> |
| 83 | + </MultiDataTrigger.Conditions> |
| 84 | + <Setter Property="IsEnabled" Value="True" /> |
| 85 | + </MultiDataTrigger> |
| 86 | + </Style.Triggers> |
| 87 | + </Style> |
| 88 | + </Button.Style> |
| 89 | + </Button> |
| 90 | + </StackPanel> |
| 91 | + <Button Grid.Column="2" Command="{Binding OpenLocationCommand}" Style="{StaticResource ImageWithTextButton}"> |
| 92 | + <Button.Content> |
| 93 | + <Grid> |
| 94 | + <Grid.ColumnDefinitions> |
| 95 | + <ColumnDefinition Width="Auto" /> |
| 96 | + <ColumnDefinition Width="*" /> |
| 97 | + </Grid.ColumnDefinitions> |
| 98 | + <Rectangle Width="20" Height="20" Margin="10,5,0,5" Fill="{DynamicResource GrayBrush3}"> |
| 99 | + <Rectangle.OpacityMask> |
| 100 | + <VisualBrush Stretch="Uniform" Visual="{IconPacks:Material Kind=FolderOpen}" /> |
| 101 | + </Rectangle.OpacityMask> |
| 102 | + </Rectangle> |
| 103 | + <TextBlock Grid.Column="1" Text="{DynamicResource String_Button_OpenLocation}" FontSize="14" Margin="10,5" TextAlignment="Center"/> |
| 104 | + </Grid> |
| 105 | + </Button.Content> |
82 | 106 | </Button> |
83 | | - </StackPanel> |
| 107 | + </Grid> |
84 | 108 | <Controls:MetroProgressBar IsIndeterminate="True" Foreground="{DynamicResource AccentColorBrush}" Visibility="{Binding MovingFiles, Converter={StaticResource BooleanToVisibilityConverter}}" Margin="0,10,0,0"/> |
85 | 109 | </StackPanel> |
86 | 110 | <TextBlock Style="{StaticResource HeaderTextBlock}" Text="{DynamicResource String_Header_Portable}" /> |
|
121 | 145 | <StackPanel> |
122 | 146 | <CheckBox Content="{DynamicResource String_ApplicationSettings}" IsEnabled="{Binding ApplicationSettingsExists}" IsChecked="{Binding ResetApplicationSettings}" Margin="0,0,0,10" /> |
123 | 147 | <CheckBox Content="{DynamicResource String_NetworkInterfaceProfiles}" IsEnabled="{Binding NetworkInterfaceProfilesExists}" IsChecked="{Binding ResetNetworkInterfaceProfiles}" Margin="0,0,0,10" /> |
124 | | - <CheckBox Content="{DynamicResource String_IPScannerProfiles}" IsEnabled="{Binding IPScannerProfilesExists}" IsChecked="{Binding ResetIPScannerProfiles}" Margin="0,0,0,10" /> |
| 148 | + <CheckBox Content="{DynamicResource String_IPScannerProfiles}" IsEnabled="{Binding IPScannerProfilesExists}" IsChecked="{Binding ResetIPScannerProfiles}" Margin="0,0,0,10" /> |
125 | 149 | <CheckBox Content="{DynamicResource String_PortScannerProfiles}" IsEnabled="{Binding PortScannerProfilesExists}" IsChecked="{Binding ResetPortScannerProfiles}" Margin="0,0,0,10" /> |
126 | 150 | <CheckBox Content="{DynamicResource String_PingProfiles}" IsEnabled="{Binding PingProfilesExists}" IsChecked="{Binding ResetPingProfiles}" Margin="0,0,0,10" /> |
127 | 151 | <CheckBox Content="{DynamicResource String_TracerouteProfiles}" IsEnabled="{Binding TracerouteProfilesExists}" IsChecked="{Binding ResetTracerouteProfiles}" Margin="0,0,0,10" /> |
|
158 | 182 | </Style.Triggers> |
159 | 183 | </Style> |
160 | 184 | </Button.Style> |
161 | | - </Button> |
| 185 | + </Button> |
162 | 186 | </StackPanel> |
163 | 187 | </UserControl> |
0 commit comments