Files
lserp_cs_6.0/插件库/Lskj.Main/Hosting/README.md
T

36 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 外部主界面兼容层
这个目录只为旧 `.NET Framework 4.0` 启动流程提供一个可选扩展点,不引用 WPF 或 DevExpress 25.2。
## 默认路线
直接运行 `Ls_ERP.exe` 时,`Manager.ExternalMainShell``null`
```text
Program.Main
-> Manager.StartForm
-> FrmLogin
-> Manager.RunMainForm
-> FrmMain
```
这条路线不加载任何 WPF 程序集,并保持 DevExpress WinForms 15.2。
## 外部宿主路线
`.NET Framework 4.8` 的独立启动程序通过 `LegacyApplicationHost.Run` 注入 `IExternalMainShell`。旧程序仍负责 CEF、全局异常、配置、数据库、登录和子系统选择,只在 `RunMainForm` 位置回调外部主界面。
`IExternalMainShell` 当前承担:
- 同步显示外部主窗口;
- 返回普通关闭或重新登录结果;
- 处理旧插件发起的重新登录;
- 在强制下线时通知外部主窗口退出。
## 修改规则
- 此层必须继续可以在 .NET Framework 4.0 下编译。
- 禁止引用 `Lserp.Wpf.*`、WPF 类型或 DevExpress 25.2。
- 新界面特有实现放在独立 WPF 解决方案的 `Lserp.Wpf.Legacy.WinForms`
- 新增兼容能力时优先扩展中立接口,不要在旧工程中直接调用 WPF。