File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed
Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change 31
31
<TextBox Grid.Row=" 1" Grid.Column=" 1" Text =" {Binding DataDirectoryPath}"
32
32
HorizontalAlignment =" Left" VerticalAlignment =" Center" Width =" 200" Height =" 30" Margin =" 50 0 0 0" />
33
33
<StackPanel HorizontalAlignment =" Center" Grid.Row=" 2" Orientation =" Horizontal" Grid.Column=" 1" Height =" 70" >
34
- <Button Content =" Confirm" Margin =" 15" Click =" ConfirmEditCustomBrowser " />
35
- <Button Content =" Cancel" Margin =" 15" />
34
+ <Button Name = " btnConfirm " Content =" Confirm" Margin =" 15" Click =" ConfirmCancelEditCustomBrowser " />
35
+ <Button Content =" Cancel" Margin =" 15" Click = " ConfirmCancelEditCustomBrowser " />
36
36
</StackPanel >
37
37
</Grid >
38
38
</Window >
Original file line number Diff line number Diff line change @@ -31,20 +31,26 @@ public CustomBrowserSettingWindow(CustomBrowser browser)
31
31
} ;
32
32
}
33
33
34
- private void ConfirmEditCustomBrowser ( object sender , RoutedEventArgs e )
34
+ private void ConfirmCancelEditCustomBrowser ( object sender , RoutedEventArgs e )
35
35
{
36
- if ( DataContext is CustomBrowser editedBrowser )
36
+ if ( DataContext is CustomBrowser editBrowser && e . Source is Button button )
37
37
{
38
- currentCustomBrowser . Name = editedBrowser . Name ;
39
- currentCustomBrowser . DataDirectoryPath = editedBrowser . DataDirectoryPath ;
38
+ if ( button . Name == "btnConfirm" )
39
+ {
40
+ currentCustomBrowser . Name = editBrowser . Name ;
41
+ currentCustomBrowser . DataDirectoryPath = editBrowser . DataDirectoryPath ;
42
+ Close ( ) ;
43
+ }
40
44
}
45
+
41
46
Close ( ) ;
42
47
}
48
+
43
49
private void WindowKeyDown ( object sender , KeyEventArgs e )
44
50
{
45
51
if ( e . Key == Key . Enter )
46
52
{
47
- ConfirmEditCustomBrowser ( sender , e ) ;
53
+ ConfirmCancelEditCustomBrowser ( sender , e ) ;
48
54
}
49
55
}
50
56
}
You can’t perform that action at this time.
0 commit comments