Skip to content

Commit d88145e

Browse files
authored
fix: Program.cs namespace and Progress syntax errors (#21)
- Program.cs: GeneralUpdate.Tools.V12 → GeneralUpdate.Tools - PatchViewModel.cs: Progress<> → Progress (4 occurrences)
1 parent 671e8aa commit d88145e

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/ViewModels/PatchViewModel.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,21 @@ public partial class PatchViewModel : ViewModelBase
2828
[RelayCommand] async Task Build()
2929
{
3030
if (string.IsNullOrWhiteSpace(Config.OldDirectory) || string.IsNullOrWhiteSpace(Config.NewDirectory)) { Status = "请选择新旧版本目录"; return; }
31-
IsBuilding = true; Log.Clear(); Progress<> = 0; Status = "正在生成差分补丁...";
31+
IsBuilding = true; Log.Clear(); Progress = 0; Status = "正在生成差分补丁...";
3232
try
3333
{
3434
var tmp = Path.Combine(Path.GetTempPath(), $"gupatch_{DateTime.Now:yyyyMMddHHmmss}"); Directory.CreateDirectory(tmp);
35-
L($"临时目录: {tmp}"); Progress<> = 20;
35+
L($"临时目录: {tmp}"); Progress = 20;
3636
L("对比目录差异 + 生成 BSDiff40 补丁...");
3737
await _diff.GeneratePatchAsync(Config.OldDirectory, Config.NewDirectory, tmp);
38-
Progress<> = 70; L("补丁生成完成");
38+
Progress = 70; L("补丁生成完成");
3939
var outDir = string.IsNullOrWhiteSpace(Config.OutputPath) ? Environment.GetFolderPath(Environment.SpecialFolder.Desktop) : Config.OutputPath;
4040
var name = string.IsNullOrWhiteSpace(Config.PackageName) ? $"patch_{DateTime.Now:yyyyMMddHHmmss}" : Config.PackageName;
4141
var zip = Path.Combine(outDir, $"{name}.zip");
4242
L($"打包: {Path.GetFileName(zip)}");
4343
await _pkg.CompressDirectoryAsync(tmp, zip);
4444
Directory.Delete(tmp, true);
45-
Progress<> = 100; Config.OutputPath = zip;
45+
Progress = 100; Config.OutputPath = zip;
4646
Status = $"成功: {Path.GetFileName(zip)} ({new FileInfo(zip).Length/1024.0:F1} KB)";
4747
L(Status);
4848
}

0 commit comments

Comments
 (0)