WxyRememberLast 1.0.0

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package WxyRememberLast --version 1.0.0
                    
NuGet\Install-Package WxyRememberLast -Version 1.0.0
                    
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="WxyRememberLast" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="WxyRememberLast" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="WxyRememberLast" />
                    
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 WxyRememberLast --version 1.0.0
                    
#r "nuget: WxyRememberLast, 1.0.0"
                    
#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 WxyRememberLast@1.0.0
                    
#: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=WxyRememberLast&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=WxyRememberLast&version=1.0.0
                    
Install as a Cake Tool

Wxy.RememberLast

自动记忆和填充 DevExpress XAF XPO 对象属性值的模块

功能特性

  • ✅ 自动记忆上次输入值
  • ✅ 新对象自动填充
  • ✅ 属性级别控制
  • ✅ 跨类型共享
  • ✅ 支持多种数据类型
  • ✅ 过期机制
  • ✅ 跨平台支持 (WinForms & Blazor)

使用方法

1. 安装 NuGet 包

dotnet add package Wxy.RememberLast

2. 注册模块

Blazor (Startup.cs):

builder.Modules.Add<Wxy.RememberLastObject.RememberLastObjectModule>();

// 注册存储服务
services.AddSingleton<ILastValueStorageService, MemoryLastValueStorageService>();

WinForms (Startup.cs):

builder.Modules.Add<Wxy.RememberLastObject.RememberLastObjectModule>();

// 注册存储服务
builder.Services.AddSingleton<ILastValueStorageService, MemoryLastValueStorageService>();

3. 标记属性

public class Product : BaseObject
{
    [RememberLast]
    public string Category { get; set; }

    [RememberLast(ShareAcrossTypes = true)]
    public string Supplier { get; set; }

    [RememberLast(ExpirationMinutes = 30)]
    public string Warehouse { get; set; }
}

高级特性

跨类型共享

使用 ShareAcrossTypes = true 可以在不同类型之间共享最后输入的值:

public class Product : BaseObject
{
    [RememberLast(ShareAcrossTypes = true)]
    public string Supplier { get; set; }
}

public class Order : BaseObject
{
    [RememberLast(ShareAcrossTypes = true)]
    public string Supplier { get; set; }
}

过期机制

设置 ExpirationMinutes 可以让记住的值在指定时间后过期:

[RememberLast(ExpirationMinutes = 30)]
public string TemporaryField { get; set; }

自定义存储服务

实现 ILastValueStorageService 接口可以自定义存储方式:

public class DatabaseLastValueStorageService : ILastValueStorageService
{
    // 实现数据库持久化
}

支持的数据类型

  • string
  • int, decimal, double 等数值类型
  • DateTime
  • bool
  • enum
  • 任何可序列化的对象类型

平台支持

  • .NET 8.0
  • DevExpress XAF 25.1.*
  • Blazor Server
  • WinForms

依赖项

  • Wxy.XafExcel (用于 Excel 导入/导出支持)

文档

详细文档请访问: https://github.com/wxy8000/wxyXafExcel

许可证

MIT License

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net8.0-windows7.0 is compatible.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos 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

v1.0.0 - 初始发布 - 自动记忆上次输入值 - 新对象自动填充 - 属性级别控制 - 跨类型共享支持 - 跨平台支持 WinForms 和 Blazor