feature<Launcher>: supports restore last opened tabs when startup

This commit is contained in:
leo 2021-07-06 09:58:36 +08:00
parent 2ddc61e162
commit f6c17e7d34
7 changed files with 90 additions and 20 deletions

View file

@ -135,6 +135,27 @@ namespace SourceGit.Models {
public Change.DisplayMode ChangeInCommitInfo { get; set; } = Change.DisplayMode.Tree;
}
/// <summary>
/// 恢复上次打开的窗口
/// </summary>
public class RestoreTabs {
/// <summary>
/// 是否开启该功能
/// </summary>
public bool IsEnabled { get; set; } = false;
/// <summary>
/// 上次打开的仓库
/// </summary>
public List<string> Opened { get; set; } = new List<string>();
/// <summary>
/// 最后浏览的仓库
/// </summary>
public string Actived { get; set; } = null;
}
/// <summary>
/// 全局配置
/// </summary>
@ -163,6 +184,7 @@ namespace SourceGit.Models {
public WindowInfo Window { get; set; } = new WindowInfo();
public List<Group> Groups { get; set; } = new List<Group>();
public List<Repository> Repositories { get; set; } = new List<Repository>();
public RestoreTabs Restore { get; set; } = new RestoreTabs();
#endregion
#region LOAD_SAVE