GoesSoftware.SuperSDK.App
6.2.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package GoesSoftware.SuperSDK.App --version 6.2.0
NuGet\Install-Package GoesSoftware.SuperSDK.App -Version 6.2.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="GoesSoftware.SuperSDK.App" Version="6.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="GoesSoftware.SuperSDK.App" Version="6.2.0" />
<PackageReference Include="GoesSoftware.SuperSDK.App" />
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 GoesSoftware.SuperSDK.App --version 6.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: GoesSoftware.SuperSDK.App, 6.2.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 GoesSoftware.SuperSDK.App@6.2.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=GoesSoftware.SuperSDK.App&version=6.2.0
#tool nuget:?package=GoesSoftware.SuperSDK.App&version=6.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SuperSDK.App 使用指南
初始化
using SApp = SuperSDK.App.SuperApp;
public partial class App : Application
{
public override void Initialize()
{
AvaloniaXamlLoader.Load(this);
SApp.Initialize(config =>
{
config.AppInfo = new SuperSDK.Core.AppInfo
{
ProductName = "My App",
Version = "1.0.0",
IconPath = "avares://YourApp/app.ico"
};
config.UseBuiltInLogger(showOnStartup: false);
config.UseSqlDebug(showOnStartup: false);
config.RegisterEntity<YourEntity>();
});
}
public override void OnFrameworkInitializationCompleted()
{
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
{
desktop.MainWindow = new MainWindow();
desktop.ShutdownRequested += (s, e) => SApp.Cleanup();
}
base.OnFrameworkInitializationCompleted();
}
}
常用 API
// 日志
SApp.LogInfo("信息");
SApp.LogWarning("警告");
SApp.LogError("错误");
// 窗口
SApp.ToggleLogger(); // Logger 窗口
SApp.ToggleSqlDebug(); // SQL Debug 窗口
SApp.ShowAbout(); // About 窗口
// 主题切换(默认暗黑模式)
SApp.ToggleTheme(); // 切换 Dark/Light 主题
图标配置
在 .csproj 中添加:
<ItemGroup>
<AvaloniaResource Include="app.ico" />
</ItemGroup>
Splash 启动画面
在 Initialize 中通过 config.AddRequest / config.AddPublish 添加启动任务,MainWindow 打开后自动执行:
SApp.Initialize(config =>
{
config.AppInfo = new SuperSDK.Core.AppInfo { ... };
// 添加启动任务(按顺序执行,自动显示进度条)
config.AddRequest<LoadConfigReq>(new LoadConfigReq(), "Loading configuration...");
config.AddRequest<InitDatabaseReq>(new InitDatabaseReq(), "Initializing database...");
config.AddPublish(new CacheWarmupMsg(), "Warming up cache...");
});
AddRequest<TReq>(request, statusText)— 发送请求并等待 handler 完成,handler 需返回GzSplashResultAddPublish<T>(message, statusText)— 发布消息,立即完成AddTask(Func<Task>, statusText)— 自定义异步任务
Splash 会持续监听 GzSplashStatusMsg,任何地方发布该消息都会实时更新进度条下方的状态文字:
MessageBus.Pub(new GzSplashStatusMsg { Text = "Connecting to server..." });
Handler 注册示例(在任何模块中):
MessageBus.RegisterReqHandler<LoadConfigReq, GzSplashResult>(this, async req =>
{
await LoadConfig();
return new GzSplashResult();
});
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. 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.
-
net9.0
- Avalonia (>= 11.3.7)
- Avalonia.Desktop (>= 11.3.7)
- Avalonia.Diagnostics (>= 11.3.7)
- Avalonia.Fonts.Inter (>= 11.3.7)
- Avalonia.ReactiveUI (>= 11.3.7)
- Avalonia.Themes.Fluent (>= 11.3.7)
- GoesSoftware.SuperSDK.Core (>= 6.2.0)
- GoesSoftware.SuperSDK.Data (>= 6.2.0)
- GoesSoftware.SuperSDK.License (>= 6.2.0)
- GoesSoftware.SuperSDK.UI (>= 6.2.0)
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.2 | 0 | 3/31/2026 |
| 6.6.0 | 0 | 3/31/2026 |
| 6.5.2 | 3 | 3/31/2026 |
| 6.5.0 | 27 | 3/31/2026 |
| 6.4.0 | 39 | 3/30/2026 |
| 6.3.0 | 39 | 3/30/2026 |
| 6.2.0 | 43 | 3/30/2026 |
| 6.1.1 | 51 | 3/28/2026 |
| 6.1.0 | 141 | 3/28/2026 |
| 6.0.2 | 50 | 3/28/2026 |
| 6.0.1 | 42 | 3/28/2026 |
| 6.0.0 | 46 | 3/27/2026 |
| 5.2.3 | 91 | 3/17/2026 |
| 5.2.2 | 86 | 3/17/2026 |
| 5.2.1 | 92 | 3/17/2026 |
| 5.2.0 | 95 | 3/17/2026 |
Loading failed
add user manager