|
88 | 88 | Orientation="Horizontal">
|
89 | 89 | <Grid Width="545">
|
90 | 90 | <Grid.ColumnDefinitions>
|
91 |
| - <ColumnDefinition Width="220" /> |
| 91 | + <ColumnDefinition Width="200" /> |
92 | 92 | <ColumnDefinition />
|
93 | 93 | </Grid.ColumnDefinitions>
|
94 | 94 | <Grid.RowDefinitions>
|
|
106 | 106 | FontSize="14"
|
107 | 107 | Text="{DynamicResource fileManager_profile_name}" />
|
108 | 108 | <TextBox
|
| 109 | + x:Name="ProfileTextBox" |
109 | 110 | Grid.Row="0"
|
110 | 111 | Grid.Column="1"
|
111 | 112 | Width="Auto"
|
|
122 | 123 | VerticalAlignment="Center"
|
123 | 124 | FontSize="14"
|
124 | 125 | Text="{DynamicResource fileManager_path}" />
|
125 |
| - <TextBox |
126 |
| - Grid.Row="1" |
127 |
| - Grid.Column="1" |
128 |
| - Width="Auto" |
129 |
| - Margin="10,10,15,0" |
130 |
| - HorizontalAlignment="Stretch" |
131 |
| - VerticalAlignment="Center" |
132 |
| - IsEnabled="{Binding Editable}" |
133 |
| - Text="{Binding Path}" /> |
| 126 | + <DockPanel Grid.Row="1" Grid.Column="1"> |
| 127 | + <TextBox |
| 128 | + x:Name="PathTextBox" |
| 129 | + Width="230" |
| 130 | + Margin="10,10,10,0" |
| 131 | + HorizontalAlignment="Stretch" |
| 132 | + VerticalAlignment="Center" |
| 133 | + IsEnabled="{Binding Editable}" |
| 134 | + Text="{Binding Path}" /> |
| 135 | + <Button |
| 136 | + Name="btnBrowseFile" |
| 137 | + Width="80" |
| 138 | + Margin="0,10,15,0" |
| 139 | + HorizontalAlignment="Right" |
| 140 | + VerticalAlignment="Center" |
| 141 | + Click="btnBrowseFile_Click" |
| 142 | + Content="{DynamicResource selectPythonDirectory}" |
| 143 | + DockPanel.Dock="Right"> |
| 144 | + <Button.Style> |
| 145 | + <Style BasedOn="{StaticResource DefaultButtonStyle}" TargetType="{x:Type Button}"> |
| 146 | + <Style.Triggers> |
| 147 | + <DataTrigger Binding="{Binding ElementName=ProfileTextBox, UpdateSourceTrigger=PropertyChanged, Path=IsEnabled}" Value="False"> |
| 148 | + <Setter Property="IsEnabled" Value="False" /> |
| 149 | + </DataTrigger> |
| 150 | + </Style.Triggers> |
| 151 | + </Style> |
| 152 | + </Button.Style> |
| 153 | + </Button> |
| 154 | + </DockPanel> |
134 | 155 | <TextBlock
|
135 | 156 | Grid.Row="2"
|
136 | 157 | Grid.Column="0"
|
|
140 | 161 | FontSize="14"
|
141 | 162 | Text="{DynamicResource fileManager_directory_arg}" />
|
142 | 163 | <TextBox
|
| 164 | + x:Name="directoryArgTextBox" |
143 | 165 | Grid.Row="2"
|
144 | 166 | Grid.Column="1"
|
145 | 167 | Width="Auto"
|
|
157 | 179 | FontSize="14"
|
158 | 180 | Text="{DynamicResource fileManager_file_arg}" />
|
159 | 181 | <TextBox
|
| 182 | + x:Name="fileArgTextBox" |
160 | 183 | Grid.Row="3"
|
161 | 184 | Grid.Column="1"
|
162 | 185 | Width="Auto"
|
|
187 | 210 | Height="30"
|
188 | 211 | Margin="5,0,0,0"
|
189 | 212 | Click="btnDone_Click"
|
190 |
| - Content="{DynamicResource done}" /> |
| 213 | + Content="{DynamicResource done}" |
| 214 | + ForceCursor="True"> |
| 215 | + <Button.Style> |
| 216 | + <Style BasedOn="{StaticResource DefaultButtonStyle}" TargetType="{x:Type Button}"> |
| 217 | + <Style.Triggers> |
| 218 | + <DataTrigger Binding="{Binding Text.Length, ElementName=ProfileTextBox, UpdateSourceTrigger=PropertyChanged}" Value="0"> |
| 219 | + <Setter Property="IsEnabled" Value="False" /> |
| 220 | + </DataTrigger> |
| 221 | + <DataTrigger Binding="{Binding Text.Length, ElementName=PathTextBox, UpdateSourceTrigger=PropertyChanged}" Value="0"> |
| 222 | + <Setter Property="IsEnabled" Value="False" /> |
| 223 | + </DataTrigger> |
| 224 | + <DataTrigger Binding="{Binding Text.Length, ElementName=directoryArgTextBox, UpdateSourceTrigger=PropertyChanged}" Value="0"> |
| 225 | + <Setter Property="IsEnabled" Value="False" /> |
| 226 | + </DataTrigger> |
| 227 | + <DataTrigger Binding="{Binding Text.Length, ElementName=fileArgTextBox, UpdateSourceTrigger=PropertyChanged}" Value="0"> |
| 228 | + <Setter Property="IsEnabled" Value="False" /> |
| 229 | + </DataTrigger> |
| 230 | + </Style.Triggers> |
| 231 | + </Style> |
| 232 | + </Button.Style> |
| 233 | + </Button> |
191 | 234 | </StackPanel>
|
192 | 235 | </Grid>
|
193 | 236 | </Window>
|
0 commit comments