File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,21 @@ public Launcher(string startupRepo)
107
107
_ignoreIndexChange = false ;
108
108
}
109
109
110
+ public void Quit ( double width , double height )
111
+ {
112
+ var pref = Preference . Instance ;
113
+ pref . Layout . LauncherWidth = width ;
114
+ pref . Layout . LauncherHeight = height ;
115
+ pref . Save ( ) ;
116
+
117
+ _ignoreIndexChange = true ;
118
+
119
+ foreach ( var one in Pages )
120
+ CloseRepositoryInTab ( one , false ) ;
121
+
122
+ _ignoreIndexChange = false ;
123
+ }
124
+
110
125
public void AddNewTab ( )
111
126
{
112
127
var page = new LauncherPage ( ) ;
Original file line number Diff line number Diff line change @@ -221,11 +221,7 @@ protected override void OnKeyUp(KeyEventArgs e)
221
221
222
222
protected override void OnClosing ( WindowClosingEventArgs e )
223
223
{
224
- var pref = ViewModels . Preference . Instance ;
225
- pref . Layout . LauncherWidth = Width ;
226
- pref . Layout . LauncherHeight = Height ;
227
- pref . Save ( ) ;
228
-
224
+ ( DataContext as ViewModels . Launcher ) ? . Quit ( Width , Height ) ;
229
225
base . OnClosing ( e ) ;
230
226
}
231
227
You can’t perform that action at this time.
0 commit comments