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 3131 <TextBox Grid.Row=" 1" Grid.Column=" 1" Text =" {Binding DataDirectoryPath}"
3232 HorizontalAlignment =" Left" VerticalAlignment =" Center" Width =" 200" Height =" 30" Margin =" 50 0 0 0" />
3333 <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 " />
3636 </StackPanel >
3737 </Grid >
3838</Window >
Original file line number Diff line number Diff line change @@ -31,20 +31,26 @@ public CustomBrowserSettingWindow(CustomBrowser browser)
3131 } ;
3232 }
3333
34- private void ConfirmEditCustomBrowser ( object sender , RoutedEventArgs e )
34+ private void ConfirmCancelEditCustomBrowser ( object sender , RoutedEventArgs e )
3535 {
36- if ( DataContext is CustomBrowser editedBrowser )
36+ if ( DataContext is CustomBrowser editBrowser && e . Source is Button button )
3737 {
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+ }
4044 }
45+
4146 Close ( ) ;
4247 }
48+
4349 private void WindowKeyDown ( object sender , KeyEventArgs e )
4450 {
4551 if ( e . Key == Key . Enter )
4652 {
47- ConfirmEditCustomBrowser ( sender , e ) ;
53+ ConfirmCancelEditCustomBrowser ( sender , e ) ;
4854 }
4955 }
5056 }
You can’t perform that action at this time.
0 commit comments