code_style: simple window do not using DataContext

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-03-07 15:44:50 +08:00
parent 43fed8e04d
commit 0860245674
No known key found for this signature in database
6 changed files with 54 additions and 65 deletions

View file

@ -445,10 +445,14 @@ namespace SourceGit
var file = args[1];
if (!File.Exists(file))
{
desktop.Shutdown(-1);
else
desktop.MainWindow = new Views.StandaloneCommitMessageEditor(file);
return true;
}
var editor = new Views.StandaloneCommitMessageEditor();
editor.SetFile(file);
desktop.MainWindow = editor;
return true;
}
@ -461,7 +465,9 @@ namespace SourceGit
var args = desktop.Args;
if (args?.Length > 0)
{
desktop.MainWindow = new Views.Askpass(args[0]);
var askpass = new Views.Askpass();
askpass.TxtDescription.Text = args[0];
desktop.MainWindow = askpass;
return true;
}