HiProgress 6.6.6

dotnet add package HiProgress --version 6.6.6
                    
NuGet\Install-Package HiProgress -Version 6.6.6
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="HiProgress" Version="6.6.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="HiProgress" Version="6.6.6" />
                    
Directory.Packages.props
<PackageReference Include="HiProgress" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add HiProgress --version 6.6.6
                    
#r "nuget: HiProgress, 6.6.6"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package HiProgress@6.6.6
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=HiProgress&version=6.6.6
                    
Install as a Cake Addin
#tool nuget:?package=HiProgress&version=6.6.6
                    
Install as a Cake Tool

新启动项目-功能合集

一个跨平台 自用工具集合 -net8.0-windows

功能

启动进度条

wpf项目

  • 注册: containerRegistry.RegisterSingleton<IProgressDialogService, ProgressDialogService>();

  • 注入需要更新进度条的viewModel private readonly IProgressDialogService _progressService; public MainWindowViewModel(IProgressDialogService progressService) { _progressService = progressService; }

  • 在事件内启动窗口并更新进度条 private async void ExecuteRepair() {

    await _progressService.RunAsync("处理gen", async ctx ⇒ { ctx.SetIndeterminate("初始化..."); ctx.AddLog("开始处理");

      //ctx.SetProgress(i, $"处理第 {i} 个零件");
      //ctx.AddLog($"已处理 {i}");
    
      await Task.Run(() =>
      {
          ExecuteRepairCore(ctx);
      });
    
      if (!ctx.IsCanceled)
      {
          ctx.SetProgress(100, "完成");
          ctx.AddLog("导出完成");
      }
    

    }); } private void ExecuteRepairCore(ProgressContext ctx) { ctx.SetProgress(0, $"开始处理"); ctx.AddLog($"开始处理"); 。。。。。核心业务逻辑。。。。。。

}

winform项目

//打开 ProgressFrom progressFrom = new ProgressFrom(); progressFrom.Show();

//进度更新 ProgressReporter.UpdateProgress?.Invoke(progressPercent1, $"--->正在保存板图({i + 1}/{totalChecked}):UniqueKey={uniqueKey},利用率={usage}");

//关闭 progressFrom.Close(); progressFrom.Dispose();

Product Compatible and additional computed target framework versions.
.NET net6.0-windows7.0 is compatible.  net7.0-windows was computed.  net8.0-windows was computed.  net8.0-windows7.0 is compatible.  net9.0-windows was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0-windows7.0

    • No dependencies.
  • net8.0-windows7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
6.6.6 112 3/31/2026
1.0.0 102 3/30/2026