/// <summary> /// /// </summary> /// <param name="title">标题</param> /// <param name="icon">图标</param> /// <param name="active">初始是否激活</param> /// <param name="windowStyle">窗口样式</param> /// <param name="toolbar">是否显示工具栏</param> /// <param name="helpBox">帮助栏样式</param> public EWSubWindowAttribute(string title, string icon, bool active = true, SubWindowStyle windowStyle = SubWindowStyle.Default, EWSubWindowToolbarType toolbar = EWSubWindowToolbarType.None, SubWindowHelpBoxType helpBox = SubWindowHelpBoxType.None) { this.title = title; this.active = active; this.windowStyle = windowStyle; this.toolbar = toolbar; this.helpBox = helpBox; this.iconPath = icon; }
public static SubWindow CreateSubWindow(SubWindowStyle style, string title, string iconPath, bool defaultOpen, MethodInfo method, System.Object target, EWSubWindowToolbarType toolbar, SubWindowHelpBoxType helpbox) { if (!CheckSubWindowParameters(method, toolbar, helpbox)) { return(null); } if (subWindowClass == null) { GetSubWinodwStyleClasses(); } else if (!subWindowClass.ContainsKey(style)) { GetSubWinodwStyleClasses(); } if (subWindowClass == null || !subWindowClass.ContainsKey(style)) { return(null); } System.Type type = subWindowClass[style]; return ((SubWindow)System.Activator.CreateInstance(type, title, iconPath, defaultOpen, method, target, toolbar, helpbox)); }
/// <summary> /// 子窗口标签 /// </summary> /// <param name="containerType">子窗口容器类型</param> /// <param name="windowStyle">窗口风格</param> /// <param name="active">是否激活</param> public EWSubWindowHandleAttribute(Type containerType, SubWindowStyle windowStyle = SubWindowStyle.Default, bool active = true) { this.containerType = containerType; this.active = active; this.windowStyle = windowStyle; }
public SubWindowStyleAttribute(SubWindowStyle type) { this.subWindowStyle = type; }
public static SubWindow CreateSubWindow(System.Object container, bool defaultOpen, SubWindowStyle style, System.Type customDrawerType) { if (customDrawerType == null) { return(null); } if (subWindowClass == null) { GetSubWinodwStyleClasses(); } else if (!subWindowClass.ContainsKey(style)) { GetSubWinodwStyleClasses(); } if (subWindowClass == null || !subWindowClass.ContainsKey(style)) { return(null); } System.Type type = subWindowClass[style]; SubWindowCustomDrawer drawer = (SubWindowCustomDrawer)System.Activator.CreateInstance(customDrawerType); if (drawer == null) { return(null); } drawer.SetContainer(container); return((SubWindow)System.Activator.CreateInstance(type, defaultOpen, drawer)); }