/// <summary> /// 设置窗体工具栏 /// </summary> /// <returns></returns> public static void SetWindowToolsBar(Form TargetForm) { Tools.IToolsBarManager manager = LemonEnvironment.GetInstance().ToolsBarManager; if (manager != null) { manager.CreateToolsBarToForm(TargetForm); } }
/// <summary> /// 获取分组工具栏项 /// </summary> /// <returns></returns> public static List <IToolsItem> GetToolsItem() { Tools.IToolsBarManager manager = LemonEnvironment.GetInstance().ToolsBarManager; if (manager != null) { return(manager.GetItemAll()); } return(null); }
/// <summary> /// 获取分组工具栏项 /// </summary> /// <returns></returns> public static List <IToolsItem> GetGroupToolsItem(string GroupName) { Tools.IToolsBarManager manager = LemonEnvironment.GetInstance().ToolsBarManager; if (manager != null) { return(manager.GetGroupItem(GroupName)); } return(null); }
/// <summary> /// 获取具备工具栏配置的窗体名称列表 /// </summary> /// <returns></returns> public static List <string> GetToolsBarFormName() { Tools.IToolsBarManager manager = LemonEnvironment.GetInstance().ToolsBarManager; if (manager != null) { return(manager.ParentFormNames); } else { return(null); } }
/// <summary> /// 从框架根目录中加载工具栏管理器 /// </summary> /// <returns></returns> protected virtual Tools.IToolsBarManager LoadToolsBarManager() { Tools.IToolsBarManager result = null; string s = Lemon.GetCSFRootDirectory(); result = Lemon.FindInstanceFromDirectory <Tools.IToolsBarManager>(s); if (result != null) { result.LoadToolsBar(); } return(result); }