mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-16 16:05:00 +00:00
refactor: use custom view locator to create new window/dialog (#1216)
Signed-off-by: leo <longshuang@msn.cn> (cherry picked from commit 3e6f2b25f15b263e2b84922abc5cf6d621d62a83)
This commit is contained in:
parent
86113701f3
commit
750ca8ec61
15 changed files with 158 additions and 164 deletions
|
@ -332,8 +332,7 @@ namespace SourceGit.ViewModels
|
|||
history.Icon = App.CreateMenuIcon("Icons.Histories");
|
||||
history.Click += (_, ev) =>
|
||||
{
|
||||
var window = new Views.FileHistories() { DataContext = new FileHistories(_repo, change.Path, _commit.SHA) };
|
||||
window.Show();
|
||||
App.ShowWindow(new FileHistories(_repo, change.Path, _commit.SHA), false);
|
||||
ev.Handled = true;
|
||||
};
|
||||
|
||||
|
@ -343,8 +342,7 @@ namespace SourceGit.ViewModels
|
|||
blame.IsEnabled = change.Index != Models.ChangeState.Deleted;
|
||||
blame.Click += (_, ev) =>
|
||||
{
|
||||
var window = new Views.Blame() { DataContext = new Blame(_repo.FullPath, change.Path, _commit.SHA) };
|
||||
window.Show();
|
||||
App.ShowWindow(new Blame(_repo.FullPath, change.Path, _commit.SHA), false);
|
||||
ev.Handled = true;
|
||||
};
|
||||
|
||||
|
@ -508,8 +506,7 @@ namespace SourceGit.ViewModels
|
|||
history.Icon = App.CreateMenuIcon("Icons.Histories");
|
||||
history.Click += (_, ev) =>
|
||||
{
|
||||
var window = new Views.FileHistories() { DataContext = new FileHistories(_repo, file.Path, _commit.SHA) };
|
||||
window.Show();
|
||||
App.ShowWindow(new FileHistories(_repo, file.Path, _commit.SHA), false);
|
||||
ev.Handled = true;
|
||||
};
|
||||
|
||||
|
@ -519,8 +516,7 @@ namespace SourceGit.ViewModels
|
|||
blame.IsEnabled = file.Type == Models.ObjectType.Blob;
|
||||
blame.Click += (_, ev) =>
|
||||
{
|
||||
var window = new Views.Blame() { DataContext = new Blame(_repo.FullPath, file.Path, _commit.SHA) };
|
||||
window.Show();
|
||||
App.ShowWindow(new Blame(_repo.FullPath, file.Path, _commit.SHA), false);
|
||||
ev.Handled = true;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue