mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-04 18:44:59 +00:00
feature<PageTabBar>: apply repository configuration updates (bookmarks, titles, etc.)
This commit is contained in:
parent
1845fbbbc8
commit
fbb59823bf
4 changed files with 120 additions and 17 deletions
|
@ -14,12 +14,23 @@ namespace SourceGit.Views.Widgets {
|
|||
/// <summary>
|
||||
/// 标签数据
|
||||
/// </summary>
|
||||
public class Tab {
|
||||
public class Tab : Controls.BindableBase {
|
||||
public string Id { get; set; }
|
||||
public bool IsWelcomePage { get; set; }
|
||||
public string Title { get; set; }
|
||||
|
||||
private string title;
|
||||
public string Title {
|
||||
get => title;
|
||||
set => SetProperty(ref title, value);
|
||||
}
|
||||
|
||||
public string Tooltip { get; set; }
|
||||
public int Bookmark { get; set; }
|
||||
|
||||
private int bookmark = 0;
|
||||
public int Bookmark {
|
||||
get => bookmark;
|
||||
set => SetProperty(ref bookmark, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -123,6 +134,16 @@ namespace SourceGit.Views.Widgets {
|
|||
if (curTab.Id == id) container.SelectedItem = replaced;
|
||||
}
|
||||
|
||||
public void Update(string id, int bookmark, string title) {
|
||||
foreach (var one in Tabs) {
|
||||
if (one.Id == id) {
|
||||
one.Bookmark = bookmark;
|
||||
one.Title = title;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool Goto(string id) {
|
||||
foreach (var tab in Tabs) {
|
||||
if (tab.Id == id) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue