/// <summary>
 /// 表格默认配置
 /// </summary>
 /// <param name="cellHeight">单元格高</param>
 /// <param name="colHeadersHeight">列标题高</param>
 private void initDatatableDefConfig()
 {
     ControlsUtils.AsynchronousMethod(this, 1, delegate {
         // 设置单元格默认样式
         setDefaultCellStyle();
         // 设置列标题默认样式
         setDefaultColumnHeadStyle();
         // 设置行标题默认样式
         setDefaultRowHeadStyle();
     });
     // 设置基本样式
     setDataTableStyle();
     // 绑定右键菜单并使用自定义的样式
     DataGridViewRightMenu.bindingDataGridView(this);
 }
Beispiel #2
0
        private static IComponentInitMode <Control> getInitControlRelation(DefaultNameEnum name)
        {
            IComponentInitMode <Control> mode = null;

            if (DefaultNameEnum.ADD_PAGE_BUTTON.Equals(name))
            {
                mode = new RedrawAddPageBut();
            }
            else if (DefaultNameEnum.DATA_GRID_VIEW_REDRAW.Equals(name))
            {
                mode = new RedrawDataTable();
            }
            else if (DefaultNameEnum.MAIN_CONTAINER.Equals(name))
            {
                mode = new RedrawMainContainer();
            }
            else if (DefaultNameEnum.TAB_CONTENT.Equals(name))
            {
                mode = new RedrawTabControl();
            }
            else if (DefaultNameEnum.TAB_PAGE_NAME.Equals(name))
            {
                mode = new RedrawTabPage();
            }
            else if (DefaultNameEnum.TEXTBOX_NAME_DEF.Equals(name))
            {
                mode = new RedrawTextBox();
            }
            else if (DefaultNameEnum.TEXT_RIGHT_MENU.Equals(name))
            {
                mode = new TextRightMenu();
            }
            else if (DefaultNameEnum.DATA_VIEW_RIGHT_MENU.Equals(name))
            {
                mode = new DataGridViewRightMenu();
            }
            else if (DefaultNameEnum.TOOL_START.Equals(name))
            {
                mode = new RedrawStatusBar();
            }
            else if (DefaultNameEnum.PROMPT_MESSAGE.Equals(name))
            {
                mode = new RedrawPromptMessBut();
            }
            return(mode);
        }