/// <summary> /// Create a cloned copy of the column. /// </summary> /// <returns></returns> public override object Clone() { KryptonDataGridViewTextBoxColumn cloned = base.Clone() as KryptonDataGridViewTextBoxColumn; cloned.Multiline = Multiline; cloned.MultilineStringEditor = MultilineStringEditor; return(cloned); }
/// <summary> /// Initializes the designer with the specified component. /// </summary> /// <param name="component">The IComponent to associate the designer with.</param> public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); // Cast to correct type _textBox = component as KryptonDataGridViewTextBoxColumn; // Get access to the design services _changeService = (IComponentChangeService)GetService(typeof(IComponentChangeService)); }
private void CreateColumns() { foreach (ColumnProperty c in (List <ColumnProperty>) this.field.Data) { DataGridViewColumn col; if (c.Reference == null) { col = new KryptonDataGridViewTextBoxColumn(); } else { col = new KryptonDataGridViewComboBoxColumn(); KryptonDataGridViewComboBoxColumn colCombo = (KryptonDataGridViewComboBoxColumn)col; colCombo.DropDownStyle = ComboBoxStyle.DropDownList; ButtonSpecAny b = new ButtonSpecAny(); b.Type = PaletteButtonSpecStyle.Close; b.Edge = PaletteRelativeEdgeAlign.Near; b.Click += new EventHandler(this.ClearFieldData); colCombo.ButtonSpecs.Add(b); foreach (ObjectData od in this.database.Objects.GetData(c.Reference)) { colCombo.Items.Add(od.ToString()); } } col.Tag = c; col.Name = c.Name; col.HeaderText = c.Name; col.Width = c.Width; col.MinimumWidth = c.MinWidth; col.Visible = c.Visible; col.Resizable = c.Resizable ? DataGridViewTriState.True : DataGridViewTriState.False; col.Frozen = c.Frozen; col.DividerWidth = c.DividerWidth; col.AutoSizeMode = c.AutoSize ? DataGridViewAutoSizeColumnMode.Fill : DataGridViewAutoSizeColumnMode.None; col.FillWeight = c.FillWeight; this.grid.Columns.Add(col); } grid.StateCommon.Background.Color1 = Color.Transparent; }
/// <summary> /// Метод создает колонки для соответствующего языка. При этом создается минимум одна колонка, /// содержащая слово языка. Дополнительно, в зависимости от настроек, создаются колоники /// содержашие часть речи, произношение, синонимы, антонимы и т.д. /// При создании колонок, последним присваиваются имена: /// колонке, содержащей слово языка - трехбуквенный код языка, остальным - то же имя с добавлением /// соответсвующего префикса. Префиксы могут быть следующими: /// <para>- WT - часть речи;</para> /// <para>- PW - произношение;</para> /// <para>- SP - пример;</para> /// <para>- CW - комментарий;</para> /// <para>- MW - значение.</para> /// <para>Таким образом имя первой колонки состоит из 3 символов, остальные из 5-ти.</para> /// </summary> /// <param name = "session"></param> /// <param name="lang">Язык, слова которого должны содержаться в колонках.</param> void CreateColumnLanguage(ISession session, Language lang) { KryptonDataGridViewTextBoxColumn column = new KryptonDataGridViewTextBoxColumn(); column.HeaderText = string.IsNullOrWhiteSpace(lang.AlternateName) ? lang.Name : lang.AlternateName; column.Name = lang.CultureLocale; column.Width = 100; column.Tag = lang; gridEntries.Columns.Add(column); foreach (IColumn c in lang.VisibleColumns) { if (c.IsCombo) { CreateColumn <KryptonDataGridViewComboBoxColumn>(lang, c); } else { CreateColumn <KryptonDataGridViewTextBoxColumn>(lang, c); } } }
private void InitialiseGrid() { _transactionGrid.Columns.Clear(); KryptonDataGridViewTextBoxColumn DateCol = new KryptonDataGridViewTextBoxColumn(); DateCol.Name = "Date"; DateCol.SortMode = DataGridViewColumnSortMode.NotSortable; _transactionGrid.Columns.Add(DateCol); KryptonDataGridViewTextBoxColumn AmountCol = new KryptonDataGridViewTextBoxColumn(); AmountCol.Name = "Amount"; AmountCol.SortMode = DataGridViewColumnSortMode.NotSortable; _transactionGrid.Columns.Add(AmountCol); _budget.Clear(); _columns.Clear(); _columns.Add("Date", 0); _columns.Add("Amount", 1); _budget.Add("Amount", 0); int i = 2; foreach (Budget b in _dataAccess.Budgets) { KryptonDataGridViewTextBoxColumn col = new KryptonDataGridViewTextBoxColumn(); col.Name = b.BudgetName; col.ToolTipText = "£" + Math.Round(b.Amount / 100.0, 2).ToString() + " " + b.BudgetPeriod.ToString(); col.SortMode = DataGridViewColumnSortMode.NotSortable; _transactionGrid.Columns.Add(col); _columns.Add(b.BudgetName, i++); _budget.Add(b.BudgetName, 0); } KryptonDataGridViewTextBoxColumn DescCol = new KryptonDataGridViewTextBoxColumn(); DescCol.Name = "Description"; DescCol.SortMode = DataGridViewColumnSortMode.NotSortable; _transactionGrid.Columns.Add(DescCol); _columns.Add("Description", i++); }
private void InitializeComponent() { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); this.tableLayoutPanel14 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.btnnext = new ComponentFactory.Krypton.Toolkit.KryptonButton(); this.btnsave = new ComponentFactory.Krypton.Toolkit.KryptonButton(); this.kryptonPanel29 = new ComponentFactory.Krypton.Toolkit.KryptonPanel(); this.kryptonLabel1 = new ComponentFactory.Krypton.Toolkit.KryptonLabel(); this.kryptonLabel117 = new ComponentFactory.Krypton.Toolkit.KryptonLabel(); this.dTechnologyAwards = new ComponentFactory.Krypton.Toolkit.KryptonDataGridView(); this.scienceid = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.sciencename = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.sciencelevel = new ComponentFactory.Krypton.Toolkit.KryptonDataGridViewButtonColumn(); this.sciencedate = new ComponentFactory.Krypton.Toolkit.KryptonDataGridViewNumericUpDownColumn(); this.scienceorder = new ComponentFactory.Krypton.Toolkit.KryptonDataGridViewTextBoxColumn(); this.scienceattup = new System.Windows.Forms.DataGridViewImageColumn(); this.scienceattainfo = new ComponentFactory.Krypton.Toolkit.KryptonDataGridViewLinkColumn(); this.hiddenStoreName = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.UpLoadFullyName = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.scienceup = new System.Windows.Forms.DataGridViewImageColumn(); this.sciencedown = new System.Windows.Forms.DataGridViewImageColumn(); this.sciencedelete = new System.Windows.Forms.DataGridViewImageColumn(); this.tecOrder = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.tableLayoutPanel14.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.kryptonPanel29)).BeginInit(); this.kryptonPanel29.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dTechnologyAwards)).BeginInit(); this.SuspendLayout(); // // tableLayoutPanel14 // this.tableLayoutPanel14.ColumnCount = 3; this.tableLayoutPanel14.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 50F)); this.tableLayoutPanel14.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel14.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 50F)); this.tableLayoutPanel14.Controls.Add(this.tableLayoutPanel1, 1, 3); this.tableLayoutPanel14.Controls.Add(this.kryptonPanel29, 1, 1); this.tableLayoutPanel14.Controls.Add(this.dTechnologyAwards, 1, 2); this.tableLayoutPanel14.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel14.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanel14.Name = "tableLayoutPanel14"; this.tableLayoutPanel14.RowCount = 5; this.tableLayoutPanel14.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.tableLayoutPanel14.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 80F)); this.tableLayoutPanel14.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel14.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F)); this.tableLayoutPanel14.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.tableLayoutPanel14.Size = new System.Drawing.Size(1020, 603); this.tableLayoutPanel14.TabIndex = 2; // // tableLayoutPanel1 // this.tableLayoutPanel1.ColumnCount = 3; this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 103F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 100F)); this.tableLayoutPanel1.Controls.Add(this.btnnext, 2, 0); this.tableLayoutPanel1.Controls.Add(this.btnsave, 1, 0); this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel1.Location = new System.Drawing.Point(53, 546); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.RowCount = 1; this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel1.Size = new System.Drawing.Size(914, 34); this.tableLayoutPanel1.TabIndex = 5; // // btnnext // this.btnnext.Location = new System.Drawing.Point(817, 3); this.btnnext.Name = "btnnext"; this.btnnext.Size = new System.Drawing.Size(90, 25); this.btnnext.TabIndex = 1; this.btnnext.Values.Text = "下一页"; this.btnnext.Click += new System.EventHandler(this.btnnext_Click); // // btnsave // this.btnsave.Location = new System.Drawing.Point(714, 3); this.btnsave.Name = "btnsave"; this.btnsave.Size = new System.Drawing.Size(90, 25); this.btnsave.TabIndex = 0; this.btnsave.Values.Text = "保存"; this.btnsave.Click += new System.EventHandler(this.btnsave_Click); // // kryptonPanel29 // this.kryptonPanel29.Controls.Add(this.kryptonLabel1); this.kryptonPanel29.Controls.Add(this.kryptonLabel117); this.kryptonPanel29.Dock = System.Windows.Forms.DockStyle.Fill; this.kryptonPanel29.Location = new System.Drawing.Point(50, 20); this.kryptonPanel29.Margin = new System.Windows.Forms.Padding(0); this.kryptonPanel29.Name = "kryptonPanel29"; this.kryptonPanel29.Size = new System.Drawing.Size(920, 80); this.kryptonPanel29.TabIndex = 0; // // kryptonLabel1 // this.kryptonLabel1.Location = new System.Drawing.Point(3, 36); this.kryptonLabel1.Name = "kryptonLabel1"; this.kryptonLabel1.Size = new System.Drawing.Size(308, 41); this.kryptonLabel1.StateCommon.ShortText.Font = new System.Drawing.Font("仿宋_GB2312", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.kryptonLabel1.TabIndex = 2; this.kryptonLabel1.Values.Text = "1.附件材料需为PDF或者JPG格式。\r\n2.提交纸质材料时,附件需要完整打印。"; // // kryptonLabel117 // this.kryptonLabel117.Location = new System.Drawing.Point(0, 10); this.kryptonLabel117.Name = "kryptonLabel117"; this.kryptonLabel117.Size = new System.Drawing.Size(610, 27); this.kryptonLabel117.StateCommon.LongText.Font = new System.Drawing.Font("楷体_GB2312", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.kryptonLabel117.StateCommon.ShortText.Font = new System.Drawing.Font("黑体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.kryptonLabel117.TabIndex = 0; this.kryptonLabel117.Values.ExtraText = "(10项以内,主要包括国家、省部级或军队科技奖励)"; this.kryptonLabel117.Values.Text = "七、重要科技奖项情况\r\n"; // // dTechnologyAwards // this.dTechnologyAwards.AllowUserToResizeRows = false; this.dTechnologyAwards.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.DisplayedCellsExceptHeaders; this.dTechnologyAwards.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.scienceid, this.sciencename, this.sciencelevel, this.sciencedate, this.scienceorder, this.scienceattup, this.scienceattainfo, this.hiddenStoreName, this.UpLoadFullyName, this.scienceup, this.sciencedown, this.sciencedelete, this.tecOrder }); this.dTechnologyAwards.Dock = System.Windows.Forms.DockStyle.Fill; this.dTechnologyAwards.Location = new System.Drawing.Point(53, 103); this.dTechnologyAwards.MultiSelect = false; this.dTechnologyAwards.Name = "dTechnologyAwards"; dataGridViewCellStyle1.Font = new System.Drawing.Font("仿宋_GB2312", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; this.dTechnologyAwards.RowsDefaultCellStyle = dataGridViewCellStyle1; this.dTechnologyAwards.RowTemplate.Height = 28; this.dTechnologyAwards.Size = new System.Drawing.Size(914, 437); this.dTechnologyAwards.StateCommon.Background.Color1 = System.Drawing.Color.White; this.dTechnologyAwards.StateCommon.BackStyle = ComponentFactory.Krypton.Toolkit.PaletteBackStyle.GridBackgroundList; this.dTechnologyAwards.StateCommon.HeaderColumn.Content.Font = new System.Drawing.Font("黑体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.dTechnologyAwards.StateCommon.HeaderColumn.Content.TextH = ComponentFactory.Krypton.Toolkit.PaletteRelativeAlign.Center; this.dTechnologyAwards.TabIndex = 1; this.dTechnologyAwards.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dTechnologyAwards_CellContentClick); this.dTechnologyAwards.RowsAdded += new System.Windows.Forms.DataGridViewRowsAddedEventHandler(this.dTechnologyAwards_RowsAdded); // // scienceid // this.scienceid.HeaderText = "序号"; this.scienceid.Name = "scienceid"; this.scienceid.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; this.scienceid.Visible = false; this.scienceid.Width = 40; // // sciencename // this.sciencename.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.sciencename.HeaderText = "项目名称"; this.sciencename.MinimumWidth = 100; this.sciencename.Name = "sciencename"; this.sciencename.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; // // sciencelevel // this.sciencelevel.HeaderText = "奖励类别及等级"; this.sciencelevel.Name = "sciencelevel"; this.sciencelevel.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.sciencelevel.Width = 130; // // sciencedate // this.sciencedate.HeaderText = "获奖时间"; this.sciencedate.Maximum = new decimal(new int[] { 9999, 0, 0, 0 }); this.sciencedate.Minimum = new decimal(new int[] { 1990, 0, 0, 0 }); this.sciencedate.Name = "sciencedate"; this.sciencedate.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.sciencedate.Width = 100; // // scienceorder // this.scienceorder.HeaderText = "排名"; this.scienceorder.Name = "scienceorder"; this.scienceorder.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; this.scienceorder.Width = 50; // // scienceattup // this.scienceattup.HeaderText = "附件"; this.scienceattup.Name = "scienceattup"; this.scienceattup.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.scienceattup.Width = 45; // // scienceattainfo // this.scienceattainfo.HeaderText = "附件信息"; this.scienceattainfo.Name = "scienceattainfo"; this.scienceattainfo.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.scienceattainfo.Width = 150; // // hiddenStoreName // this.hiddenStoreName.HeaderText = "存储名称"; this.hiddenStoreName.Name = "hiddenStoreName"; this.hiddenStoreName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; this.hiddenStoreName.Visible = false; // // UpLoadFullyName // this.UpLoadFullyName.HeaderText = "上传路径"; this.UpLoadFullyName.Name = "UpLoadFullyName"; this.UpLoadFullyName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; this.UpLoadFullyName.Visible = false; // // scienceup // this.scienceup.HeaderText = "上移"; this.scienceup.Name = "scienceup"; this.scienceup.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.scienceup.Width = 45; // // sciencedown // this.sciencedown.HeaderText = "下移"; this.sciencedown.Name = "sciencedown"; this.sciencedown.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.sciencedown.Width = 45; // // sciencedelete // this.sciencedelete.HeaderText = "删除"; this.sciencedelete.Name = "sciencedelete"; this.sciencedelete.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.sciencedelete.Width = 45; // // tecOrder // this.tecOrder.HeaderText = "排序"; this.tecOrder.Name = "tecOrder"; this.tecOrder.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; this.tecOrder.Visible = false; // // frmTechnologyAwards // this.Controls.Add(this.tableLayoutPanel14); this.Name = "frmTechnologyAwards"; this.Size = new System.Drawing.Size(1020, 603); this.Leave += new System.EventHandler(this.frmTechnologyAwards_Leave); this.tableLayoutPanel14.ResumeLayout(false); this.tableLayoutPanel1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.kryptonPanel29)).EndInit(); this.kryptonPanel29.ResumeLayout(false); this.kryptonPanel29.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.dTechnologyAwards)).EndInit(); this.ResumeLayout(false); }
private void InitializeComponent() { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); this.tableLayoutPanel11 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.btnnext = new ComponentFactory.Krypton.Toolkit.KryptonButton(); this.btnsave = new ComponentFactory.Krypton.Toolkit.KryptonButton(); this.dtalent = new ComponentFactory.Krypton.Toolkit.KryptonDataGridView(); this.kryptonPanel26 = new ComponentFactory.Krypton.Toolkit.KryptonPanel(); this.kryptonLabel114 = new ComponentFactory.Krypton.Toolkit.KryptonLabel(); this.selpersonid = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.selpersonidstartdate = new ComponentFactory.Krypton.Toolkit.KryptonDataGridViewNumericUpDownColumn(); this.selpersonname = new ComponentFactory.Krypton.Toolkit.KryptonDataGridViewButtonColumn(); this.TalentsPlanRA = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.selpersonfee = new ComponentFactory.Krypton.Toolkit.KryptonDataGridViewTextBoxColumn(); this.ctalOrder = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.up = new System.Windows.Forms.DataGridViewImageColumn(); this.down = new System.Windows.Forms.DataGridViewImageColumn(); this.delete = new System.Windows.Forms.DataGridViewImageColumn(); this.tableLayoutPanel11.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dtalent)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.kryptonPanel26)).BeginInit(); this.kryptonPanel26.SuspendLayout(); this.SuspendLayout(); // // tableLayoutPanel11 // this.tableLayoutPanel11.ColumnCount = 3; this.tableLayoutPanel11.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 50F)); this.tableLayoutPanel11.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel11.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 50F)); this.tableLayoutPanel11.Controls.Add(this.tableLayoutPanel1, 1, 3); this.tableLayoutPanel11.Controls.Add(this.dtalent, 1, 2); this.tableLayoutPanel11.Controls.Add(this.kryptonPanel26, 1, 1); this.tableLayoutPanel11.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel11.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanel11.Name = "tableLayoutPanel11"; this.tableLayoutPanel11.RowCount = 5; this.tableLayoutPanel11.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.tableLayoutPanel11.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F)); this.tableLayoutPanel11.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel11.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F)); this.tableLayoutPanel11.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.tableLayoutPanel11.Size = new System.Drawing.Size(1002, 594); this.tableLayoutPanel11.TabIndex = 2; // // tableLayoutPanel1 // this.tableLayoutPanel1.ColumnCount = 3; this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 103F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 100F)); this.tableLayoutPanel1.Controls.Add(this.btnnext, 2, 0); this.tableLayoutPanel1.Controls.Add(this.btnsave, 1, 0); this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel1.Location = new System.Drawing.Point(53, 537); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.RowCount = 1; this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel1.Size = new System.Drawing.Size(896, 34); this.tableLayoutPanel1.TabIndex = 4; // // btnnext // this.btnnext.Location = new System.Drawing.Point(799, 3); this.btnnext.Name = "btnnext"; this.btnnext.Size = new System.Drawing.Size(90, 25); this.btnnext.TabIndex = 1; this.btnnext.Values.Text = "下一页"; this.btnnext.Click += new System.EventHandler(this.btnnext_Click); // // btnsave // this.btnsave.Location = new System.Drawing.Point(696, 3); this.btnsave.Name = "btnsave"; this.btnsave.Size = new System.Drawing.Size(90, 25); this.btnsave.TabIndex = 0; this.btnsave.Values.Text = "保存"; this.btnsave.Click += new System.EventHandler(this.btnsave_Click); // // dtalent // this.dtalent.AllowUserToResizeRows = false; this.dtalent.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.DisplayedCellsExceptHeaders; this.dtalent.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.selpersonid, this.selpersonidstartdate, this.selpersonname, this.TalentsPlanRA, this.selpersonfee, this.ctalOrder, this.up, this.down, this.delete }); this.dtalent.Dock = System.Windows.Forms.DockStyle.Fill; this.dtalent.Location = new System.Drawing.Point(53, 63); this.dtalent.MultiSelect = false; this.dtalent.Name = "dtalent"; dataGridViewCellStyle1.Font = new System.Drawing.Font("仿宋_GB2312", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; this.dtalent.RowsDefaultCellStyle = dataGridViewCellStyle1; this.dtalent.RowTemplate.Height = 28; this.dtalent.Size = new System.Drawing.Size(896, 468); this.dtalent.StateCommon.Background.Color1 = System.Drawing.Color.White; this.dtalent.StateCommon.BackStyle = ComponentFactory.Krypton.Toolkit.PaletteBackStyle.GridBackgroundList; this.dtalent.StateCommon.HeaderColumn.Content.Font = new System.Drawing.Font("黑体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.dtalent.StateCommon.HeaderColumn.Content.TextH = ComponentFactory.Krypton.Toolkit.PaletteRelativeAlign.Center; this.dtalent.TabIndex = 2; this.dtalent.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dtalent_CellContentClick); this.dtalent.EditingControlShowing += new System.Windows.Forms.DataGridViewEditingControlShowingEventHandler(this.dtalent_EditingControlShowing); this.dtalent.RowsAdded += new System.Windows.Forms.DataGridViewRowsAddedEventHandler(this.dtalent_RowsAdded); // // kryptonPanel26 // this.kryptonPanel26.Controls.Add(this.kryptonLabel114); this.kryptonPanel26.Dock = System.Windows.Forms.DockStyle.Fill; this.kryptonPanel26.Location = new System.Drawing.Point(50, 20); this.kryptonPanel26.Margin = new System.Windows.Forms.Padding(0); this.kryptonPanel26.Name = "kryptonPanel26"; this.kryptonPanel26.Size = new System.Drawing.Size(902, 40); this.kryptonPanel26.TabIndex = 1; // // kryptonLabel114 // this.kryptonLabel114.Location = new System.Drawing.Point(3, 10); this.kryptonLabel114.Name = "kryptonLabel114"; this.kryptonLabel114.Size = new System.Drawing.Size(577, 27); this.kryptonLabel114.StateCommon.LongText.Font = new System.Drawing.Font("楷体_GB2312", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.kryptonLabel114.StateCommon.ShortText.Font = new System.Drawing.Font("黑体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.kryptonLabel114.TabIndex = 0; this.kryptonLabel114.Values.ExtraText = "(按时间倒序填写入选国家和军队人才计划情况)"; this.kryptonLabel114.Values.Text = "四、入选人才计划情况"; // // selpersonid // this.selpersonid.HeaderText = "id"; this.selpersonid.Name = "selpersonid"; this.selpersonid.Visible = false; // // selpersonidstartdate // this.selpersonidstartdate.HeaderText = "入选时间"; this.selpersonidstartdate.Maximum = new decimal(new int[] { 9999, 0, 0, 0 }); this.selpersonidstartdate.Minimum = new decimal(new int[] { 1990, 0, 0, 0 }); this.selpersonidstartdate.Name = "selpersonidstartdate"; this.selpersonidstartdate.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.selpersonidstartdate.Width = 100; // // selpersonname // this.selpersonname.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.selpersonname.HeaderText = "人才计划名称"; this.selpersonname.Name = "selpersonname"; this.selpersonname.Resizable = System.Windows.Forms.DataGridViewTriState.True; // // TalentsPlanRA // this.TalentsPlanRA.HeaderText = "研究方向"; this.TalentsPlanRA.Name = "TalentsPlanRA"; this.TalentsPlanRA.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; this.TalentsPlanRA.Width = 200; // // selpersonfee // this.selpersonfee.HeaderText = "资助经费(万)"; this.selpersonfee.Name = "selpersonfee"; this.selpersonfee.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; this.selpersonfee.Width = 110; // // ctalOrder // this.ctalOrder.HeaderText = "ctalOrder"; this.ctalOrder.Name = "ctalOrder"; this.ctalOrder.Visible = false; // // up // this.up.HeaderText = "上移"; this.up.Name = "up"; this.up.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.up.Width = 45; // // down // this.down.HeaderText = "下移"; this.down.Name = "down"; this.down.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.down.Width = 45; // // delete // this.delete.HeaderText = "删除"; this.delete.Name = "delete"; this.delete.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.delete.Width = 45; // // frmTalentsPlan // this.Controls.Add(this.tableLayoutPanel11); this.Name = "frmTalentsPlan"; this.Size = new System.Drawing.Size(1002, 594); this.Leave += new System.EventHandler(this.frmTalentsPlan_Leave); this.tableLayoutPanel11.ResumeLayout(false); this.tableLayoutPanel1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dtalent)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.kryptonPanel26)).EndInit(); this.kryptonPanel26.ResumeLayout(false); this.kryptonPanel26.PerformLayout(); this.ResumeLayout(false); }
private void InitializeComponent() { DataGridViewCellStyle dataGridViewCellStyle = new DataGridViewCellStyle(); DataGridViewCellStyle dataGridViewCellStyle2 = new DataGridViewCellStyle(); this.tableLayoutPanel12 = new TableLayoutPanel(); this.tableLayoutPanel1 = new TableLayoutPanel(); this.btnnext = new KryptonButton(); this.btnsave = new KryptonButton(); this.kryptonPanel27 = new KryptonPanel(); this.kryptonLabel115 = new KryptonLabel(); this.dproject = new KryptonDataGridViewEx(); this.defenceid = new DataGridViewTextBoxColumn(); this.defencename = new DataGridViewTextBoxColumn(); this.defencesource = new DataGridViewTextBoxColumn(); this.defencefee = new DataGridViewTextBoxColumn(); this.defencestartdate = new CalendarColumnYM(); this.defenceenddate = new CalendarColumnYM(); this.defencemaintask = new KryptonDataGridViewTextBoxColumn(); this.defenceorder = new KryptonDataGridViewTextBoxColumn(); this.proorder = new KryptonDataGridViewTextBoxColumn(); this.defenceup = new DataGridViewImageColumn(); this.defencedown = new DataGridViewImageColumn(); this.defencedelete = new DataGridViewImageColumn(); this.tableLayoutPanel12.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout(); ((ISupportInitialize)this.kryptonPanel27).BeginInit(); this.kryptonPanel27.SuspendLayout(); ((ISupportInitialize)this.dproject).BeginInit(); base.SuspendLayout(); this.tableLayoutPanel12.ColumnCount = 3; this.tableLayoutPanel12.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 50f)); this.tableLayoutPanel12.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100f)); this.tableLayoutPanel12.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 50f)); this.tableLayoutPanel12.Controls.Add(this.tableLayoutPanel1, 1, 3); this.tableLayoutPanel12.Controls.Add(this.kryptonPanel27, 1, 1); this.tableLayoutPanel12.Controls.Add(this.dproject, 1, 2); this.tableLayoutPanel12.Dock = DockStyle.Fill; this.tableLayoutPanel12.Location = new Point(0, 0); this.tableLayoutPanel12.Name = "tableLayoutPanel12"; this.tableLayoutPanel12.RowCount = 5; this.tableLayoutPanel12.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f)); this.tableLayoutPanel12.RowStyles.Add(new RowStyle(SizeType.Absolute, 40f)); this.tableLayoutPanel12.RowStyles.Add(new RowStyle(SizeType.Percent, 100f)); this.tableLayoutPanel12.RowStyles.Add(new RowStyle(SizeType.Absolute, 40f)); this.tableLayoutPanel12.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f)); this.tableLayoutPanel12.Size = new Size(1029, 569); this.tableLayoutPanel12.TabIndex = 2; this.tableLayoutPanel1.ColumnCount = 3; this.tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100f)); this.tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 103f)); this.tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 100f)); this.tableLayoutPanel1.Controls.Add(this.btnnext, 2, 0); this.tableLayoutPanel1.Controls.Add(this.btnsave, 1, 0); this.tableLayoutPanel1.Dock = DockStyle.Fill; this.tableLayoutPanel1.Location = new Point(53, 512); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.RowCount = 1; this.tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 100f)); this.tableLayoutPanel1.Size = new Size(923, 34); this.tableLayoutPanel1.TabIndex = 5; this.btnnext.Location = new Point(826, 3); this.btnnext.Name = "btnnext"; this.btnnext.Size = new Size(90, 25); this.btnnext.TabIndex = 1; this.btnnext.Values.Text = "下一页"; this.btnnext.Click += new EventHandler(this.btnnext_Click); this.btnsave.Location = new Point(723, 3); this.btnsave.Name = "btnsave"; this.btnsave.Size = new Size(90, 25); this.btnsave.TabIndex = 0; this.btnsave.Values.Text = "保存"; this.btnsave.Click += new EventHandler(this.btnsave_Click); this.kryptonPanel27.Controls.Add(this.kryptonLabel115); this.kryptonPanel27.Dock = DockStyle.Fill; this.kryptonPanel27.Location = new Point(50, 20); this.kryptonPanel27.Margin = new Padding(0); this.kryptonPanel27.Name = "kryptonPanel27"; this.kryptonPanel27.Size = new Size(929, 40); this.kryptonPanel27.TabIndex = 0; this.kryptonLabel115.Location = new Point(0, 10); this.kryptonLabel115.Name = "kryptonLabel115"; this.kryptonLabel115.Size = new Size(395, 27); this.kryptonLabel115.StateCommon.LongText.Font = new Font("KaiTi_GB2312", 12f, FontStyle.Regular, GraphicsUnit.Point, 134); this.kryptonLabel115.StateCommon.ShortText.Font = new Font("SimHei", 14.25f, FontStyle.Regular, GraphicsUnit.Point, 134); this.kryptonLabel115.TabIndex = 0; this.kryptonLabel115.Values.ExtraText = "(限10项)"; this.kryptonLabel115.Values.Text = "五、承担国防相关代表性项目情况"; this.dproject.AllowUserToResizeRows = false; this.dproject.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.DisplayedCellsExceptHeaders; this.dproject.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dproject.Columns.AddRange(new DataGridViewColumn[] { this.defenceid, this.defencename, this.defencesource, this.defencefee, this.defencestartdate, this.defenceenddate, this.defencemaintask, this.defenceorder, this.proorder, this.defenceup, this.defencedown, this.defencedelete }); this.dproject.Dock = DockStyle.Fill; this.dproject.Location = new Point(53, 63); this.dproject.MultiSelect = false; this.dproject.Name = "dproject"; dataGridViewCellStyle.Font = new Font("FangSong_GB2312", 12f, FontStyle.Regular, GraphicsUnit.Point, 134); dataGridViewCellStyle.WrapMode = DataGridViewTriState.True; this.dproject.RowsDefaultCellStyle = dataGridViewCellStyle; this.dproject.RowTemplate.Height = 28; this.dproject.Size = new Size(923, 443); this.dproject.StateCommon.Background.Color1 = Color.White; this.dproject.StateCommon.BackStyle = PaletteBackStyle.GridBackgroundList; this.dproject.StateCommon.HeaderColumn.Content.Font = new Font("SimHei", 12f, FontStyle.Regular, GraphicsUnit.Point, 134); this.dproject.StateCommon.HeaderColumn.Content.MultiLine = InheritBool.False; this.dproject.StateCommon.HeaderColumn.Content.TextH = PaletteRelativeAlign.Center; this.dproject.TabIndex = 1; this.dproject.CellContentClick += new DataGridViewCellEventHandler(this.dproject_CellContentClick); this.dproject.RowsAdded += new DataGridViewRowsAddedEventHandler(this.dproject_RowsAdded); this.defenceid.HeaderText = "序号"; this.defenceid.Name = "defenceid"; this.defenceid.SortMode = DataGridViewColumnSortMode.NotSortable; this.defenceid.Visible = false; this.defenceid.Width = 40; this.defencename.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; dataGridViewCellStyle2.WrapMode = DataGridViewTriState.True; this.defencename.DefaultCellStyle = dataGridViewCellStyle2; this.defencename.HeaderText = "项目名称"; this.defencename.MinimumWidth = 142; this.defencename.Name = "defencename"; this.defencename.SortMode = DataGridViewColumnSortMode.NotSortable; this.defencesource.HeaderText = "项目来源"; this.defencesource.Name = "defencesource"; this.defencesource.SortMode = DataGridViewColumnSortMode.NotSortable; this.defencefee.HeaderText = "经费(万)"; this.defencefee.Name = "defencefee"; this.defencefee.SortMode = DataGridViewColumnSortMode.NotSortable; this.defencestartdate.HeaderText = "开始年月"; this.defencestartdate.Name = "defencestartdate"; this.defencestartdate.Width = 120; this.defenceenddate.HeaderText = "结束年月"; this.defenceenddate.Name = "defenceenddate"; this.defenceenddate.Width = 120; this.defencemaintask.HeaderText = "主要承担任务"; this.defencemaintask.Name = "defencemaintask"; this.defencemaintask.SortMode = DataGridViewColumnSortMode.NotSortable; this.defencemaintask.Width = 120; this.defenceorder.HeaderText = "排名"; this.defenceorder.Name = "defenceorder"; this.defenceorder.SortMode = DataGridViewColumnSortMode.NotSortable; this.defenceorder.Width = 45; this.proorder.HeaderText = "次序"; this.proorder.Name = "proorder"; this.proorder.Resizable = DataGridViewTriState.True; this.proorder.SortMode = DataGridViewColumnSortMode.NotSortable; this.proorder.Visible = false; this.proorder.Width = 100; this.defenceup.HeaderText = "上移"; this.defenceup.Name = "defenceup"; this.defenceup.Resizable = DataGridViewTriState.True; this.defenceup.Width = 45; this.defencedown.HeaderText = "下移"; this.defencedown.Name = "defencedown"; this.defencedown.Resizable = DataGridViewTriState.True; this.defencedown.Width = 45; this.defencedelete.HeaderText = "删除"; this.defencedelete.Name = "defencedelete"; this.defencedelete.Resizable = DataGridViewTriState.True; this.defencedelete.Width = 45; base.AutoScaleDimensions = new SizeF(6f, 12f); //base.AutoScaleMode = AutoScaleMode.Font; base.Controls.Add(this.tableLayoutPanel12); base.Name = "frmNDProject"; base.Size = new Size(1029, 569); base.Leave += new EventHandler(this.frmNDProject_Leave); this.tableLayoutPanel12.ResumeLayout(false); this.tableLayoutPanel1.ResumeLayout(false); ((ISupportInitialize)this.kryptonPanel27).EndInit(); this.kryptonPanel27.ResumeLayout(false); this.kryptonPanel27.PerformLayout(); ((ISupportInitialize)this.dproject).EndInit(); base.ResumeLayout(false); }
private void InitializeComponent() { DataGridViewCellStyle dataGridViewCellStyle = new DataGridViewCellStyle(); this.tableLayoutPanel10 = new TableLayoutPanel(); this.tableLayoutPanel1 = new TableLayoutPanel(); this.btnnext = new KryptonButton(); this.btnsave = new KryptonButton(); this.kryptonPanel25 = new KryptonPanel(); this.kryptonLabel113 = new KryptonLabel(); this.daca = new KryptonDataGridViewEx(); this.academicjobid = new KryptonDataGridViewTextBoxColumn(); this.academicjobstartdate = new CalendarColumnYM(); this.academicjobenddate = new CalendarColumnYM(); this.academicjoborg = new KryptonDataGridViewTextBoxColumn(); this.academicjobposition = new KryptonDataGridViewTextBoxColumn(); this.academicjobup = new DataGridViewImageColumn(); this.academicjobdown = new DataGridViewImageColumn(); this.academicjobdelete = new DataGridViewImageColumn(); this.cacaOrder = new DataGridViewTextBoxColumn(); this.tableLayoutPanel10.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout(); ((ISupportInitialize)this.kryptonPanel25).BeginInit(); this.kryptonPanel25.SuspendLayout(); ((ISupportInitialize)this.daca).BeginInit(); base.SuspendLayout(); this.tableLayoutPanel10.ColumnCount = 3; this.tableLayoutPanel10.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 50f)); this.tableLayoutPanel10.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100f)); this.tableLayoutPanel10.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 50f)); this.tableLayoutPanel10.Controls.Add(this.tableLayoutPanel1, 1, 3); this.tableLayoutPanel10.Controls.Add(this.kryptonPanel25, 1, 1); this.tableLayoutPanel10.Controls.Add(this.daca, 1, 2); this.tableLayoutPanel10.Dock = DockStyle.Fill; this.tableLayoutPanel10.Location = new Point(0, 0); this.tableLayoutPanel10.Name = "tableLayoutPanel10"; this.tableLayoutPanel10.RowCount = 5; this.tableLayoutPanel10.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f)); this.tableLayoutPanel10.RowStyles.Add(new RowStyle(SizeType.Absolute, 40f)); this.tableLayoutPanel10.RowStyles.Add(new RowStyle(SizeType.Percent, 100f)); this.tableLayoutPanel10.RowStyles.Add(new RowStyle(SizeType.Absolute, 40f)); this.tableLayoutPanel10.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f)); this.tableLayoutPanel10.Size = new Size(1025, 603); this.tableLayoutPanel10.TabIndex = 2; this.tableLayoutPanel1.ColumnCount = 3; this.tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100f)); this.tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 103f)); this.tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 100f)); this.tableLayoutPanel1.Controls.Add(this.btnnext, 2, 0); this.tableLayoutPanel1.Controls.Add(this.btnsave, 1, 0); this.tableLayoutPanel1.Dock = DockStyle.Fill; this.tableLayoutPanel1.Location = new Point(53, 546); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.RowCount = 1; this.tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 100f)); this.tableLayoutPanel1.Size = new Size(919, 34); this.tableLayoutPanel1.TabIndex = 5; this.btnnext.Location = new Point(822, 3); this.btnnext.Name = "btnnext"; this.btnnext.Size = new Size(90, 25); this.btnnext.TabIndex = 1; this.btnnext.Values.Text = "下一页"; this.btnnext.Click += new EventHandler(this.btnnext_Click); this.btnsave.Location = new Point(719, 3); this.btnsave.Name = "btnsave"; this.btnsave.Size = new Size(90, 25); this.btnsave.TabIndex = 0; this.btnsave.Values.Text = "保存"; this.btnsave.Click += new EventHandler(this.btnsave_Click); this.kryptonPanel25.Controls.Add(this.kryptonLabel113); this.kryptonPanel25.Dock = DockStyle.Fill; this.kryptonPanel25.Location = new Point(50, 20); this.kryptonPanel25.Margin = new Padding(0); this.kryptonPanel25.Name = "kryptonPanel25"; this.kryptonPanel25.Size = new Size(925, 40); this.kryptonPanel25.TabIndex = 0; this.kryptonLabel113.Location = new Point(3, 10); this.kryptonLabel113.Name = "kryptonLabel113"; this.kryptonLabel113.Size = new Size(324, 27); this.kryptonLabel113.StateCommon.LongText.Font = new Font("KaiTi_GB2312", 12f, FontStyle.Regular, GraphicsUnit.Point, 134); this.kryptonLabel113.StateCommon.ShortText.Font = new Font("SimHei", 14.25f, FontStyle.Regular, GraphicsUnit.Point, 134); this.kryptonLabel113.TabIndex = 0; this.kryptonLabel113.Values.ExtraText = "(按时间倒序填写)"; this.kryptonLabel113.Values.Text = "三、主要学术任职"; this.daca.AllowUserToResizeRows = false; this.daca.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.DisplayedCellsExceptHeaders; this.daca.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.daca.Columns.AddRange(new DataGridViewColumn[] { this.academicjobid, this.academicjobstartdate, this.academicjobenddate, this.academicjoborg, this.academicjobposition, this.academicjobup, this.academicjobdown, this.academicjobdelete, this.cacaOrder }); this.daca.Dock = DockStyle.Fill; this.daca.Location = new Point(53, 63); this.daca.MultiSelect = false; this.daca.Name = "daca"; dataGridViewCellStyle.Font = new Font("FangSong_GB2312", 12f, FontStyle.Regular, GraphicsUnit.Point, 134); dataGridViewCellStyle.WrapMode = DataGridViewTriState.True; this.daca.RowsDefaultCellStyle = dataGridViewCellStyle; this.daca.RowTemplate.Height = 28; this.daca.Size = new Size(919, 477); this.daca.StateCommon.Background.Color1 = Color.White; this.daca.StateCommon.BackStyle = PaletteBackStyle.GridBackgroundList; this.daca.StateCommon.HeaderColumn.Content.Font = new Font("SimHei", 12f, FontStyle.Regular, GraphicsUnit.Point, 134); this.daca.StateCommon.HeaderColumn.Content.TextH = PaletteRelativeAlign.Center; this.daca.TabIndex = 3; this.daca.CellContentClick += new DataGridViewCellEventHandler(this.daca_CellContentClick); this.daca.RowsAdded += new DataGridViewRowsAddedEventHandler(this.daca_RowsAdded); this.academicjobid.HeaderText = "id"; this.academicjobid.Name = "academicjobid"; this.academicjobid.SortMode = DataGridViewColumnSortMode.NotSortable; this.academicjobid.Visible = false; this.academicjobid.Width = 100; this.academicjobstartdate.HeaderText = "开始年月"; this.academicjobstartdate.Name = "academicjobstartdate"; this.academicjobstartdate.Width = 120; this.academicjobenddate.HeaderText = "结束年月"; this.academicjobenddate.Name = "academicjobenddate"; this.academicjobenddate.Width = 120; this.academicjoborg.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; this.academicjoborg.HeaderText = "组织/机构"; this.academicjoborg.Name = "academicjoborg"; this.academicjoborg.SortMode = DataGridViewColumnSortMode.NotSortable; this.academicjoborg.Width = 303; this.academicjobposition.HeaderText = "任职情况"; this.academicjobposition.Name = "academicjobposition"; this.academicjobposition.SortMode = DataGridViewColumnSortMode.NotSortable; this.academicjobposition.Width = 200; this.academicjobup.HeaderText = "上移"; this.academicjobup.Name = "academicjobup"; this.academicjobup.Resizable = DataGridViewTriState.True; this.academicjobup.Width = 45; this.academicjobdown.HeaderText = "下移"; this.academicjobdown.Name = "academicjobdown"; this.academicjobdown.Resizable = DataGridViewTriState.True; this.academicjobdown.Width = 45; this.academicjobdelete.HeaderText = "删除"; this.academicjobdelete.Name = "academicjobdelete"; this.academicjobdelete.Resizable = DataGridViewTriState.True; this.academicjobdelete.Width = 45; this.cacaOrder.HeaderText = "排序"; this.cacaOrder.Name = "cacaOrder"; this.cacaOrder.SortMode = DataGridViewColumnSortMode.NotSortable; this.cacaOrder.Visible = false; base.AutoScaleDimensions = new SizeF(6f, 12f); //base.AutoScaleMode = AutoScaleMode.Font; base.Controls.Add(this.tableLayoutPanel10); base.Name = "frmAcademicPost"; base.Size = new Size(1025, 603); base.Leave += new EventHandler(this.frmAcademicPost_Leave); this.tableLayoutPanel10.ResumeLayout(false); this.tableLayoutPanel1.ResumeLayout(false); ((ISupportInitialize)this.kryptonPanel25).EndInit(); this.kryptonPanel25.ResumeLayout(false); this.kryptonPanel25.PerformLayout(); ((ISupportInitialize)this.daca).EndInit(); base.ResumeLayout(false); }
private void InitializeComponent() { DataGridViewCellStyle dataGridViewCellStyle = new DataGridViewCellStyle(); ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(frmResumeEducation)); DataGridViewCellStyle dataGridViewCellStyle2 = new DataGridViewCellStyle(); DataGridViewCellStyle dataGridViewCellStyle3 = new DataGridViewCellStyle(); this.buttonSpecAny1 = new ButtonSpecAny(); this.dataGridViewImageColumn1 = new DataGridViewImageColumn(); this.dataGridViewImageColumn2 = new DataGridViewImageColumn(); this.buttonSpecAny2 = new ButtonSpecAny(); this.tableLayoutPanel8 = new TableLayoutPanel(); this.tableLayoutPanel1 = new TableLayoutPanel(); this.btnnext = new KryptonButton(); this.btnsave = new KryptonButton(); this.kryptonPanel12 = new KryptonPanel(); this.kryptonLabel63 = new KryptonLabel(); this.deducation = new KryptonDataGridViewEx(); this.gridEducationNo = new DataGridViewTextBoxColumn(); this.startdate = new CalendarColumnYM(); this.enddate = new CalendarColumnYM(); this.school = new KryptonDataGridViewTextBoxColumn(); this.major = new KryptonDataGridViewTextBoxColumn(); this.degree = new KryptonDataGridViewComboBoxColumn(); this.cEducationOrder = new KryptonDataGridViewTextBoxColumn(); this.up = new DataGridViewImageColumn(); this.down = new DataGridViewImageColumn(); this.delete = new DataGridViewImageColumn(); this.tableLayoutPanel8.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout(); ((ISupportInitialize)this.kryptonPanel12).BeginInit(); this.kryptonPanel12.SuspendLayout(); ((ISupportInitialize)this.deducation).BeginInit(); base.SuspendLayout(); this.buttonSpecAny1.Checked = ButtonCheckState.Checked; this.buttonSpecAny1.UniqueName = "B0FAED16E99144A6DFA183F6DCF8CE59"; dataGridViewCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; dataGridViewCellStyle.NullValue = componentResourceManager.GetObject("dataGridViewCellStyle1.NullValue"); dataGridViewCellStyle.WrapMode = DataGridViewTriState.True; this.dataGridViewImageColumn1.DefaultCellStyle = dataGridViewCellStyle; this.dataGridViewImageColumn1.HeaderText = "上移"; this.dataGridViewImageColumn1.Image = (Image)componentResourceManager.GetObject("dataGridViewImageColumn1.Image"); this.dataGridViewImageColumn1.ImageLayout = DataGridViewImageCellLayout.Zoom; this.dataGridViewImageColumn1.Name = "dataGridViewImageColumn1"; this.dataGridViewImageColumn1.Resizable = DataGridViewTriState.True; this.dataGridViewImageColumn1.Width = 40; this.dataGridViewImageColumn2.HeaderText = "下移"; this.dataGridViewImageColumn2.Image = global::Properties.Resource.DOWN_16; this.dataGridViewImageColumn2.Name = "dataGridViewImageColumn2"; this.dataGridViewImageColumn2.Resizable = DataGridViewTriState.True; this.dataGridViewImageColumn2.Width = 40; this.buttonSpecAny2.Checked = ButtonCheckState.Checked; this.buttonSpecAny2.Image = (Image)componentResourceManager.GetObject("buttonSpecAny2.Image"); this.buttonSpecAny2.UniqueName = "2B39AF5966CA492620ACC03F8654CCBE"; this.tableLayoutPanel8.ColumnCount = 3; this.tableLayoutPanel8.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 50f)); this.tableLayoutPanel8.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100f)); this.tableLayoutPanel8.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 50f)); this.tableLayoutPanel8.Controls.Add(this.tableLayoutPanel1, 1, 3); this.tableLayoutPanel8.Controls.Add(this.kryptonPanel12, 1, 1); this.tableLayoutPanel8.Controls.Add(this.deducation, 1, 2); this.tableLayoutPanel8.Dock = DockStyle.Fill; this.tableLayoutPanel8.Location = new Point(0, 0); this.tableLayoutPanel8.Name = "tableLayoutPanel8"; this.tableLayoutPanel8.RowCount = 5; this.tableLayoutPanel8.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f)); this.tableLayoutPanel8.RowStyles.Add(new RowStyle(SizeType.Absolute, 40f)); this.tableLayoutPanel8.RowStyles.Add(new RowStyle(SizeType.Percent, 100f)); this.tableLayoutPanel8.RowStyles.Add(new RowStyle(SizeType.Absolute, 40f)); this.tableLayoutPanel8.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f)); this.tableLayoutPanel8.Size = new Size(1008, 553); this.tableLayoutPanel8.TabIndex = 1; this.tableLayoutPanel1.ColumnCount = 3; this.tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100f)); this.tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 103f)); this.tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 100f)); this.tableLayoutPanel1.Controls.Add(this.btnnext, 2, 0); this.tableLayoutPanel1.Controls.Add(this.btnsave, 1, 0); this.tableLayoutPanel1.Dock = DockStyle.Fill; this.tableLayoutPanel1.Location = new Point(53, 496); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.RowCount = 1; this.tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 100f)); this.tableLayoutPanel1.Size = new Size(902, 34); this.tableLayoutPanel1.TabIndex = 3; this.btnnext.Location = new Point(805, 3); this.btnnext.Name = "btnnext"; this.btnnext.Size = new Size(90, 25); this.btnnext.TabIndex = 1; this.btnnext.Values.Text = "下一页"; this.btnnext.Click += new EventHandler(this.btnnext_Click); this.btnsave.Location = new Point(702, 3); this.btnsave.Name = "btnsave"; this.btnsave.Size = new Size(90, 25); this.btnsave.TabIndex = 0; this.btnsave.Values.Text = "保存"; this.btnsave.Click += new EventHandler(this.btnsave_Click); this.kryptonPanel12.Controls.Add(this.kryptonLabel63); this.kryptonPanel12.Dock = DockStyle.Fill; this.kryptonPanel12.Location = new Point(50, 20); this.kryptonPanel12.Margin = new Padding(0); this.kryptonPanel12.Name = "kryptonPanel12"; this.kryptonPanel12.Size = new Size(908, 40); this.kryptonPanel12.TabIndex = 0; this.kryptonLabel63.Location = new Point(0, 10); this.kryptonLabel63.Name = "kryptonLabel63"; this.kryptonLabel63.Size = new Size(417, 27); this.kryptonLabel63.StateCommon.LongText.Font = new Font("KaiTi_GB2312", 12f, FontStyle.Regular, GraphicsUnit.Point, 134); this.kryptonLabel63.StateCommon.ShortText.Font = new Font("SimHei", 14.25f, FontStyle.Regular, GraphicsUnit.Point, 134); this.kryptonLabel63.TabIndex = 0; this.kryptonLabel63.Values.ExtraText = "(从大学教育填起,按时间倒序填写)"; this.kryptonLabel63.Values.Text = "一、教育经历"; this.deducation.AllowUserToResizeRows = false; this.deducation.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.DisplayedCellsExceptHeaders; this.deducation.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.deducation.Columns.AddRange(new DataGridViewColumn[] { this.gridEducationNo, this.startdate, this.enddate, this.school, this.major, this.degree, this.cEducationOrder, this.up, this.down, this.delete }); this.deducation.Dock = DockStyle.Fill; this.deducation.Location = new Point(53, 63); this.deducation.MultiSelect = false; this.deducation.Name = "deducation"; dataGridViewCellStyle2.Font = new Font("FangSong_GB2312", 12f, FontStyle.Regular, GraphicsUnit.Point, 134); dataGridViewCellStyle2.WrapMode = DataGridViewTriState.True; this.deducation.RowsDefaultCellStyle = dataGridViewCellStyle2; this.deducation.RowTemplate.Height = 28; this.deducation.RowTemplate.Resizable = DataGridViewTriState.False; this.deducation.Size = new Size(902, 427); this.deducation.StateCommon.Background.Color1 = Color.White; this.deducation.StateCommon.BackStyle = PaletteBackStyle.GridBackgroundList; this.deducation.StateCommon.HeaderColumn.Content.Font = new Font("SimHei", 12f, FontStyle.Regular, GraphicsUnit.Point, 134); this.deducation.StateCommon.HeaderColumn.Content.TextH = PaletteRelativeAlign.Center; this.deducation.TabIndex = 1; this.deducation.CellContentClick += new DataGridViewCellEventHandler(this.deducation_CellContentClick); this.deducation.RowsAdded += new DataGridViewRowsAddedEventHandler(this.deducation_RowsAdded); this.gridEducationNo.HeaderText = ""; this.gridEducationNo.Name = "gridEducationNo"; this.gridEducationNo.Visible = false; this.startdate.HeaderText = "开始年月"; this.startdate.Name = "startdate"; this.startdate.Width = 120; this.enddate.HeaderText = "结束年月"; this.enddate.Name = "enddate"; this.enddate.Width = 120; this.school.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; this.school.HeaderText = "校(院)及系名称"; this.school.MinimumWidth = 156; this.school.Name = "school"; this.school.Resizable = DataGridViewTriState.True; this.school.SortMode = DataGridViewColumnSortMode.NotSortable; this.school.Width = 156; this.major.HeaderText = "专业"; this.major.Name = "major"; this.major.Resizable = DataGridViewTriState.True; this.major.SortMode = DataGridViewColumnSortMode.NotSortable; this.major.Width = 180; this.degree.DropDownStyle = ComboBoxStyle.DropDownList; this.degree.DropDownWidth = 121; this.degree.HeaderText = "学位"; this.degree.Items.AddRange(new string[] { "博士", "硕士", "学士", "无学位" }); this.degree.Name = "degree"; this.degree.Resizable = DataGridViewTriState.True; this.degree.Width = 150; this.cEducationOrder.HeaderText = "排序"; this.cEducationOrder.Name = "cEducationOrder"; this.cEducationOrder.SortMode = DataGridViewColumnSortMode.NotSortable; this.cEducationOrder.Visible = false; this.cEducationOrder.Width = 100; dataGridViewCellStyle3.Alignment = DataGridViewContentAlignment.MiddleCenter; dataGridViewCellStyle3.NullValue = componentResourceManager.GetObject("dataGridViewCellStyle2.NullValue"); dataGridViewCellStyle3.WrapMode = DataGridViewTriState.True; this.up.DefaultCellStyle = dataGridViewCellStyle3; this.up.HeaderText = "上移"; this.up.Image = global::Properties.Resource.UP_16; this.up.Name = "up"; this.up.Resizable = DataGridViewTriState.True; this.up.Width = 45; this.down.HeaderText = "下移"; this.down.Image = global::Properties.Resource.DOWN_16; this.down.Name = "down"; this.down.Resizable = DataGridViewTriState.True; this.down.Width = 45; this.delete.HeaderText = "删除"; this.delete.Image = global::Properties.Resource.DELETE_16; this.delete.Name = "delete"; this.delete.Resizable = DataGridViewTriState.True; this.delete.Width = 45; base.AutoScaleDimensions = new SizeF(6f, 12f); //base.AutoScaleMode = AutoScaleMode.Font; base.Controls.Add(this.tableLayoutPanel8); base.Name = "frmresume_education"; base.Size = new Size(1008, 553); base.Leave += new EventHandler(this.frmresume_education_Leave); this.tableLayoutPanel8.ResumeLayout(false); this.tableLayoutPanel1.ResumeLayout(false); ((ISupportInitialize)this.kryptonPanel12).EndInit(); this.kryptonPanel12.ResumeLayout(false); this.kryptonPanel12.PerformLayout(); ((ISupportInitialize)this.deducation).EndInit(); base.ResumeLayout(false); }
public static void SetupDGV(KryptonOutlookGrid grid, EntityTypes typeOfData) { grid.ClearEverything(); if (grid.GroupBox != null) { grid.GroupBox.Visible = true; grid.HideColumnOnGrouping = false; } grid.FillMode = FillMode.GROUPSANDNODES; grid.ShowLines = true; List <DataGridViewColumn> columnsToAdd = new List <DataGridViewColumn>(); switch (typeOfData) { case EntityTypes.Client: { DataGridViewColumn clientIDColumn = new KryptonDataGridViewTextBoxColumn { HeaderText = "Client ID", Name = "clientIDColumn", SortMode = DataGridViewColumnSortMode.Programmatic, AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill }; columnsToAdd.Add(clientIDColumn); DataGridViewColumn clientNameColumn = new KryptonDataGridViewTextBoxColumn { HeaderText = "Client Name", Name = "clientNameColumn", SortMode = DataGridViewColumnSortMode.Programmatic, AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill }; columnsToAdd.Add(clientNameColumn); grid.Columns.AddRange(columnsToAdd.ToArray()); grid.AddInternalColumn(clientIDColumn, new OutlookGridDefaultGroup() { OneItemText = "1 client", XXXItemsText = " clients" }, SortOrder.None, -1, -1); grid.AddInternalColumn(clientNameColumn, new OutlookGridAlphabeticGroup() { OneItemText = "1 client", XXXItemsText = " clients" }, SortOrder.None, -1, -1); break; } case EntityTypes.Realtor: { DataGridViewColumn realtorIDColumn = new KryptonDataGridViewTextBoxColumn { HeaderText = "Realtor ID", Name = "realtorIDColumn", SortMode = DataGridViewColumnSortMode.Programmatic, AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill }; columnsToAdd.Add(realtorIDColumn); DataGridViewColumn realtorNameColumn = new KryptonDataGridViewTextBoxColumn { HeaderText = "Realtor Name", Name = "realtorNameColumn", SortMode = DataGridViewColumnSortMode.Programmatic, AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill }; columnsToAdd.Add(realtorNameColumn); grid.Columns.AddRange(columnsToAdd.ToArray()); grid.AddInternalColumn(realtorIDColumn, new OutlookGridDefaultGroup() { OneItemText = "1 realtor", XXXItemsText = " realtors" }, SortOrder.None, -1, -1); grid.AddInternalColumn(realtorNameColumn, new OutlookGridAlphabeticGroup() { OneItemText = "1 realtor", XXXItemsText = " realtors" }, SortOrder.None, -1, -1); break; } case EntityTypes.TitleCompany: { DataGridViewColumn companyIDColumn = new KryptonDataGridViewTextBoxColumn { HeaderText = "Company ID", Name = "companyIDColumn", SortMode = DataGridViewColumnSortMode.Programmatic, AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill }; columnsToAdd.Add(companyIDColumn); DataGridViewColumn companyNameColumn = new KryptonDataGridViewTextBoxColumn { HeaderText = "Company Name", Name = "companyNameColumn", SortMode = DataGridViewColumnSortMode.Programmatic, AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill }; columnsToAdd.Add(companyNameColumn); grid.Columns.AddRange(columnsToAdd.ToArray()); grid.AddInternalColumn(companyIDColumn, new OutlookGridDefaultGroup() { OneItemText = "1 title company", XXXItemsText = " title companies" }, SortOrder.None, -1, -1); grid.AddInternalColumn(companyNameColumn, new OutlookGridAlphabeticGroup() { OneItemText = "1 title company", XXXItemsText = " title companies" }, SortOrder.None, -1, -1); break; } case EntityTypes.Rate: { DataGridViewColumn rateIdColumn = new KryptonDataGridViewTextBoxColumn { HeaderText = "Rate ID", Name = "rateIdColumn", SortMode = DataGridViewColumnSortMode.Programmatic, AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill }; columnsToAdd.Add(rateIdColumn); DataGridViewColumn rateDescriptionColumn = new KryptonDataGridViewTextBoxColumn { HeaderText = "Description", Name = "rateDescriptionColumn", SortMode = DataGridViewColumnSortMode.Programmatic, AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill }; columnsToAdd.Add(rateDescriptionColumn); DataGridViewColumn rateAmountColumn = new KryptonDataGridViewTextBoxColumn { HeaderText = "Amount", Name = "rateAmountColumn", SortMode = DataGridViewColumnSortMode.Programmatic, AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill }; columnsToAdd.Add(rateAmountColumn); grid.Columns.AddRange(columnsToAdd.ToArray()); grid.AddInternalColumn(rateIdColumn, new OutlookGridDefaultGroup() { OneItemText = "1 rate", XXXItemsText = " rates" }, SortOrder.None, -1, -1); grid.AddInternalColumn(rateDescriptionColumn, new OutlookGridAlphabeticGroup() { OneItemText = "rate", XXXItemsText = " rates" }, SortOrder.None, -1, -1); grid.AddInternalColumn(rateAmountColumn, new OutlookGridAlphabeticGroup() { OneItemText = "rate", XXXItemsText = " rates" }, SortOrder.None, -1, -1); break; } case EntityTypes.BillingItem: { DataGridViewColumn billingIdColumn = new KryptonDataGridViewTextBoxColumn { HeaderText = "Billing ID", Name = "billingIdColumn", SortMode = DataGridViewColumnSortMode.Programmatic, AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill }; columnsToAdd.Add(billingIdColumn); DataGridViewColumn billingDescriptionColumn = new KryptonDataGridViewTextBoxColumn { HeaderText = "Description", Name = "billingDescriptionColumn", SortMode = DataGridViewColumnSortMode.Programmatic, AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill }; columnsToAdd.Add(billingDescriptionColumn); DataGridViewColumn rateColumn = new KryptonDataGridViewTextBoxColumn { HeaderText = "Rate", Name = "rateColumn", SortMode = DataGridViewColumnSortMode.Programmatic, AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill }; columnsToAdd.Add(rateColumn); DataGridViewColumn timeColumn = new KryptonDataGridViewTextBoxColumn { HeaderText = "Time Entry", Name = "timeColumn", SortMode = DataGridViewColumnSortMode.Programmatic, AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill }; columnsToAdd.Add(timeColumn); grid.Columns.AddRange(columnsToAdd.ToArray()); grid.AddInternalColumn(billingIdColumn, new OutlookGridDefaultGroup() { OneItemText = "1 billing item", XXXItemsText = " billing items" }, SortOrder.None, -1, -1); grid.AddInternalColumn(billingDescriptionColumn, new OutlookGridAlphabeticGroup() { OneItemText = "1 billing item", XXXItemsText = " billing items" }, SortOrder.None, -1, -1); grid.AddInternalColumn(rateColumn, new OutlookGridAlphabeticGroup() { OneItemText = "1 billing item", XXXItemsText = " billing items" }, SortOrder.None, -1, -1); grid.AddInternalColumn(timeColumn, new OutlookGridAlphabeticGroup() { OneItemText = "1 billing item", XXXItemsText = " billing items" }, SortOrder.None, -1, -1); break; } case EntityTypes.Survey: { DataGridViewColumn surveyIDColumn = new KryptonDataGridViewTextBoxColumn { HeaderText = "Survey ID", Name = "surveyIDColumn", SortMode = DataGridViewColumnSortMode.Programmatic, AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill }; columnsToAdd.Add(surveyIDColumn); DataGridViewColumn jobNumberColumn = new KryptonDataGridViewTextBoxColumn { HeaderText = "Job Number", Name = "jobNumberColumn", SortMode = DataGridViewColumnSortMode.Programmatic, AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill }; columnsToAdd.Add(jobNumberColumn); DataGridViewColumn abstractNumberColumn = new KryptonDataGridViewTextBoxColumn { HeaderText = "Abstract", Name = "abstractNumberColumn", SortMode = DataGridViewColumnSortMode.Programmatic, AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill }; columnsToAdd.Add(abstractNumberColumn); DataGridViewColumn acresColumn = new KryptonDataGridViewTextBoxColumn { HeaderText = "# of Acres", Name = "acresColumn", SortMode = DataGridViewColumnSortMode.Programmatic, AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill }; columnsToAdd.Add(acresColumn); DataGridViewColumn countyColumn = new KryptonDataGridViewTextBoxColumn { HeaderText = "County", Name = "countyColumn", SortMode = DataGridViewColumnSortMode.Programmatic, AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill }; columnsToAdd.Add(countyColumn); grid.Columns.AddRange(columnsToAdd.ToArray()); grid.AddInternalColumn(surveyIDColumn, new OutlookGridDefaultGroup() { OneItemText = "1 survey", XXXItemsText = " surveys" }, SortOrder.None, -1, -1); grid.AddInternalColumn(jobNumberColumn, new OutlookGridAlphabeticGroup() { OneItemText = "1 survey", XXXItemsText = " surveys" }, SortOrder.None, -1, -1); grid.AddInternalColumn(abstractNumberColumn, new OutlookGridAlphabeticGroup() { OneItemText = "1 survey", XXXItemsText = " surveys" }, SortOrder.None, -1, -1); grid.AddInternalColumn(acresColumn, new OutlookGridAlphabeticGroup() { OneItemText = "1 survey", XXXItemsText = " surveys" }, SortOrder.None, -1, -1); grid.AddInternalColumn(countyColumn, new OutlookGridAlphabeticGroup() { OneItemText = "1 survey", XXXItemsText = " surveys" }, SortOrder.None, -1, -1); break; } } }
/// <summary> /// Use this function if you do not add your columns at design time. /// </summary> /// <param name="colType"></param> /// <returns></returns> private DataGridViewColumn SetupColumn(SandBoxGridColumn colType) { DataGridViewColumn column = null; switch (colType) { case SandBoxGridColumn.ColumnCustomerID: column = new KryptonDataGridViewTextBoxColumn(); column.HeaderText = "Customer ID"; column.Name = "ColumnCustomerID"; column.SortMode = DataGridViewColumnSortMode.Programmatic; column.Width = 79; return column; case SandBoxGridColumn.ColumnCustomerName: column = new KryptonDataGridViewTreeTextColumn();// KryptonDataGridViewTextBoxColumn(); column.HeaderText = "Name"; column.Name = "ColumnCustomerName"; column.SortMode = DataGridViewColumnSortMode.Programmatic; column.Width = 79; return column; case SandBoxGridColumn.ColumnAddress: column = new KryptonDataGridViewTextBoxColumn(); column.HeaderText = "Address"; column.Name = "ColumnAddress"; column.SortMode = DataGridViewColumnSortMode.Programmatic; column.Width = 79; return column; case SandBoxGridColumn.ColumnCity: column = new KryptonDataGridViewTextBoxColumn(); column.HeaderText = "City"; column.Name = "ColumnCity"; column.SortMode = DataGridViewColumnSortMode.Programmatic; column.Width = 79; return column; case SandBoxGridColumn.ColumnCountry: column = new KryptonDataGridViewTextAndImageColumn(); column.HeaderText = "Country"; column.Name = "ColumnCountry"; column.Resizable = DataGridViewTriState.True; column.SortMode = DataGridViewColumnSortMode.Programmatic; column.Width = 78; return column; case SandBoxGridColumn.ColumnOrderDate: column = new KryptonDataGridViewDateTimePickerColumn(); ((KryptonDataGridViewDateTimePickerColumn)column).CalendarTodayDate = DateTime.Now; ((KryptonDataGridViewDateTimePickerColumn)column).Checked = false; ((KryptonDataGridViewDateTimePickerColumn)column).Format = DateTimePickerFormat.Short; column.HeaderText = "Order Date"; column.Name = "ColumnOrderDate"; column.SortMode = DataGridViewColumnSortMode.Programmatic; column.Width = 79; return column; case SandBoxGridColumn.ColumnProduct: column = new KryptonDataGridViewTextBoxColumn(); column.HeaderText = "Product"; column.Name = "ColumnProduct"; column.SortMode = DataGridViewColumnSortMode.Programmatic; column.Width = 79; return column; case SandBoxGridColumn.ColumnPrice: column = new KryptonDataGridViewFormattingColumn(); column.Name = colType.ToString(); column.ValueType = typeof(decimal); //really important for formatting DataGridViewCellStyle dataGridViewCellStyle1 = new DataGridViewCellStyle(); dataGridViewCellStyle1.Format = "C2"; dataGridViewCellStyle1.NullValue = ""; column.DefaultCellStyle = dataGridViewCellStyle1; column.HeaderText = "Price"; column.Resizable = DataGridViewTriState.True; column.SortMode = DataGridViewColumnSortMode.Programmatic; column.Width = 79; return column; case SandBoxGridColumn.SatisfactionColumn: column = new KryptonDataGridViewPercentageColumn(); DataGridViewCellStyle dataGridViewCellStyle2 = new DataGridViewCellStyle(); dataGridViewCellStyle2.Format = "0%"; column.DefaultCellStyle = dataGridViewCellStyle2; column.HeaderText = "Satisfaction"; column.Name = colType.ToString(); column.SortMode = DataGridViewColumnSortMode.Programmatic; return column; case SandBoxGridColumn.ColumnToken: column = new KryptonDataGridViewTokenColumn(); column.Name = colType.ToString(); column.ReadOnly = true; column.SortMode = DataGridViewColumnSortMode.Programmatic; column.HeaderText = "Tag"; return column; default: throw new Exception("Unknown Column Type !! TODO improve that !"); } }
/// <summary> /// Use this function if you do not add your columns at design time. /// </summary> /// <param name="colType"></param> /// <returns></returns> private DataGridViewColumn SetupColumn(VaultGridColumn colType) { DataGridViewColumn column = null; switch (colType) { case VaultGridColumn.ColumnIndex: column = new KryptonDataGridViewTextBoxColumn(); column.HeaderText = "Index"; column.Name = "ColumnIndex"; column.SortMode = DataGridViewColumnSortMode.Programmatic; column.Width = 79; return(column); case VaultGridColumn.ColumnHasUCE: column = new KryptonDataGridViewCheckBoxColumn(); column.HeaderText = "Has UCE?"; column.Name = "ColumnHasUCE"; column.Resizable = DataGridViewTriState.True; column.SortMode = DataGridViewColumnSortMode.Programmatic; column.Width = 78; return(column); case VaultGridColumn.ColumnTitle: column = new KryptonDataGridViewTextBoxColumn();// KryptonDataGridViewTextBoxColumn(); column.HeaderText = "Title"; column.Name = "ColumnTitle"; column.SortMode = DataGridViewColumnSortMode.Programmatic; column.Width = 79; return(column); case VaultGridColumn.ColumnGenre: column = new KryptonDataGridViewTreeTextColumn(); column.HeaderText = "Genre"; column.Name = "ColumnGenre"; column.SortMode = DataGridViewColumnSortMode.Programmatic; column.Width = 79; return(column); case VaultGridColumn.ColumnCoverArtFile: column = new KryptonDataGridViewTextBoxColumn(); column.HeaderText = "Cover Art"; column.Name = "ColumnCoverArtFile"; column.SortMode = DataGridViewColumnSortMode.Programmatic; column.Width = 79; return(column); case VaultGridColumn.ColumnBezelArtFile: column = new KryptonDataGridViewTextBoxColumn(); column.HeaderText = "Bezel Art"; column.Name = "ColumnBezelArtFile"; column.SortMode = DataGridViewColumnSortMode.Programmatic; column.Width = 79; return(column); case VaultGridColumn.ColumnUseInternalCore: column = new KryptonDataGridViewCheckBoxColumn(); column.HeaderText = "Use Internal Core"; column.Name = "ColumnUseInternalCore"; //((KryptonDataGridViewCheckBoxColumn)column). column.Resizable = DataGridViewTriState.True; column.SortMode = DataGridViewColumnSortMode.Programmatic; column.Width = 78; return(column); case VaultGridColumn.ColumnEmulatorCoreFile: column = new KryptonDataGridViewTextBoxColumn(); column.HeaderText = "Emulator Core"; column.Name = "ColumnEmulatorCoreFile"; column.SortMode = DataGridViewColumnSortMode.Programmatic; column.Width = 79; return(column); case VaultGridColumn.ColumnOverLayFile: column = new KryptonDataGridViewTextBoxColumn(); column.HeaderText = "Overlay?"; column.Name = "ColumnOverLayFile"; column.SortMode = DataGridViewColumnSortMode.Programmatic; column.Width = 79; return(column); case VaultGridColumn.ColumnROMFile: column = new KryptonDataGridViewTextBoxColumn(); column.HeaderText = "ROM"; column.Name = "ColumnROMFile"; column.SortMode = DataGridViewColumnSortMode.Programmatic; column.Width = 79; return(column); case VaultGridColumn.ColumnDescription: column = new KryptonDataGridViewTextBoxColumn(); column.HeaderText = "Description"; column.Name = "ColumnDescription"; column.SortMode = DataGridViewColumnSortMode.Programmatic; column.Width = 79; return(column); case VaultGridColumn.ColumnResizeImages: column = new KryptonDataGridViewCheckBoxColumn(); column.HeaderText = "Resize Images?"; column.Name = "ColumnResizeImages"; column.Resizable = DataGridViewTriState.True; column.SortMode = DataGridViewColumnSortMode.Programmatic; column.Width = 78; return(column); default: throw new Exception("Unknown Column Type !! TODO improve that !"); } }
private void InitializeComponent() { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); this.tableLayoutPanel13 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel29 = new System.Windows.Forms.TableLayoutPanel(); this.btnnext = new ComponentFactory.Krypton.Toolkit.KryptonButton(); this.btnsave = new ComponentFactory.Krypton.Toolkit.KryptonButton(); this.kryptonPanel28 = new ComponentFactory.Krypton.Toolkit.KryptonPanel(); this.kryptonLabel1 = new ComponentFactory.Krypton.Toolkit.KryptonLabel(); this.kryptonLabel116 = new ComponentFactory.Krypton.Toolkit.KryptonLabel(); this.dRTreatises = new ComponentFactory.Krypton.Toolkit.KryptonDataGridView(); this.paperid = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.papername = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.papertype = new ComponentFactory.Krypton.Toolkit.KryptonDataGridViewComboBoxColumn(); this.paperyear = new ComponentFactory.Krypton.Toolkit.KryptonDataGridViewNumericUpDownColumn(); this.paperpublish = new ComponentFactory.Krypton.Toolkit.KryptonDataGridViewTextBoxColumn(); this.paperref = new ComponentFactory.Krypton.Toolkit.KryptonDataGridViewButtonColumn(); this.paperorder = new ComponentFactory.Krypton.Toolkit.KryptonDataGridViewTextBoxColumn(); this.paperattachmentup = new System.Windows.Forms.DataGridViewImageColumn(); this.paperattachmentinfo = new ComponentFactory.Krypton.Toolkit.KryptonDataGridViewLinkColumn(); this.hiddenRTreatisesPDFOName = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.uploadfullpath = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.reorder = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.paperup = new System.Windows.Forms.DataGridViewImageColumn(); this.paperdown = new System.Windows.Forms.DataGridViewImageColumn(); this.paperdel = new System.Windows.Forms.DataGridViewImageColumn(); this.tableLayoutPanel13.SuspendLayout(); this.tableLayoutPanel29.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.kryptonPanel28)).BeginInit(); this.kryptonPanel28.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dRTreatises)).BeginInit(); this.SuspendLayout(); // // tableLayoutPanel13 // this.tableLayoutPanel13.ColumnCount = 3; this.tableLayoutPanel13.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 50F)); this.tableLayoutPanel13.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel13.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 50F)); this.tableLayoutPanel13.Controls.Add(this.tableLayoutPanel29, 1, 3); this.tableLayoutPanel13.Controls.Add(this.kryptonPanel28, 1, 1); this.tableLayoutPanel13.Controls.Add(this.dRTreatises, 1, 2); this.tableLayoutPanel13.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel13.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanel13.Name = "tableLayoutPanel13"; this.tableLayoutPanel13.RowCount = 5; this.tableLayoutPanel13.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.tableLayoutPanel13.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 80F)); this.tableLayoutPanel13.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel13.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F)); this.tableLayoutPanel13.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.tableLayoutPanel13.Size = new System.Drawing.Size(1040, 512); this.tableLayoutPanel13.TabIndex = 2; // // tableLayoutPanel29 // this.tableLayoutPanel29.ColumnCount = 3; this.tableLayoutPanel29.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel29.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 103F)); this.tableLayoutPanel29.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 100F)); this.tableLayoutPanel29.Controls.Add(this.btnnext, 2, 0); this.tableLayoutPanel29.Controls.Add(this.btnsave, 1, 0); this.tableLayoutPanel29.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel29.Location = new System.Drawing.Point(53, 455); this.tableLayoutPanel29.Name = "tableLayoutPanel29"; this.tableLayoutPanel29.RowCount = 1; this.tableLayoutPanel29.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel29.Size = new System.Drawing.Size(934, 34); this.tableLayoutPanel29.TabIndex = 2; // // btnnext // this.btnnext.Location = new System.Drawing.Point(837, 3); this.btnnext.Name = "btnnext"; this.btnnext.TabIndex = 1; this.btnnext.Values.Text = "下一页"; this.btnnext.Click += new System.EventHandler(this.btnnext_Click); // // btnsave // this.btnsave.Location = new System.Drawing.Point(734, 3); this.btnsave.Name = "btnsave"; this.btnsave.TabIndex = 0; this.btnsave.Values.Text = "保存"; this.btnsave.Click += new System.EventHandler(this.btnsave_Click); // // kryptonPanel28 // this.kryptonPanel28.Controls.Add(this.kryptonLabel1); this.kryptonPanel28.Controls.Add(this.kryptonLabel116); this.kryptonPanel28.Dock = System.Windows.Forms.DockStyle.Fill; this.kryptonPanel28.Location = new System.Drawing.Point(50, 20); this.kryptonPanel28.Margin = new System.Windows.Forms.Padding(0); this.kryptonPanel28.Name = "kryptonPanel28"; this.kryptonPanel28.Size = new System.Drawing.Size(940, 80); this.kryptonPanel28.TabIndex = 0; // // kryptonLabel1 // this.kryptonLabel1.Location = new System.Drawing.Point(3, 36); this.kryptonLabel1.Name = "kryptonLabel1"; this.kryptonLabel1.Size = new System.Drawing.Size(755, 41); this.kryptonLabel1.StateCommon.ShortText.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.kryptonLabel1.TabIndex = 1; this.kryptonLabel1.Values.Text = "1.附件材料需为PDF或者JPG格式。\r\n2.提交纸质材料时,论文可打印首页和检索证明,其他类别代表性论著打印封面、目录和首页。"; // // kryptonLabel116 // this.kryptonLabel116.Location = new System.Drawing.Point(0, 10); this.kryptonLabel116.Name = "kryptonLabel116"; this.kryptonLabel116.Size = new System.Drawing.Size(927, 27); this.kryptonLabel116.StateCommon.LongText.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.kryptonLabel116.StateCommon.ShortText.Font = new System.Drawing.Font("黑体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.kryptonLabel116.TabIndex = 0; this.kryptonLabel116.Values.ExtraText = "(主要包括论文、著作、研究报告、重要学术会议邀请报告4类;10篇以内,并按照重要性排序)"; this.kryptonLabel116.Values.Text = "六、代表性论著\r\n"; // // dRTreatises // this.dRTreatises.AllowUserToResizeColumns = false; this.dRTreatises.AllowUserToResizeRows = false; this.dRTreatises.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.DisplayedCellsExceptHeaders; this.dRTreatises.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.paperid, this.papername, this.papertype, this.paperyear, this.paperpublish, this.paperref, this.paperorder, this.paperattachmentup, this.paperattachmentinfo, this.hiddenRTreatisesPDFOName, this.uploadfullpath, this.reorder, this.paperup, this.paperdown, this.paperdel }); this.dRTreatises.Dock = System.Windows.Forms.DockStyle.Fill; this.dRTreatises.Location = new System.Drawing.Point(53, 103); this.dRTreatises.MultiSelect = false; this.dRTreatises.Name = "dRTreatises"; dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; this.dRTreatises.RowsDefaultCellStyle = dataGridViewCellStyle1; this.dRTreatises.RowTemplate.Height = 28; this.dRTreatises.Size = new System.Drawing.Size(934, 346); this.dRTreatises.StateCommon.Background.Color1 = System.Drawing.Color.White; this.dRTreatises.StateCommon.BackStyle = ComponentFactory.Krypton.Toolkit.PaletteBackStyle.GridBackgroundList; this.dRTreatises.StateCommon.HeaderColumn.Content.Font = new System.Drawing.Font("黑体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.dRTreatises.StateCommon.HeaderColumn.Content.TextH = ComponentFactory.Krypton.Toolkit.PaletteRelativeAlign.Center; this.dRTreatises.TabIndex = 1; this.dRTreatises.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dRTreatises_CellContentClick); this.dRTreatises.RowsAdded += new System.Windows.Forms.DataGridViewRowsAddedEventHandler(this.dRTreatises_RowsAdded); // // paperid // this.paperid.HeaderText = "序号"; this.paperid.Name = "paperid"; this.paperid.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; this.paperid.Visible = false; this.paperid.Width = 40; // // papername // this.papername.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.papername.HeaderText = "题目"; this.papername.MinimumWidth = 150; this.papername.Name = "papername"; this.papername.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; // // papertype // this.papertype.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.papertype.DropDownWidth = 150; this.papertype.HeaderText = "类别"; this.papertype.Items.AddRange(new string[] { "论文", "著作", "研究技术报告", "重要学术会议邀请报告" }); this.papertype.Name = "papertype"; this.papertype.Width = 100; // // paperyear // this.paperyear.HeaderText = "年份"; this.paperyear.Maximum = new decimal(new int[] { 9999, 0, 0, 0 }); this.paperyear.Minimum = new decimal(new int[] { 1990, 0, 0, 0 }); this.paperyear.Name = "paperyear"; this.paperyear.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.paperyear.Width = 80; // // paperpublish // this.paperpublish.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; this.paperpublish.HeaderText = "著作或机构名称"; this.paperpublish.Name = "paperpublish"; this.paperpublish.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; this.paperpublish.Width = 130; // // paperref // this.paperref.HeaderText = "收录情况"; this.paperref.Name = "paperref"; this.paperref.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.paperref.Width = 150; // // paperorder // this.paperorder.HeaderText = "排名"; this.paperorder.Name = "paperorder"; this.paperorder.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; this.paperorder.Width = 50; // // paperattachmentup // this.paperattachmentup.HeaderText = "附件"; this.paperattachmentup.Name = "paperattachmentup"; this.paperattachmentup.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.paperattachmentup.Width = 45; // // paperattachmentinfo // this.paperattachmentinfo.HeaderText = "附件信息"; this.paperattachmentinfo.Name = "paperattachmentinfo"; this.paperattachmentinfo.ReadOnly = true; this.paperattachmentinfo.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.paperattachmentinfo.Width = 150; // // hiddenRTreatisesPDFOName // this.hiddenRTreatisesPDFOName.HeaderText = "存储名称"; this.hiddenRTreatisesPDFOName.Name = "hiddenRTreatisesPDFOName"; this.hiddenRTreatisesPDFOName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; this.hiddenRTreatisesPDFOName.Visible = false; // // uploadfullpath // this.uploadfullpath.HeaderText = "上传路径"; this.uploadfullpath.Name = "uploadfullpath"; this.uploadfullpath.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; this.uploadfullpath.Visible = false; // // reorder // this.reorder.HeaderText = "排序"; this.reorder.Name = "reorder"; this.reorder.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; this.reorder.Visible = false; // // paperup // this.paperup.HeaderText = "上移"; this.paperup.Name = "paperup"; this.paperup.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.paperup.Width = 45; // // paperdown // this.paperdown.HeaderText = "下移"; this.paperdown.Name = "paperdown"; this.paperdown.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.paperdown.Width = 45; // // paperdel // this.paperdel.HeaderText = "删除"; this.paperdel.Name = "paperdel"; this.paperdel.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.paperdel.Width = 45; // // frmRTreatises // this.Controls.Add(this.tableLayoutPanel13); this.Name = "frmRTreatises"; this.Size = new System.Drawing.Size(1040, 512); this.Leave += new System.EventHandler(this.frmRTreatises_Leave); this.tableLayoutPanel13.ResumeLayout(false); this.tableLayoutPanel29.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.kryptonPanel28)).EndInit(); this.kryptonPanel28.ResumeLayout(false); this.kryptonPanel28.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.dRTreatises)).EndInit(); this.ResumeLayout(false); }
/// <summary> /// Use this function if you do not add your columns at design time. /// </summary> /// <param name="colType"></param> /// <returns></returns> private DataGridViewColumn SetupColumn(SandBoxGridColumn colType) { DataGridViewColumn column = null; switch (colType) { case SandBoxGridColumn.ColumnCustomerID: column = new KryptonDataGridViewTextBoxColumn(); column.HeaderText = "Customer ID"; column.Name = "ColumnCustomerID"; column.SortMode = DataGridViewColumnSortMode.Programmatic; column.Width = 79; return(column); case SandBoxGridColumn.ColumnCustomerName: column = new KryptonDataGridViewTreeTextColumn();// KryptonDataGridViewTextBoxColumn(); column.HeaderText = "Name"; column.Name = "ColumnCustomerName"; column.SortMode = DataGridViewColumnSortMode.Programmatic; column.Width = 79; return(column); case SandBoxGridColumn.ColumnAddress: column = new KryptonDataGridViewTextBoxColumn(); column.HeaderText = "Address"; column.Name = "ColumnAddress"; column.SortMode = DataGridViewColumnSortMode.Programmatic; column.Width = 79; return(column); case SandBoxGridColumn.ColumnCity: column = new KryptonDataGridViewTextBoxColumn(); column.HeaderText = "City"; column.Name = "ColumnCity"; column.SortMode = DataGridViewColumnSortMode.Programmatic; column.Width = 79; return(column); case SandBoxGridColumn.ColumnCountry: column = new KryptonDataGridViewTextAndImageColumn(); column.HeaderText = "Country"; column.Name = "ColumnCountry"; column.Resizable = DataGridViewTriState.True; column.SortMode = DataGridViewColumnSortMode.Programmatic; column.Width = 78; return(column); case SandBoxGridColumn.ColumnOrderDate: column = new KryptonDataGridViewDateTimePickerColumn(); ((KryptonDataGridViewDateTimePickerColumn)column).CalendarTodayDate = DateTime.Now; ((KryptonDataGridViewDateTimePickerColumn)column).Checked = false; ((KryptonDataGridViewDateTimePickerColumn)column).Format = DateTimePickerFormat.Short; column.HeaderText = "Order Date"; column.Name = "ColumnOrderDate"; column.SortMode = DataGridViewColumnSortMode.Programmatic; column.Width = 79; return(column); case SandBoxGridColumn.ColumnProduct: column = new KryptonDataGridViewTextBoxColumn(); column.HeaderText = "Product"; column.Name = "ColumnProduct"; column.SortMode = DataGridViewColumnSortMode.Programmatic; column.Width = 79; return(column); case SandBoxGridColumn.ColumnPrice: column = new KryptonDataGridViewFormattingColumn(); column.Name = colType.ToString(); column.ValueType = typeof(decimal); //really important for formatting DataGridViewCellStyle dataGridViewCellStyle1 = new DataGridViewCellStyle(); dataGridViewCellStyle1.Format = "C2"; dataGridViewCellStyle1.NullValue = ""; column.DefaultCellStyle = dataGridViewCellStyle1; column.HeaderText = "Price"; column.Resizable = DataGridViewTriState.True; column.SortMode = DataGridViewColumnSortMode.Programmatic; column.Width = 79; return(column); case SandBoxGridColumn.SatisfactionColumn: column = new KryptonDataGridViewPercentageColumn(); DataGridViewCellStyle dataGridViewCellStyle2 = new DataGridViewCellStyle(); dataGridViewCellStyle2.Format = "0%"; column.DefaultCellStyle = dataGridViewCellStyle2; column.HeaderText = "Satisfaction"; column.Name = colType.ToString(); column.SortMode = DataGridViewColumnSortMode.Programmatic; return(column); case SandBoxGridColumn.ColumnToken: column = new KryptonDataGridViewTokenColumn(); column.Name = colType.ToString(); column.ReadOnly = true; column.SortMode = DataGridViewColumnSortMode.Programmatic; column.HeaderText = "Tag"; return(column); default: throw new Exception("Unknown Column Type !! TODO improve that !"); } }