/// <summary> /// Initializes a new instance of the ColumnCollectionEditor class /// using the specified collection type /// </summary> /// <param name="type">The type of the collection for this editor to edit</param> public I3ColumnCollectionEditor(Type type) : base(type) { this.columns = null; this.previewColumnModel = new I3ColumnModel(); this.previewColumnModel.Columns.Add(new I3TextColumn("Column", 116)); this.previewTableModel = new I3TableModel(); this.previewTableModel.Rows.Add(new I3Row()); //I3Cell cell = new I3Cell(); //cell.Editable = false; //cell.ToolTipText = "This is a Cell ToolTip"; //this.previewTableModel.Rows[0].Cells.Add(cell); this.previewTableModel.DefaultRowHeight = 20; this.previewTable = new I3Table(); this.previewTable.EnableColumnHeaderContextMenu = false; this.previewTable.Preview = true; this.previewTable.Size = new Size(120, 274); this.previewTable.Location = new Point(0, 24); this.previewTable.GridLines = I3GridLines.Both; this.previewTable.TabStop = false; this.previewTable.EnableToolTips = true; this.previewTable.ColumnModel = this.previewColumnModel; this.previewTable.TableModel = this.previewTableModel; this.previewLabel = new Label(); this.previewLabel.Name = "previewLabel"; this.previewLabel.Text = "нц└└:"; this.previewLabel.Size = new Size(140, 16); this.previewLabel.Location = new Point(0, 8); }
/// <summary> /// Initializes a new instance of the HeaderMouseEventArgs class with /// the specified source Column, Table, column index and column header bounds /// </summary> /// <param name="column">The Column that Raised the event</param> /// <param name="table">The Table the Column belongs to</param> /// <param name="index">The index of the Column</param> /// <param name="headerRect">The column header's bounding rectangle</param> public I3RowHeaderMouseEventArgs(I3Row row, I3Table table, int index, Rectangle headerRect) : base(MouseButtons.None, 0, -1, -1, 0) { this.row = row; this.table = table; this.index = index; this.headerRect = headerRect; }
/// <summary> /// Initializes a new instance of the HeaderMouseEventArgs class with /// the specified source Column, Table, column index, column header bounds /// and MouseEventArgs /// </summary> /// <param name="column">The Column that Raised the event</param> /// <param name="table">The Table the Column belongs to</param> /// <param name="index">The index of the Column</param> /// <param name="headerRect">The column header's bounding rectangle</param> /// <param name="mea">The MouseEventArgs that contains data about the /// mouse event</param> public I3RowHeaderMouseEventArgs(I3Row row, I3Table table, int index, Rectangle headerRect, MouseEventArgs mea) : base(mea.Button, mea.Clicks, mea.X, mea.Y, mea.Delta) { this.row = row; this.table = table; this.index = index; this.headerRect = headerRect; }
/// <summary> /// Initializes a new instance of the HeaderMouseEventArgs class with /// the specified source Column, Table, column index and column header bounds /// </summary> /// <param name="column">The Column that Raised the event</param> /// <param name="table">The Table the Column belongs to</param> /// <param name="index">The index of the Column</param> /// <param name="headerRect">The column header's bounding rectangle</param> public I3ColumnHeaderMouseEventArgs(I3Column column, I3Table table, int index, Rectangle headerRect) : base(MouseButtons.None, 0, -1, -1, 0) { this.column = column; this.table = table; this.index = index; this.headerRect = headerRect; }
/// <summary> /// Initializes a new instance of the HeaderMouseEventArgs class with /// the specified source Column, Table, column index, column header bounds /// and MouseEventArgs /// </summary> /// <param name="column">The Column that Raised the event</param> /// <param name="table">The Table the Column belongs to</param> /// <param name="index">The index of the Column</param> /// <param name="headerRect">The column header's bounding rectangle</param> /// <param name="mea">The MouseEventArgs that contains data about the /// mouse event</param> public I3ColumnHeaderMouseEventArgs(I3Column column, I3Table table, int index, Rectangle headerRect, MouseEventArgs mea) : base(mea.Button, mea.Clicks, mea.X, mea.Y, mea.Delta) { this.column = column; this.table = table; this.index = index; this.headerRect = headerRect; }
/// <summary> /// Initializes a new instance of the CellKeyEventArgs class with /// the specified source Cell, table, row index, column index and /// cell bounds /// </summary> /// <param name="cell">The Cell that Raised the event</param> /// <param name="table">The Table the Cell belongs to</param> /// <param name="cellPos"></param> /// <param name="cellRect">The Cell's bounding rectangle</param> /// <param name="kea"></param> public I3CellKeyEventArgs(I3Cell cell, I3Table table, I3CellPos cellPos, Rectangle cellRect, KeyEventArgs kea) : base(kea.KeyData) { this.cell = cell; this.table = table; this.row = cellPos.Row; this.column = cellPos.Column; this.cellRect = cellRect; }
/// <summary> /// Initializes a new instance of the CellKeyEventArgs class with /// the specified source Cell, table, row index, column index, cell /// bounds and KeyEventArgs /// </summary> /// <param name="cell">The Cell that Raised the event</param> /// <param name="table">The Table the Cell belongs to</param> /// <param name="row">The Row index of the Cell</param> /// <param name="column">The Column index of the Cell</param> /// <param name="cellRect">The Cell's bounding rectangle</param> /// <param name="kea"></param> public I3CellKeyEventArgs(I3Cell cell, I3Table table, int row, int column, Rectangle cellRect, KeyEventArgs kea) : base(kea.KeyData) { this.cell = cell; this.table = table; this.row = row; this.column = column; this.cellRect = cellRect; }
public I3PaintRowHeaderEventArgs(Graphics g, I3Row row, I3Table table, int columnIndex, Rectangle headerRect) : base(g, headerRect) { this._row = row; this._table = table; this._rowIndex = columnIndex; this._headerRect = headerRect; this._handled = false; }
/// <summary> /// Initializes a new instance of the CellMouseEventArgs class with /// the specified source Cell, table, row index, column index and /// cell bounds /// </summary> /// <param name="cell">The Cell that Raised the event</param> /// <param name="table">The Table the Cell belongs to</param> /// <param name="row">The Row index of the Cell</param> /// <param name="column">The Column index of the Cell</param> /// <param name="cellRect">The Cell's bounding rectangle</param> public I3CellMouseEventArgs(I3Cell cell, I3Table table, int row, int column, Rectangle cellRect) : base(MouseButtons.None, 0, -1, -1, 0) { this.cell = cell; this.table = table; this.row = row; this.column = column; this.cellRect = cellRect; }
/// <summary> /// Initializes a new instance of the CellEventArgs class with /// the specified Cell source, column index and row index /// </summary> /// <param name="source">The Cell that Raised the event</param> /// <param name="editor">The CellEditor used to edit the Cell</param> /// <param name="table">The Table that the Cell belongs to</param> /// <param name="row">The Column index of the Cell</param> /// <param name="column">The Row index of the Cell</param> /// <param name="cellRect"></param> public I3CellEditEventArgs(I3Cell source, II3CellEditor editor, I3Table table, int row, int column, Rectangle cellRect) : base(source, column, row) { this.editor = editor; this.table = table; this.cellRect = cellRect; this.cancel = false; }
/// <summary> /// Initializes a new instance of the CellMouseEventArgs class with /// the specified source Cell, table, row index, column index and /// cell bounds /// </summary> /// <param name="cell">The Cell that Raised the event</param> /// <param name="table">The Table the Cell belongs to</param> /// <param name="cellPos"></param> /// <param name="cellRect">The Cell's bounding rectangle</param> /// <param name="mea"></param> public I3CellMouseEventArgs(I3Cell cell, I3Table table, I3CellPos cellPos, Rectangle cellRect, MouseEventArgs mea) : base(mea.Button, mea.Clicks, mea.X, mea.Y, mea.Delta) { this.cell = cell; this.table = table; this.row = cellPos.Row; this.column = cellPos.Column; this.cellRect = cellRect; }
/// <summary> /// Initializes a new instance of the PaintHeaderEventArgs class with /// the specified graphics, column, table, column index, header style /// and clipping rectangle /// </summary> /// <param name="g">The Graphics used to paint the Column header</param> /// <param name="column">The Column to be painted</param> /// <param name="table">The Table the Column's ColumnModel belongs to</param> /// <param name="columnIndex">The index of the Column in the Table's ColumnModel</param> /// <param name="headerStyle">The style of the Column's header</param> /// <param name="headerRect">The Rectangle that represents the rectangle /// in which to paint</param> public I3PaintColumnHeaderEventArgs(Graphics g, I3Column column, I3Table table, int columnIndex, ColumnHeaderStyle headerStyle, Rectangle headerRect) : base(g, headerRect) { this._column = column; this._table = table; this._columnIndex = columnIndex; this._column = column; this._headerStyle = headerStyle; this._headerRect = headerRect; this._handled = false; }
/// <summary> /// Initializes a new instance of the CellEditor class with default settings /// </summary> protected I3CellEditor() { this.control = null; this.cell = null; this.table = null; this.cellPos = I3CellPos.Empty; this.cellRect = Rectangle.Empty; this.mouseMessageFilter = new I3MouseMessageFilter(this); this.keyMessageFilter = new I3KeyMessageFilter(this); }
/// <summary> /// 虚拟方法,从Table中移除编辑控件 /// Conceals the editor from the user and removes it from the Table's /// Control collection /// </summary> protected virtual void RemoveEditControl() { this.control.Visible = false; this.control.Parent = null; this.table.Focus(); this.cell = null; this.table = null; this.cellPos = I3CellPos.Empty; this.cellRect = Rectangle.Empty; }
/// <summary> /// 准备编辑,继承父类的功能 /// Prepares the CellEditor to edit the specified Cell /// </summary> /// <param name="cell">The Cell to be edited</param> /// <param name="table">The Table that contains the Cell</param> /// <param name="cellPos">A CellPos representing the position of the Cell</param> /// <param name="cellRect">The Rectangle that represents the Cells location and size</param> /// <param name="userSetEditorValues">Specifies whether the ICellEditors /// starting value has already been set by the user</param> /// <returns>true if the ICellEditor can continue editing the Cell, false otherwise</returns> public override bool PrepareForEditing(I3Cell cell, I3Table table, I3CellPos cellPos, Rectangle cellRect, bool userSetEditorValues) { if (!(table.ColumnModel.Columns[cellPos.Column] is I3DropDownColumn)) { throw new InvalidOperationException("Cannot edit Cell as DropDownCellEditor can only be used with a DropDownColumn"); } I3DropDownColumn dropDownColumn = table.ColumnModel.Columns[cellPos.Column] as I3DropDownColumn; this.DropDownStyle = dropDownColumn.DropDownStyle; return(base.PrepareForEditing(cell, table, cellPos, cellRect, userSetEditorValues)); }
/// <summary> /// Initialise default settings /// </summary> private void Init() { this._columns = null; this._table = null; this.columnHeaderHeight = I3ColumnModel.DefaultColumnHeaderHeight_Const; this._cellRenderers = new Hashtable(); this.SetCellRenderer("TEXT", new I3TextCellRenderer()); this.cellEditors = new Hashtable(); this.SetCellEditor("TEXT", new I3TextCellEditor()); }
public override bool PrepareForEditing(Cell.I3Cell cell, I3Table table, Cell.I3CellPos cellPos, Rectangle cellRect, bool userSetEditorValues) { if (!(table.ColumnModel.Columns[cellPos.Column] is I3ComboBoxColumn)) { throw new InvalidOperationException("Cannot edit Cell as ComboBoxColumn can only be used with a ComboBoxColumn"); } I3ComboBoxColumn comboBoxColumn = table.ColumnModel.Columns[cellPos.Column] as I3ComboBoxColumn; this.Items = comboBoxColumn.Items; this.TextBox.ReadOnly = comboBoxColumn.DropDownStyle == I3DropDownStyle.DropDownList; return(base.PrepareForEditing(cell, table, cellPos, cellRect, userSetEditorValues)); }
/// <summary> /// Initializes a new instance of the PaintCellEventArgs class with /// the specified graphics, table, row index, column index, selected value, /// focused value, mouse value and clipping rectangle /// </summary> /// <param name="g">The Graphics used to paint the Cell</param> /// <param name="cell">The Cell to be painted</param> /// <param name="table">The Table the Cell belongs to</param> /// <param name="row">The Row index of the Cell</param> /// <param name="column">The Column index of the Cell</param> /// <param name="selected">Specifies whether the Cell is selected</param> /// <param name="focused">Specifies whether the Cell has focus</param> /// <param name="sorted">Specifies whether the Cell's Column is sorted</param> /// <param name="editable">Specifies whether the Cell is able to be edited</param> /// <param name="enabled">Specifies whether the Cell is enabled</param> /// <param name="cellRect">The rectangle in which to paint the Cell</param> public I3PaintCellEventArgs(Graphics g, I3Cell cell, I3Table table, int row, int column, bool selected, bool focused, bool sorted, bool editable, bool enabled, Rectangle cellRect) : base(g, cellRect) { this.cell = cell; this.table = table; this.row = row; this.column = column; this.selected = selected; this.focused = focused; this.sorted = sorted; this.editable = editable; this.enabled = enabled; this.cellRect = cellRect; this.handled = false; }
public void ResponseSkinChanged(Control control, I3SkinType type) { I3Table table = control as I3Table; switch (type) { case I3SkinType.黑: table.BackColor = I3SkinChangedManager.DefaultBackColor_Dark; break; case I3SkinType.深蓝: table.BackColor = I3SkinChangedManager.DefaultBackColor_DarkBlue; break; default: table.BackColor = I3SkinChangedManager.DefaultBackColor_Blue; break; } }
/// <summary> /// Prepares the CellEditor to edit the specified Cell /// </summary> /// <param name="cell">The Cell to be edited</param> /// <param name="table">The Table that contains the Cell</param> /// <param name="cellPos">A CellPos representing the position of the Cell</param> /// <param name="cellRect">The Rectangle that represents the Cells location and size</param> /// <param name="userSetEditorValues">Specifies whether the ICellEditors /// starting value has already been set by the user</param> /// <returns>true if the ICellEditor can continue editing the Cell, false otherwise</returns> public override bool PrepareForEditing(I3Cell cell, I3Table table, I3CellPos cellPos, Rectangle cellRect, bool userSetEditorValues) { // if (!(table.ColumnModel.Columns[cellPos.Column] is I3NumberColumn)) { throw new InvalidOperationException("Cannot edit Cell as NumberCellEditor can only be used with a NumberColumn"); } if (!(table.ColumnModel.GetCellRenderer(cellPos.Column) is I3NumberCellRenderer)) { throw new InvalidOperationException("Cannot edit Cell as NumberCellEditor can only be used with a NumberColumn that uses a NumberCellRenderer"); } this.NumberColumnType = ((I3NumberColumn)table.ColumnModel.Columns[cellPos.Column]).NumberColumnType; this.Minimum = Convert.ToDecimal(((I3NumberColumn)table.ColumnModel.Columns[cellPos.Column]).Minimum); this.Maximum = Convert.ToDecimal(((I3NumberColumn)table.ColumnModel.Columns[cellPos.Column]).Maximum); this.Increment = Convert.ToDecimal(((I3NumberColumn)table.ColumnModel.Columns[cellPos.Column]).Increment); return(base.PrepareForEditing(cell, table, cellPos, cellRect, userSetEditorValues)); }
/// <summary> /// Edits the value of the specified object using the specified /// service provider and context /// </summary> /// <param name="context">An ITypeDescriptorContext that can be /// used to gain additional context information</param> /// <param name="isp">A service provider object through which /// editing services can be obtained</param> /// <param name="value">The object to edit the value of</param> /// <returns>The new value of the object. If the value of the /// object has not changed, this should return the same object /// it was passed</returns> public override object EditValue(ITypeDescriptorContext context, IServiceProvider isp, object value) { this.columns = (I3ColumnCollection)value; // for some reason (might be beacause Column is an // abstract class) the table doesn't get redrawn // when a columns property changes, but we can get // around that by subscribing to the columns // PropertyChange event and passing the message on // to the table ourselves. we need to do this for // all the existing columns in the collection for (int i = 0; i < this.columns.Count; i++) { this.columns[i].PropertyChanged += new I3ColumnEventHandler(column_PropertyChanged); } I3ColumnModel model = (I3ColumnModel)context.Instance; I3Table oldTable = model.Table; if (oldTable != null) { oldTable.ColumnModel = null; } this.previewTable.ColumnModel = model; this.CheckCells(); object returnObject = base.EditValue(context, isp, value); if (oldTable != null) { oldTable.ColumnModel = model; } this.previewTable.ColumnModel = null; if (model.Table != null) { model.Table.PerformLayout(); model.Table.Refresh(); } return(returnObject); }
/// <summary> /// 虚拟方法,准备编辑,在ICellEditor中定义 /// Prepares the CellEditor to edit the specified Cell /// </summary> /// <param name="cell">The Cell to be edited</param> /// <param name="table">The Table that contains the Cell</param> /// <param name="cellPos">A CellPos representing the position of the Cell</param> /// <param name="cellRect">The Rectangle that represents the Cells location and size</param> /// <param name="userSetEditorValues">Specifies whether the ICellEditors /// starting value has already been set by the user</param> /// <returns>true if the ICellEditor can continue editing the Cell, false otherwise</returns> public virtual bool PrepareForEditing(I3Cell cell, I3Table table, I3CellPos cellPos, Rectangle cellRect, bool userSetEditorValues) { //初始化值 this.cell = cell; this.table = table; this.cellPos = cellPos; this.cellRect = cellRect; //检查用户是否已经自己设置了编辑控件的值,如果没有则调用 SetEditValue() 方法进行设置 // check if the user has already set the editors value for us if (!userSetEditorValues) { this.SetEditValue(); } //设置编辑控件的位置和大小 this.SetEditLocation(cellRect); //引发开始编辑事件 // raise the BeginEdit event I3CellEditEventArgs e = new I3CellEditEventArgs(cell, this, table, cellPos.Row, cellPos.Column, cellRect); e.Handled = userSetEditorValues; this.OnBeginEdit(e); //如果编辑被退出,移动编辑控件并返回false // if the edit has been canceled, remove the editor and return false if (e.Cancel) { this.RemoveEditControl(); return(false); } return(true); }
/// <summary> /// Initializes a new instance of the CellFocusEventArgs class with /// the specified source Cell, table, row index, column index and /// cell bounds /// </summary> /// <param name="source">The Cell that Raised the event</param> /// <param name="table">The Table the Cell belongs to</param> /// <param name="row">The Row index of the Cell</param> /// <param name="column">The Column index of the Cell</param> /// <param name="cellRect">The Cell's bounding rectangle</param> public I3CellFocusEventArgs(I3Cell source, I3Table table, int row, int column, Rectangle cellRect) : base(source, column, row) { this.table = table; this.cellRect = cellRect; }
private void InitializeComponent() { this.groupBox1 = new System.Windows.Forms.GroupBox(); this.okButton = new System.Windows.Forms.Button(); this.cancelButton = new System.Windows.Forms.Button(); this.columnTable = new IE310.Table.Models.I3Table(); this.columnModel1 = new IE310.Table.Column.I3ColumnModel(); this.cbc = new IE310.Table.Column.I3CheckBoxColumn(); this.tc = new IE310.Table.Column.I3TextColumn(); this.tableModel1 = new IE310.Table.Row.I3TableModel(); this.button3 = new System.Windows.Forms.Button(); this.button2 = new System.Windows.Forms.Button(); this.button1 = new System.Windows.Forms.Button(); ((System.ComponentModel.ISupportInitialize)(this.columnTable)).BeginInit(); this.SuspendLayout(); // // groupBox1 // this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.groupBox1.Location = new System.Drawing.Point(8, 375); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(322, 8); this.groupBox1.TabIndex = 9; this.groupBox1.TabStop = false; // // okButton // this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.okButton.FlatStyle = System.Windows.Forms.FlatStyle.System; this.okButton.Location = new System.Drawing.Point(168, 395); this.okButton.Name = "okButton"; this.okButton.Size = new System.Drawing.Size(75, 23); this.okButton.TabIndex = 10; this.okButton.Text = "确定"; this.okButton.Click += new System.EventHandler(this.okButton_Click); // // cancelButton // this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.cancelButton.FlatStyle = System.Windows.Forms.FlatStyle.System; this.cancelButton.Location = new System.Drawing.Point(253, 395); this.cancelButton.Name = "cancelButton"; this.cancelButton.Size = new System.Drawing.Size(75, 23); this.cancelButton.TabIndex = 11; this.cancelButton.Text = "取消"; // // columnTable // this.columnTable.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.columnTable.ColumnHeaderDisplayMode = IE310.Table.Header.I3ColumnHeaderDisplayMode.Text; this.columnTable.ColumnModel = this.columnModel1; this.columnTable.EnableToolTips = true; this.columnTable.ExtendLastCol = true; this.columnTable.GridColor = System.Drawing.SystemColors.ActiveCaption; this.columnTable.HeaderFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold); this.columnTable.Location = new System.Drawing.Point(12, 46); this.columnTable.Name = "columnTable"; this.columnTable.RowHeaderDisplayMode = IE310.Table.Header.I3RowHeaderDisplayMode.Num; this.columnTable.Size = new System.Drawing.Size(316, 323); this.columnTable.TabIndex = 1; this.columnTable.TableModel = this.tableModel1; this.columnTable.ToolTipAutomaticDelay = 1000; this.columnTable.ToolTipAutoPopDelay = 10000; this.columnTable.UnfocusedSelectionBackColor = System.Drawing.SystemColors.Highlight; this.columnTable.UnfocusedSelectionForeColor = System.Drawing.SystemColors.HighlightText; // // columnModel1 // this.columnModel1.ColumnHeaderHeight = 20; this.columnModel1.Columns.AddRange(new IE310.Table.Column.I3Column[] { this.cbc, this.tc }); // // cbc // this.cbc.Caption = "选择"; this.cbc.CellAlignment = IE310.Table.Column.I3ColumnAlignment.Center; this.cbc.CheckBoxColumnStyle = IE310.Table.Column.I3CheckBoxColumnStyle.Image; this.cbc.CustomCheckImage = null; this.cbc.CustomCheckImageFillClient = false; this.cbc.CustomCheckImageSize = new System.Drawing.Size(24, 18); this.cbc.DataMember = ""; this.cbc.Dictionary = null; this.cbc.DrawText = false; this.cbc.IsSelected = false; this.cbc.Key = ""; this.cbc.NeedWidth = 34.76953F; this.cbc.Sortable = false; this.cbc.Tag = null; this.cbc.ToolTipText = "点击左键全选\r\n点击右键反选"; this.cbc.Width = 49; // // tc // this.tc.Caption = "列名"; this.tc.CellAlignment = IE310.Table.Column.I3ColumnAlignment.Center; this.tc.DataMember = ""; this.tc.Dictionary = null; this.tc.Editable = false; this.tc.IsSelected = false; this.tc.Key = ""; this.tc.NeedWidth = 34.76953F; this.tc.Sortable = false; this.tc.Tag = null; this.tc.Width = 225; // // tableModel1 // this.tableModel1.DataSource = null; this.tableModel1.DefaultRowHeight = 20; // // button3 // this.button3.Image = global::IE310.Table.Properties.Resources.backselect32; this.button3.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.button3.Location = new System.Drawing.Point(150, 12); this.button3.Name = "button3"; this.button3.Size = new System.Drawing.Size(58, 23); this.button3.TabIndex = 14; this.button3.Text = "反选"; this.button3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.button3.UseVisualStyleBackColor = true; this.button3.Click += new System.EventHandler(this.button3_Click); // // button2 // this.button2.Image = global::IE310.Table.Properties.Resources.unselect32; this.button2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.button2.Location = new System.Drawing.Point(76, 12); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(68, 23); this.button2.TabIndex = 13; this.button2.Text = "全不选"; this.button2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.button2.UseVisualStyleBackColor = true; this.button2.Click += new System.EventHandler(this.button2_Click); // // button1 // this.button1.Image = global::IE310.Table.Properties.Resources.allselect32; this.button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.button1.Location = new System.Drawing.Point(12, 12); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(58, 23); this.button1.TabIndex = 12; this.button1.Text = "全选"; this.button1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(this.button1_Click); // // I3ShowColumnsDialog // this.AcceptButton = this.okButton; this.AutoScaleBaseSize = new System.Drawing.Size(5, 14); this.CancelButton = this.cancelButton; this.ClientSize = new System.Drawing.Size(339, 431); this.Controls.Add(this.button3); this.Controls.Add(this.button2); this.Controls.Add(this.button1); this.Controls.Add(this.cancelButton); this.Controls.Add(this.okButton); this.Controls.Add(this.groupBox1); this.Controls.Add(this.columnTable); this.Font = new System.Drawing.Font("Tahoma", 8.25F); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "I3ShowColumnsDialog"; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "列设置"; ((System.ComponentModel.ISupportInitialize)(this.columnTable)).EndInit(); this.ResumeLayout(false); }
/// <summary> /// Initializes a new instance of the CellEventArgs class with /// the specified Cell source, column index and row index /// </summary> /// <param name="source">The Cell that Raised the event</param> /// <param name="editor">The CellEditor used to edit the Cell</param> /// <param name="table">The Table that the Cell belongs to</param> public I3CellEditEventArgs(I3Cell source, II3CellEditor editor, I3Table table) : this(source, editor, table, -1, -1, Rectangle.Empty) { }
/// <summary> /// Gets whether the specified Table is using a NumericCellEditor to edit the /// Cell at the specified CellPos /// </summary> /// <param name="table">The Table to check</param> /// <param name="cellPos">A CellPos that represents the Cell to check</param> /// <returns>true if the specified Table is using a NumericCellEditor to edit the /// Cell at the specified CellPos, false otherwise</returns> internal bool TableUsingNumericCellEditor(I3Table table, I3CellPos cellPos) { return(table.IsEditing && cellPos == table.EditingCell && table.EditingCellEditor is I3NumberCellEditor); }
/// <summary> /// 设置Table /// </summary> /// <param name="table"></param> internal void SetTable(I3Table table) { this._table = table; }