示例#1
0
        /// <summary>
        /// 设置应用程序框架。
        /// </summary>
        /// <param name="application"></param>
        public void SetApplication(WindowsFormApplicationClass application)
        {
            this.m_Application = application;
            this.img           = new ImageList();

            this.ImageList    = this.img;
            this.ItemHeight   = 18;
            this.BorderStyle  = System.Windows.Forms.BorderStyle.None;
            this.AfterSelect += new TreeViewEventHandler(treeView_AfterSelect);
            this.AfterExpand += new TreeViewEventHandler(treeView_AfterExpand);
            this.MouseClick  += new MouseEventHandler(treeView_MouseClick);
        }
示例#2
0
        /// <summary>
        /// 在应用程序中心区域或四周显示指定控件的视图界面。
        /// </summary>
        /// <param name="application">应用程序框架。</param>
        /// <param name="control">需要显示的控件,该控件必需实现 IControlView 接口并提供无参数的构造函数,另外可根据需要添加 IUseAccount 接口。</param>
        /// <param name="title">显示在视图标签页上的文字</param>
        /// <param name="icon16">显示在视图标签页上的图标。如不需显示图标则传入null。</param>
        public ControlView(WindowsFormApplicationClass application, System.Windows.Forms.Control control, string title, System.Drawing.Image icon16)
            : base(application)
        {
            if ((control is IControlView) == false)
            {
                throw new Exception(control.GetType().FullName + " 必须实现 IControlView 接口方可作为控件视图呈现在界面上。");
            }

            System.Reflection.ConstructorInfo ci = control.GetType().GetConstructor(new System.Type[] { });
            if (ci == null)
            {
                throw new Exception(control.GetType().FullName + " 必须无参数的构造函数方可作为控件视图呈现在界面上。");
            }

            this.m_Control = control;
            this.m_Title   = title;
            this.m_Icon16  = icon16;
        }
示例#3
0
        private ParameterValue[] m_ParameterValues;                     //各参数指定值

        /// <summary>
        /// 在应用程序中心区域或四周显示的HTML插件、控件插件视图界面。
        /// </summary>
        /// <param name="application">应用程序框架。</param>
        /// <param name="pluginType">插件类型。</param>
        public PluginViewBase(WindowsFormApplicationClass application, PluginType pluginType) : base(application)
        {
            this.PluginType = pluginType;

            if (Function.IsInheritableBaseType(pluginType.Type, typeof(System.Windows.Forms.UserControl)))
            {
                this.m_IsHtmlPlugin = false;
            }

            if (pluginType.Type.GetInterface(typeof(IHtmlPlugin).FullName, true) != null)
            {
                this.m_IsHtmlPlugin = true;
            }
            else if (Function.IsInheritableBaseType(pluginType.Type, typeof(System.Windows.Forms.Control)))
            {
                this.m_IsHtmlPlugin = false;
            }
            else
            {
                throw new Exception(pluginType.Type.FullName + " 不能作为视图插件加载。");
            }
        }
 /// <summary>
 /// 设置应用程序框架。
 /// </summary>
 /// <param name="application">应用程序框架。</param>
 public void SetApplication(Forms.FormApplicationClass application)
 {
     this.m_Application = (WindowsFormApplicationClass)application;
 }
示例#5
0
 /// <summary>
 /// 工具栏插件类型描述。
 /// </summary>
 /// <param name="application"></param>
 /// <param name="type"></param>
 internal ToolbarType(WindowsFormApplicationClass application, Type type)
 {
     this.m_Application = application;
     this.Type          = type;
 }
示例#6
0
 /// <summary>
 /// 设备插件视图。
 /// </summary>
 /// <param name="application">应用程序框架。</param>
 /// <param name="pluginType">插件类型。</param>
 /// <param name="devices">该视图需要呈现的设备对象。</param>
 public DevicePluginView(WindowsFormApplicationClass application, PluginType pluginType, Device[] devices)
     : base(application, pluginType)
 {
     this.Devices = devices;
 }
示例#7
0
 /// <summary>
 /// 基础操作插件视图
 /// </summary>
 /// <param name="application">应用程序框架</param>
 /// <param name="pluginType">插件类型</param>
 /// <param name="ID">操作key</param>
 public OperationPluginView(WindowsFormApplicationClass application, PluginType pluginType, int ID)
     : base(application, pluginType)
 {
     this.ID = ID;
 }
示例#8
0
 /// <summary>
 /// 重写带参数的全局视图,主用用来做增 删 改 操作
 /// </summary>
 /// <param name="application">应用程序框架</param>
 /// <param name="pluginType">插件类型</param>
 /// <param name="id">具体操作的ID,这个参数可以变位hashtable 或者list</param>
 public GlobalPluginView(WindowsFormApplicationClass application, PluginType pluginType, string id)
     : base(application, pluginType)
 {
     this._id = id;
 }
示例#9
0
 /// <summary>
 /// 全局插件视图。
 /// </summary>
 /// <param name="application">应用程序框架。</param>
 /// <param name="pluginType">插件类型。</param>
 public GlobalPluginView(WindowsFormApplicationClass application, PluginType pluginType)
     : base(application, pluginType)
 {
 }
示例#10
0
 /// <summary>
 /// 分类插件视图。
 /// </summary>
 /// <param name="application">应用程序框架。</param>
 /// <param name="pluginType">插件类型。</param>
 /// <param name="classifys">该视图需要呈现的分类对象。</param>
 public ClassifyPluginView(WindowsFormApplicationClass application, PluginType pluginType, Classify[] classifys)
     : base(application, pluginType)
 {
     this.Classifys = classifys;
 }
示例#11
0
 /// <summary>
 /// 状态栏插件类型描述。
 /// </summary>
 /// <param name="application"></param>
 /// <param name="type"></param>
 internal StatusBarItemType(WindowsFormApplicationClass application, Type type)
 {
     this.m_Application = application;
     this.Type          = type;
 }
示例#12
0
 /// <summary>
 /// 在应用程序中心区域或四周显示的视图界面。
 /// </summary>
 /// <param name="application">应用程序框架。</param>
 public ViewBase(WindowsFormApplicationClass application)
 {
     this.Application = application;
 }