GoesSoftware.SuperSDK.Editor
7.14.0
dotnet add package GoesSoftware.SuperSDK.Editor --version 7.14.0
NuGet\Install-Package GoesSoftware.SuperSDK.Editor -Version 7.14.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.Editor" Version="7.14.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="GoesSoftware.SuperSDK.Editor" Version="7.14.0" />
<PackageReference Include="GoesSoftware.SuperSDK.Editor" />
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.Editor --version 7.14.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: GoesSoftware.SuperSDK.Editor, 7.14.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.Editor@7.14.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.Editor&version=7.14.0
#tool nuget:?package=GoesSoftware.SuperSDK.Editor&version=7.14.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SuperSDK.Editor
Avalonia 编辑器组件库,提供 VSCode 风格的文件浏览器、代码编辑器、版本控制面板。
🎯 核心功能
1. GzExplorerBox - 文件浏览器
- VSCode 风格的文件树展示
- 文件/文件夹图标自动识别
- 点击文件发出
EditorFileSelectedMsg消息 - 自动过滤 bin/obj/node_modules 等目录
2. GzEditorBox - 代码编辑器
- 等宽字体代码编辑(Cascadia Code / Consolas)
- 行号显示
- 语言自动检测
- Ctrl+S 保存(发出
EditorFileSavedMsg消息) - Diff 对比模式(左右分栏)
- 修改标记(Tab 标题 ● 提示)
- VSCode 风格状态栏
3. GzSourceControlBox - 版本控制面板
- Git Graph 提交历史可视化
- 分支/标签标记展示
- Staged Changes / Changes 分区展示
- 点击变更文件自动切换到 Diff 模式
- 文件状态标记(M/A/D/R/U)
📨 消息系统 (GzMessageBus)
| 消息类型 | 发送方 | 接收方 | 用途 |
|---|---|---|---|
EditorFileSelectedMsg |
Explorer | Editor | 文件被点击时发出,Editor 自动打开 Tab |
EditorFolderChangedMsg |
Explorer(设置 RootPath 时) | Editor(清空 Tabs)、SourceControl(刷新 Git) | 文件夹切换广播 |
EditorFileSavedMsg |
Editor | SourceControl | 文件保存成功时发出,触发 Git 状态刷新 |
EditorDiffRequestMsg |
SourceControl | Editor | 请求以 Diff 模式展示文件变更 |
EditorEditModeMsg |
外部 | Editor | 切换回普通编辑模式 |
EditorGitRefreshMsg |
外部 | SourceControl | 手动请求刷新 Git 状态 |
� 支持的文件类型
可编辑/预览的文件(编辑器全功能支持,含行号、光标、Ctrl+S 保存)
| 分类 | 扩展名 |
|---|---|
| C# / .NET | .cs .csproj .sln .props .targets |
| 标记语言 | .xaml .axaml .xml .html .htm .svg |
| 数据 | .json .jsonc .toml .ini .cfg .conf .env .yml .yaml .csv .sql |
| Python | .py .pyw .pyi |
| Lua | .lua |
| Web | .js .mjs .ts .tsx .jsx .css .scss .less |
| Shell / 脚本 | .sh .bash .bat .cmd .ps1 .psm1 |
| 文档 | .md .txt .log |
| C / C++ | .cpp .c .h .hpp .cc |
| 其他语言 | .java .go .rs .rb .php .swift .kt .r .m |
| Git 配置 | .gitignore .gitattributes .editorconfig |
| 无扩展名文件 | 默认尝试作为文本加载 |
大文件限制:超过 5 MB 的文件不加载,仅显示路径信息。超过 100,000 行的文件只加载前 10 万行。
不支持的文件(仅显示路径,不加载内容)
| 分类 | 示例 |
|---|---|
| 压缩包 | .zip .rar .7z .gz .tar |
| 可执行文件 | .exe .dll .so .dylib |
| 文档 / 富文本 | .pdf .docx .xlsx .pptx |
| 图片 | .png .jpg .gif .bmp .webp |
| 音视频 | .mp3 .mp4 .avi .wav |
| 数据库 | .db .sqlite .mdf |
�🚀 快速使用
XAML 引用
<Window xmlns:editor="clr-namespace:SuperSDK.Editor.Controls;assembly=SuperSDK.Editor">
<Grid ColumnDefinitions="250,*,300">
<editor:GzExplorerBox Grid.Column="0" x:Name="Explorer" />
<editor:GzEditorBox Grid.Column="1" />
<editor:GzSourceControlBox Grid.Column="2" />
</Grid>
</Window>
代码初始化
// 方式一:直接设置属性(自动发出 EditorFolderChangedMsg)
Explorer.RootPath = @"C:\MyProject";
// 方式二:调用 API(等价于设置 RootPath,同样广播消息)
Explorer.SetFolder(@"C:\MyProject");
// 切换文件夹时:
// - Explorer 自动刷新文件树
// - Editor 自动清空所有已打开的 Tab
// - SourceControl 自动检测新目录的 Git 仓库并刷新状态
监听消息
// 监听文件选择
MessageBus.Subscribe<EditorFileSelectedMsg>(this, msg =>
{
Console.WriteLine($"选中文件: {msg.FilePath}");
});
// 监听文件保存
MessageBus.Subscribe<EditorFileSavedMsg>(this, msg =>
{
Console.WriteLine($"文件已保存: {msg.FilePath}");
});
🎨 主题支持
所有控件遵循 SuperSDK.UI 标准:
- 无主题属性,始终跟随全局主题 (ThemeManager)
- 使用 Semi.Avalonia DynamicResource 颜色系统
- 支持 Dark/Light 模式自动切换
📦 依赖
- SuperSDK.Core (MessageBus)
- SuperSDK.UI (ThemeManager, ViewModelBase)
- SuperSDK.Data (数据模型)
- SuperSDK.License (DLL 完整性验证)
- Avalonia
- ReactiveUI
| 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.Controls.DataGrid (>= 11.3.7)
- GoesSoftware.SuperSDK.Core (>= 7.14.0)
- GoesSoftware.SuperSDK.Data (>= 7.14.0)
- GoesSoftware.SuperSDK.Git (>= 7.14.0)
- GoesSoftware.SuperSDK.License (>= 7.14.0)
- GoesSoftware.SuperSDK.UI (>= 7.14.0)
- ReactiveUI (>= 20.1.63)
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 |
|---|---|---|
| 7.14.0 | 0 | 4/10/2026 |
| 7.13.0 | 0 | 4/10/2026 |
| 7.12.0 | 0 | 4/10/2026 |
| 7.11.0 | 0 | 4/10/2026 |
| 7.10.0 | 32 | 4/8/2026 |
| 7.9.0 | 75 | 4/7/2026 |
| 7.8.0 | 81 | 4/4/2026 |
| 7.7.0 | 87 | 4/4/2026 |
| 7.6.0 | 91 | 4/4/2026 |
| 7.5.0 | 83 | 4/4/2026 |
| 7.4.0 | 79 | 4/4/2026 |
| 7.3.0 | 79 | 4/4/2026 |
| 7.2.0 | 87 | 4/3/2026 |
| 7.1.0 | 86 | 4/3/2026 |
| 7.0.0 | 86 | 4/1/2026 |
update GzExcel