File tree Expand file tree Collapse file tree 2 files changed +11
-8
lines changed
Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 3737
3838 <StackPanel Grid.Row=" 1" Orientation =" Vertical" Margin =" 8" >
3939 <v : CommitMessageToolBox x : Name =" Editor" Height =" 400" />
40- <Button Width =" 0" Height =" 0"
41- Margin =" 0" Padding =" 0"
42- Click =" OnCloseByHotKey"
43- HotKey =" Escape" />
40+ <Button Classes =" flat primary"
41+ Width =" 80"
42+ Margin =" 0,8,0,4"
43+ Content =" {DynamicResource Text.Sure}"
44+ Click =" SaveAndClose"
45+ HorizontalAlignment =" Center" />
4446 </StackPanel >
4547 </Grid >
4648</v : ChromelessWindow >
Original file line number Diff line number Diff line change @@ -60,18 +60,19 @@ protected override void OnClosed(EventArgs e)
6060 {
6161 base . OnClosed ( e ) ;
6262
63- _onSave ? . Invoke ( Editor . CommitMessage ) ;
64-
6563 if ( _shouldExitApp )
66- App . Quit ( 0 ) ;
64+ App . Quit ( _exitCode ) ;
6765 }
6866
69- private void OnCloseByHotKey ( object sender , RoutedEventArgs e )
67+ private void SaveAndClose ( object _1 , RoutedEventArgs _2 )
7068 {
69+ _onSave ? . Invoke ( Editor . CommitMessage ) ;
70+ _exitCode = 0 ;
7171 Close ( ) ;
7272 }
7373
7474 private Action < string > _onSave = null ;
7575 private bool _shouldExitApp = true ;
76+ private int _exitCode = - 1 ;
7677 }
7778}
You can’t perform that action at this time.
0 commit comments