static HttpResponseDelegate() { defaultRenderer = new HttpResponseHeaderRenderer(); }
/// <summary> /// Initializes a new instance of the Table class with default settings /// </summary> public Table() { // starting setup this.init = true; // This call is required by the Windows.Forms Form Designer. components = new System.ComponentModel.Container(); // this.SetStyle(ControlStyles.UserPaint, true); this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); this.SetStyle(ControlStyles.DoubleBuffer, true); this.SetStyle(ControlStyles.ResizeRedraw, true); this.SetStyle(ControlStyles.Selectable, true); this.TabStop = true; this.Size = new Size(150, 150); this.BackColor = Color.White; // this.columnModel = null; this.tableModel = null; // header this.headerStyle = ColumnHeaderStyle.Clickable; this.headerAlignWithColumn = false; this.headerFont = this.Font; this.headerRenderer = new XPHeaderRenderer(); //this.headerRenderer = new GradientHeaderRenderer(); //this.headerRenderer = new FlatHeaderRenderer(); this.headerRenderer.Font = this.headerFont; this.headerContextMenu = new HeaderContextMenu(); this.includeHeaderInAutoWidth = true; this.columnResizing = true; this.resizingColumnIndex = -1; this.resizingColumnWidth = -1; this.hotColumn = -1; this.pressedColumn = -1; this.lastSortedColumn = -1; this.sortedColumnBackColor = Color.WhiteSmoke; // borders this.borderStyle = BorderStyle.Fixed3D; this.borderColor = Color.Black; this.unfocusedBorderColor = Color.Black; // scrolling this.scrollable = true; this.hScrollBar = new HScrollBar(); this.hScrollBar.Visible = false; this.hScrollBar.Location = new Point(this.BorderWidth, this.Height - this.BorderWidth - SystemInformation.HorizontalScrollBarHeight); this.hScrollBar.Width = this.Width - (this.BorderWidth * 2) - SystemInformation.VerticalScrollBarWidth; this.hScrollBar.Scroll += new ScrollEventHandler(this.OnHorizontalScroll); this.Controls.Add(this.hScrollBar); this.vScrollBar = new VScrollBar(); this.vScrollBar.Visible = false; this.vScrollBar.Location = new Point(this.Width - this.BorderWidth - SystemInformation.VerticalScrollBarWidth, this.BorderWidth); this.vScrollBar.Height = this.Height - (this.BorderWidth * 2) - SystemInformation.HorizontalScrollBarHeight; this.vScrollBar.Scroll += new ScrollEventHandler(this.OnVerticalScroll); this.vScrollBar.ValueChanged += new EventHandler(vScrollBar_ValueChanged); this.Controls.Add(this.vScrollBar); // this.gridLines = GridLines.None; ; this.gridColor = SystemColors.Control; this.gridLineStyle = GridLineStyle.Solid; this.allowSelection = true; this.allowRMBSelection = false; this.multiSelect = false; this.fullRowSelect = false; this.hideSelection = false; this.selectionBackColor = SystemColors.Highlight; this.selectionForeColor = SystemColors.HighlightText; this.unfocusedSelectionBackColor = SystemColors.Control; this.unfocusedSelectionForeColor = SystemColors.ControlText; this.selectionStyle = SelectionStyle.ListView; this.alternatingRowColor = Color.Transparent; this.alternatingRowSpan = 1; // current table state this.tableState = TableState.Normal; this.lastMouseCell = new CellPos(-1, -1); this.lastMouseDownCell = new CellPos(-1, -1); this.focusedCell = new CellPos(-1, -1); this.hoverTime = 1000; this.trackMouseEvent = null; this.ResetMouseEventArgs(); this.toolTip = new ToolTip(this.components); this.toolTip.Active = false; this.toolTip.InitialDelay = 1000; this.noItemsText = "There are no items in this view"; this.editingCell = new CellPos(-1, -1); this.curentCellEditor = null; this.editStartAction = EditStartAction.DoubleClick; this.customEditKey = Keys.F5; //this.tabMovesEditor = true; // showSelectionRectangle defaults to true this.showSelectionRectangle = true; // drang and drop _dragDropHelper = new DragDropHelper(this); _dragDropHelper.DragDropRenderer = new DragDropRenderer(); // for data binding listChangedHandler = new ListChangedEventHandler(dataManager_ListChanged); positionChangedHandler = new EventHandler(dataManager_PositionChanged); dataSourceColumnBinder = new DataSourceColumnBinder(); // finished setting up this.beginUpdateCount = 0; this.init = false; this.preview = false; }