feat(legacy): add shell-independent module page compatibility

This commit is contained in:
2026-08-28 11:56:48 +08:00
parent 8472004711
commit 1c59fda8b8
8 changed files with 387 additions and 21 deletions
+38
View File
@@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using DevExpress.XtraTab;
namespace Lskj.Model
{
/// <summary>
/// Provides the top-level module page lifecycle without coupling module
/// code to a particular visual tab control. The WPF shell supplies an
/// implementation backed by DXTabItem instances; the classic WinForms
/// shell leaves this interface unset and ERPInfo falls back to its real
/// XtraTabControl/PageControl.
/// </summary>
public interface IModulePageHost
{
event EventHandler<ModulePageEventArgs> PageAdded;
event EventHandler<ModulePageEventArgs> PageRemoved;
event EventHandler<ModulePageEventArgs> PageSelected;
XtraTabPage SelectedPage { get; }
IEnumerable<XtraTabPage> Pages { get; }
void AddPage(XtraTabPage page);
bool RemovePage(XtraTabPage page);
bool SelectPage(XtraTabPage page);
bool ContainsPage(XtraTabPage page);
}
public sealed class ModulePageEventArgs : EventArgs
{
public ModulePageEventArgs(XtraTabPage page)
{
Page = page;
}
public XtraTabPage Page { get; private set; }
}
}