refactor<*>: rewrite all with AvaloniaUI

This commit is contained in:
leo 2024-02-06 15:08:37 +08:00
parent 0136904612
commit 2a62596999
521 changed files with 19780 additions and 23244 deletions

View file

@ -1,21 +1,19 @@
using System;
using System;
namespace SourceGit.Commands {
/// <summary>
/// 合并分支
/// </summary>
public class Merge : Command {
private Action<string> handler = null;
public Merge(string repo, string source, string mode, Action<string> onProgress) {
Cwd = repo;
Args = $"merge --progress {source} {mode}";
public Merge(string repo, string source, string mode, Action<string> outputHandler) {
_outputHandler = outputHandler;
WorkingDirectory = repo;
Context = repo;
TraitErrorAsOutput = true;
handler = onProgress;
Args = $"merge --progress {source} {mode}";
}
public override void OnReadline(string line) {
handler?.Invoke(line);
protected override void OnReadline(string line) {
_outputHandler?.Invoke(line);
}
private Action<string> _outputHandler = null;
}
}