WinFormTools 1.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package WinFormTools --version 1.0.2
                    
NuGet\Install-Package WinFormTools -Version 1.0.2
                    
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="WinFormTools" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="WinFormTools" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="WinFormTools" />
                    
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 WinFormTools --version 1.0.2
                    
#r "nuget: WinFormTools, 1.0.2"
                    
#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 WinFormTools@1.0.2
                    
#: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=WinFormTools&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=WinFormTools&version=1.0.2
                    
Install as a Cake Tool

怎样调用webapi

创建请求接口

    internal class DicClientInfo
    {
        public const string Prefix = "Dic";
        public const string Add = Prefix + "/" + nameof(Add);
        public const string Update = Prefix + "/" + nameof(Update);
        public const string UpdateStatus = Prefix + "/" + nameof(UpdateStatus);
        public const string PageList = Prefix + "/" + nameof(PageList);
        public const string GetByGroupId = Prefix + "/" + nameof(GetByGroupId);
    }
#if DEBUG
    [TraceFilter(OutputTarget = OutputTarget.Debug)]
#endif
    public interface IDicClient : IHttpApi
    {
        /// <summary>
        /// 添加字典
        /// </summary>
        /// <param name="dicModel"></param>
        /// <returns></returns>
        [HttpPost(DicClientInfo.Add)]
        Task<ApiResult<bool>> Add([JsonContent] DicModel dicModel);

        /// <summary>
        /// 更新字典
        /// </summary>
        /// <param name="dicModel"></param>
        /// <returns></returns>
        [HttpPost(DicClientInfo.Update)]
        Task<ApiResult<bool>> Update([JsonContent] DicModel dicModel);

        /// <summary>
        /// 更新状态
        /// </summary>
        /// <param name="dicModel"></param>
        /// <returns></returns>
        [HttpPost(DicClientInfo.UpdateStatus)]
        Task<ApiResult<bool>> UpdateStatus([JsonContent] DicModel dicModel);

        /// <summary>
        /// 分页查询字典
        /// </summary>
        /// <param name="queryModel"></param>
        /// <returns></returns>
        [HttpGet(DicClientInfo.PageList)]
        Task<ApiResult<PageResult<DicModel>>> PageList(DicPageQueryModel queryModel);

        /// <summary>
        /// 获取字典组里面的字典
        /// </summary>
        /// <param name="groupId"></param>
        /// <returns></returns>
        [HttpGet(DicClientInfo.GetByGroupId)]
        Task<ApiResult<List<DicModel>>> GetByGroupId(Guid groupId);

    }

分页请求api(带进度条)


var resultPage = ClientRequest<IDicClient>.RequestProcess(this, r => r.PageList(queryModel).Result);

添加请求api(带进度条)


var resultAdd = ClientRequest<IDicClient>.RequestProcess(this, r => r.Add(model).Result);

编辑请求api(带进度条)

var resultUpdate = ClientRequest<IDicClient>.RequestProcess(this, r => r.Update(DicModel).Result);

删除请求api

var resultDel = ClientRequest<IDicClient>.RequestProcess(this, r => r.UpdateStatus(model).Result);
Product Compatible and additional computed target framework versions.
.NET 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.

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
1.0.3 141 12/13/2025
1.0.2 371 12/8/2025
1.0.0 320 12/8/2025

方法添加更详细的说明