feat(legacy): add shell-independent module page compatibility
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user