123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605 |
- using PaintDotNet.Base.CommTool;
- using PaintDotNet.Base.Functionodel;
- using PaintDotNet.Base.SettingModel;
- using PaintDotNet.CustomControl;
- using PaintDotNet.DbOpreate.DbBll;
- using PaintDotNet.DbOpreate.DbModel;
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.IO;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- using static PaintDotNet.Base.Functionodel.AnalyzeSettingModel;
- namespace PaintDotNet.Instrument
- {
- public partial class CreateProjectDialog : PdnBaseForm
- {
- #region 控件
- private GroupBox groupBox1;
- private Button button2;
- private Button button1;
- private GroupBox groupBox6;
- private DataGridView dataGridView1;
- private TextBox textBox9;
- private Label label14;
- private TextBox textBox8;
- private Label label13;
- private Button button4;
- private GroupBox groupBox5;
- private DateTimePicker dateTimePicker2;
- private Label label12;
- private TextBox textBox6;
- private Label label11;
- private TextBox textBox5;
- private Label label10;
- private TextBox textBox4;
- private Label label9;
- private GroupBox groupBox4;
- private DateTimePicker dateTimePicker1;
- private TextBox textBox2;
- private Label label8;
- private Label label7;
- #endregion
- /// <summary>
- /// 数据
- /// </summary>
- public AnalyzeSettingModel model;
- /// <summary>
- /// 父窗口
- /// </summary>
- public PdnBaseForm pdnBaseForm;
- /// <summary>
- /// 上级id
- /// </summary>
- public int parentId;
- public CreateProjectDialog(PdnBaseForm pdnBaseForm)
- {
- this.pdnBaseForm = pdnBaseForm;
- this.model = new AnalyzeSettingModel();
- InitializeComponent();
- InitializeLanguageText();
- InitGridHeader();
- InitializeModelData();
- }
- private void InitializeLanguageText()
- {
- this.groupBox1.Text = PdnResources.GetString("Menu.operation.text");
- this.button2.Text = PdnResources.GetString("Menu.File.Save.Text");
- this.button1.Text = PdnResources.GetString("Menu.File.Close.Text");
- this.groupBox6.Text = PdnResources.GetString("Menu.other.text");
- this.label14.Text = PdnResources.GetString("Menu.name.text") + ":";
- this.label13.Text = PdnResources.GetString("Menu.content.text") + ":";
- this.button4.Text = PdnResources.GetString("Menu.Addto.text");
- this.groupBox5.Text = PdnResources.GetString("Menu.Inspectioninformation.text");
- this.label12.Text = PdnResources.GetString("Menu.Inspectiondate.text") + ":";
- this.label11.Text = PdnResources.GetString("Menu.Contactperson.text") + ":";
- this.label10.Text = PdnResources.GetString("Menu.inspectiondepartment.text") + ":";
- this.label9.Text = PdnResources.GetString("Menu.Sender.text") + ":";
- this.groupBox4.Text = PdnResources.GetString("Menu.thebasicinformationofproject.text");
- this.label8.Text = PdnResources.GetString("Menu.projectnumber.text") + ":";
- this.label7.Text = PdnResources.GetString("Menu.Ratingdate.text") + ":";
- }
- private void InitializeComponent()
- {
- this.groupBox1 = new System.Windows.Forms.GroupBox();
- this.button2 = new System.Windows.Forms.Button();
- this.button1 = new System.Windows.Forms.Button();
- this.groupBox6 = new System.Windows.Forms.GroupBox();
- this.dataGridView1 = new System.Windows.Forms.DataGridView();
- this.textBox9 = new System.Windows.Forms.TextBox();
- this.label14 = new System.Windows.Forms.Label();
- this.textBox8 = new System.Windows.Forms.TextBox();
- this.label13 = new System.Windows.Forms.Label();
- this.button4 = new System.Windows.Forms.Button();
- this.groupBox5 = new System.Windows.Forms.GroupBox();
- this.dateTimePicker2 = new System.Windows.Forms.DateTimePicker();
- this.label12 = new System.Windows.Forms.Label();
- this.textBox6 = new System.Windows.Forms.TextBox();
- this.label11 = new System.Windows.Forms.Label();
- this.textBox5 = new System.Windows.Forms.TextBox();
- this.label10 = new System.Windows.Forms.Label();
- this.textBox4 = new System.Windows.Forms.TextBox();
- this.label9 = new System.Windows.Forms.Label();
- this.groupBox4 = new System.Windows.Forms.GroupBox();
- this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
- this.textBox2 = new System.Windows.Forms.TextBox();
- this.label8 = new System.Windows.Forms.Label();
- this.label7 = new System.Windows.Forms.Label();
- this.groupBox1.SuspendLayout();
- this.groupBox6.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
- this.groupBox5.SuspendLayout();
- this.groupBox4.SuspendLayout();
- this.SuspendLayout();
- //
- // groupBox1
- //
- this.groupBox1.Controls.Add(this.button2);
- this.groupBox1.Controls.Add(this.button1);
- this.groupBox1.Location = new System.Drawing.Point(12, 12);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(542, 49);
- this.groupBox1.TabIndex = 1;
- this.groupBox1.TabStop = false;
- this.groupBox1.Text = "操作";
- //
- // button2
- //
- this.button2.BackColor = System.Drawing.SystemColors.Control;
- this.button2.Location = new System.Drawing.Point(460, 12);
- this.button2.Name = "button2";
- this.button2.Size = new System.Drawing.Size(76, 30);
- this.button2.TabIndex = 1;
- this.button2.Text = "保存";
- this.button2.UseVisualStyleBackColor = false;
- this.button2.Click += new System.EventHandler(this.button2_Click);
- //
- // button1
- //
- this.button1.BackColor = System.Drawing.SystemColors.Control;
- this.button1.Location = new System.Drawing.Point(378, 13);
- this.button1.Name = "button1";
- this.button1.Size = new System.Drawing.Size(76, 30);
- this.button1.TabIndex = 0;
- this.button1.Text = "关闭";
- this.button1.UseVisualStyleBackColor = false;
- this.button1.Click += new System.EventHandler(this.button1_Click);
- //
- // groupBox6
- //
- this.groupBox6.Controls.Add(this.dataGridView1);
- this.groupBox6.Controls.Add(this.textBox9);
- this.groupBox6.Controls.Add(this.label14);
- this.groupBox6.Controls.Add(this.textBox8);
- this.groupBox6.Controls.Add(this.label13);
- this.groupBox6.Controls.Add(this.button4);
- this.groupBox6.Location = new System.Drawing.Point(12, 220);
- this.groupBox6.Name = "groupBox6";
- this.groupBox6.Size = new System.Drawing.Size(542, 226);
- this.groupBox6.TabIndex = 2;
- this.groupBox6.TabStop = false;
- this.groupBox6.Text = "其他";
- //
- // dataGridView1
- //
- this.dataGridView1.AllowUserToAddRows = false;
- this.dataGridView1.AllowUserToDeleteRows = false;
- this.dataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
- this.dataGridView1.BackgroundColor = System.Drawing.Color.White;
- this.dataGridView1.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
- this.dataGridView1.Location = new System.Drawing.Point(16, 68);
- this.dataGridView1.MultiSelect = false;
- this.dataGridView1.Name = "dataGridView1";
- this.dataGridView1.RowHeadersVisible = false;
- this.dataGridView1.RowTemplate.Height = 23;
- this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
- this.dataGridView1.Size = new System.Drawing.Size(511, 148);
- this.dataGridView1.TabIndex = 19;
- this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick);
- //
- // textBox9
- //
- this.textBox9.Location = new System.Drawing.Point(55, 30);
- this.textBox9.Name = "textBox9";
- this.textBox9.Size = new System.Drawing.Size(165, 21);
- this.textBox9.TabIndex = 18;
- //
- // label14
- //
- this.label14.AutoSize = true;
- this.label14.ForeColor = System.Drawing.SystemColors.ControlText;
- this.label14.Location = new System.Drawing.Point(14, 34);
- this.label14.Name = "label14";
- this.label14.Size = new System.Drawing.Size(41, 12);
- this.label14.TabIndex = 17;
- this.label14.Text = "名称:";
- //
- // textBox8
- //
- this.textBox8.Location = new System.Drawing.Point(268, 30);
- this.textBox8.Name = "textBox8";
- this.textBox8.Size = new System.Drawing.Size(165, 21);
- this.textBox8.TabIndex = 16;
- //
- // label13
- //
- this.label13.AutoSize = true;
- this.label13.ForeColor = System.Drawing.SystemColors.ControlText;
- this.label13.Location = new System.Drawing.Point(228, 34);
- this.label13.Name = "label13";
- this.label13.Size = new System.Drawing.Size(41, 12);
- this.label13.TabIndex = 15;
- this.label13.Text = "内容:";
- //
- // button4
- //
- this.button4.BackColor = System.Drawing.SystemColors.Control;
- this.button4.Location = new System.Drawing.Point(451, 25);
- this.button4.Name = "button4";
- this.button4.Size = new System.Drawing.Size(76, 30);
- this.button4.TabIndex = 2;
- this.button4.Text = "添加";
- this.button4.UseVisualStyleBackColor = false;
- this.button4.Click += new System.EventHandler(this.button4_Click);
- //
- // groupBox5
- //
- this.groupBox5.Controls.Add(this.dateTimePicker2);
- this.groupBox5.Controls.Add(this.label12);
- this.groupBox5.Controls.Add(this.textBox6);
- this.groupBox5.Controls.Add(this.label11);
- this.groupBox5.Controls.Add(this.textBox5);
- this.groupBox5.Controls.Add(this.label10);
- this.groupBox5.Controls.Add(this.textBox4);
- this.groupBox5.Controls.Add(this.label9);
- this.groupBox5.Location = new System.Drawing.Point(12, 128);
- this.groupBox5.Name = "groupBox5";
- this.groupBox5.Size = new System.Drawing.Size(542, 90);
- this.groupBox5.TabIndex = 3;
- this.groupBox5.TabStop = false;
- this.groupBox5.Text = "送检信息";
- //
- // dateTimePicker2
- //
- this.dateTimePicker2.Location = new System.Drawing.Point(346, 58);
- this.dateTimePicker2.Name = "dateTimePicker2";
- this.dateTimePicker2.Size = new System.Drawing.Size(165, 21);
- this.dateTimePicker2.TabIndex = 14;
- //
- // label12
- //
- this.label12.AutoSize = true;
- this.label12.ForeColor = System.Drawing.SystemColors.ControlText;
- this.label12.Location = new System.Drawing.Point(283, 62);
- this.label12.Name = "label12";
- this.label12.Size = new System.Drawing.Size(65, 12);
- this.label12.TabIndex = 13;
- this.label12.Text = "送检日期:";
- //
- // textBox6
- //
- this.textBox6.Location = new System.Drawing.Point(346, 23);
- this.textBox6.Name = "textBox6";
- this.textBox6.Size = new System.Drawing.Size(165, 21);
- this.textBox6.TabIndex = 12;
- //
- // label11
- //
- this.label11.AutoSize = true;
- this.label11.ForeColor = System.Drawing.SystemColors.ControlText;
- this.label11.Location = new System.Drawing.Point(283, 28);
- this.label11.Name = "label11";
- this.label11.Size = new System.Drawing.Size(53, 12);
- this.label11.TabIndex = 11;
- this.label11.Text = "联系人:";
- //
- // textBox5
- //
- this.textBox5.Location = new System.Drawing.Point(92, 58);
- this.textBox5.Name = "textBox5";
- this.textBox5.Size = new System.Drawing.Size(165, 21);
- this.textBox5.TabIndex = 10;
- //
- // label10
- //
- this.label10.AutoSize = true;
- this.label10.ForeColor = System.Drawing.SystemColors.ControlText;
- this.label10.Location = new System.Drawing.Point(30, 62);
- this.label10.Name = "label10";
- this.label10.Size = new System.Drawing.Size(65, 12);
- this.label10.TabIndex = 9;
- this.label10.Text = "送检单位:";
- //
- // textBox4
- //
- this.textBox4.Location = new System.Drawing.Point(92, 23);
- this.textBox4.Name = "textBox4";
- this.textBox4.Size = new System.Drawing.Size(165, 21);
- this.textBox4.TabIndex = 8;
- //
- // label9
- //
- this.label9.AutoSize = true;
- this.label9.ForeColor = System.Drawing.SystemColors.ControlText;
- this.label9.Location = new System.Drawing.Point(30, 28);
- this.label9.Name = "label9";
- this.label9.Size = new System.Drawing.Size(53, 12);
- this.label9.TabIndex = 7;
- this.label9.Text = "送检人:";
- //
- // groupBox4
- //
- this.groupBox4.Controls.Add(this.dateTimePicker1);
- this.groupBox4.Controls.Add(this.textBox2);
- this.groupBox4.Controls.Add(this.label8);
- this.groupBox4.Controls.Add(this.label7);
- this.groupBox4.Location = new System.Drawing.Point(12, 67);
- this.groupBox4.Name = "groupBox4";
- this.groupBox4.Size = new System.Drawing.Size(542, 60);
- this.groupBox4.TabIndex = 4;
- this.groupBox4.TabStop = false;
- this.groupBox4.Text = "项目基本信息";
- //
- // dateTimePicker1
- //
- this.dateTimePicker1.Location = new System.Drawing.Point(346, 24);
- this.dateTimePicker1.Name = "dateTimePicker1";
- this.dateTimePicker1.Size = new System.Drawing.Size(165, 21);
- this.dateTimePicker1.TabIndex = 6;
- //
- // textBox2
- //
- this.textBox2.Location = new System.Drawing.Point(92, 24);
- this.textBox2.Name = "textBox2";
- this.textBox2.Size = new System.Drawing.Size(165, 21);
- this.textBox2.TabIndex = 5;
- //
- // label8
- //
- this.label8.AutoSize = true;
- this.label8.ForeColor = System.Drawing.SystemColors.ControlText;
- this.label8.Location = new System.Drawing.Point(30, 28);
- this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(65, 12);
- this.label8.TabIndex = 4;
- this.label8.Text = "项目编号:";
- //
- // label7
- //
- this.label7.AutoSize = true;
- this.label7.ForeColor = System.Drawing.SystemColors.ControlText;
- this.label7.Location = new System.Drawing.Point(283, 28);
- this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(65, 12);
- this.label7.TabIndex = 3;
- this.label7.Text = "评级日期:";
- //
- // CreateProjectDialog
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
- this.ClientSize = new System.Drawing.Size(567, 458);
- this.Controls.Add(this.groupBox6);
- this.Controls.Add(this.groupBox5);
- this.Controls.Add(this.groupBox4);
- this.Controls.Add(this.groupBox1);
- this.Name = "CreateProjectDialog";
- this.Text = "新建项目";
- this.Controls.SetChildIndex(this.groupBox1, 0);
- this.Controls.SetChildIndex(this.groupBox4, 0);
- this.Controls.SetChildIndex(this.groupBox5, 0);
- this.Controls.SetChildIndex(this.groupBox6, 0);
- this.groupBox1.ResumeLayout(false);
- this.groupBox6.ResumeLayout(false);
- this.groupBox6.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
- this.groupBox5.ResumeLayout(false);
- this.groupBox5.PerformLayout();
- this.groupBox4.ResumeLayout(false);
- this.groupBox4.PerformLayout();
- this.ResumeLayout(false);
- }
- /// <summary>
- /// 初始化数据,主要是初始化项目编号
- /// </summary>
- private void InitializeModelData()
- {
- int num = Startup.instance.configModel.ProjectCodeNum;
- int addNum = 1000000 + num;
- String code = "P" + addNum;
- this.textBox2.Text = code;
- }
- private void button1_Click(object sender, EventArgs e)
- {
- this.Close();
- }
- private void button2_Click(object sender, EventArgs e)
- {
- //先给主model赋值
- model.itemNumber = this.textBox2.Text;
- model.ratingDate = this.dateTimePicker1.Value;
- model.inspectionPerson = this.textBox4.Text;
- model.contact = this.textBox6.Text;
- model.inspectionDepartment = this.textBox5.Text;
- model.inspectionDate = this.dateTimePicker2.Value;
- //进行各种判断
- if (string.IsNullOrEmpty(model.itemNumber))
- {
- MessageBox.Show(PdnResources.GetString("Menu.leaseentertheprojectnumb.Text"));
- return;
- }
- //给下方list赋值
- if (this.dataGridView1.Rows.Count > 0)
- {
- model.otherList = new List<AnalyzeSettingModel.OthersInfo>();
- foreach (DataGridViewRow rowData in this.dataGridView1.Rows)
- {
- OthersInfo othersInfo = new OthersInfo();
- othersInfo.name = rowData.Cells[0].Value.ToString();
- othersInfo.content = rowData.Cells[1].Value.ToString();
- model.otherList.Add(othersInfo);
- }
- }
- //写入到数据库,判断编号是否重复
- mic_project temp = mic_project_BLL.FindItenByNameAndParentId(model.itemNumber, this.parentId);
- if(temp!=null)
- {
- MessageBox.Show("已经存在同名项目或文件夹");
- return;
- }
- //添加到数据库
- mic_project project = new mic_project();
- project.parent_id = this.parentId;
- project.project_name = model.itemNumber;
- //project.project_path = newPath;
- project.project_type = 4;
- mic_project_BLL.Add(project);
- mic_project_info info = new mic_project_info();
- info.project_code = model.itemNumber;
- info.project_company = model.inspectionDepartment;
- info.project_contact = model.contact;
- info.project_date = model.inspectionDate;
- info.project_id = project.id;
- info.project_rating = model.ratingDate;
- info.project_sender = model.inspectionPerson;
- mic_project_info_BLL.Add(info);
- if (model.otherList!=null && model.otherList.Count>0)
- {
- foreach (OthersInfo child in model.otherList)
- {
- mic_project_info_item item = new mic_project_info_item();
- item.info_id = info.id;
- item.item_key = child.name;
- item.item_value = child.content;
- mic_project_info_item_BLL.Add(item);
- }
- }
- //增加项目编号,到配置文件
- Startup.instance.configModel.ProjectCodeNum += 1;
- string configXml = XmlSerializeHelper.XmlSerialize<ConfigModel>(Startup.instance.configModel);
- string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Config.xml";
- FileOperationHelper.WriteStringToFile(configXml, filePath, FileMode.Create);
- //调用父窗口方法,进行文件夹创建
- this.pdnBaseForm.CreateProjectName(model, project.id);
- }
- /// <summary>
- /// 添加按钮-其他
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void button4_Click(object sender, EventArgs e)
- {
- if (string.IsNullOrEmpty(this.textBox9.Text))
- {
- MessageBox.Show(PdnResources.GetString("Menu.Pleaseenteranameofthephase.text"));
- return;
- }
- if (string.IsNullOrEmpty(this.textBox8.Text))
- {
- MessageBox.Show(PdnResources.GetString("Menu.Pleaseentercontent.text"));
- return;
- }
- DataGridViewRow row = new DataGridViewRow();
- row.Cells.Add(CreateTextBoxCell(this.textBox9.Text, "name"));
- row.Cells.Add(CreateTextBoxCell(this.textBox8.Text, "content"));
- row.Cells.Add(CreateButtonCell(PdnResources.GetString("Menu.Edit.Delete.Text"), "delete"));
- this.dataGridView1.Rows.Add(row);
- //选中最新添加的那一条
- this.dataGridView1.ClearSelection();
- this.dataGridView1.Rows[this.dataGridView1.Rows.Count - 1].Selected = true;
- //清空输入框
- this.textBox9.Text = "";
- this.textBox8.Text = "";
- }
- /// <summary>
- /// 添加内容单元格
- /// </summary>
- /// <param name="text"></param>
- /// <param name="tag"></param>
- /// <returns></returns>
- private DataGridViewTextBoxCell CreateTextBoxCell(string text, object tag)
- {
- DataGridViewTextBoxCell textboxcell = new DataGridViewTextBoxCell();
- textboxcell.Value = text;
- textboxcell.Tag = tag;
- return textboxcell;
- }
- /// <summary>
- /// 添加按钮单元格
- /// </summary>
- /// <param name="text"></param>
- /// <param name="tag"></param>
- /// <returns></returns>
- public DataGridViewButtonCell CreateButtonCell(string text, object tag)
- {
- DataGridViewButtonCell buttonCell = new DataGridViewButtonCell();
- buttonCell.Value = text;
- buttonCell.Tag = tag;
- return buttonCell;
- }
- /// <summary>
- /// 点击datagridview的删除按钮
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
- {
- var senderGrid = (DataGridView)sender;
- if (senderGrid.Columns[e.ColumnIndex] is DataGridViewButtonColumn &&
- e.RowIndex >= 0)
- this.dataGridView1.Rows.Remove(this.dataGridView1.Rows[e.RowIndex]);
- }
- /// <summary>
- /// 初始化表头
- /// </summary>
- private void InitGridHeader()
- {
- this.dataGridView1.ColumnHeadersHeight = 25;
- DataGridViewTextBoxColumn h1 = new DataGridViewTextBoxColumn();
- h1.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
- h1.Width = 200;
- DataGridViewTextBoxColumn h2 = new DataGridViewTextBoxColumn();
- h2.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
- h2.Width = 200;
- DataGridViewButtonColumn h3 = new DataGridViewButtonColumn();
- h3.Width = 90;
- this.dataGridView1.Columns.Add(h1);
- this.dataGridView1.Columns.Add(h2);
- this.dataGridView1.Columns.Add(h3);
- DataGridViewHelper helper = new DataGridViewHelper(this.dataGridView1);
- helper.Headers.Add(new DataGridViewHelper.TopHeader(0, 1, PdnResources.GetString("Menu.name.text")));
- helper.Headers.Add(new DataGridViewHelper.TopHeader(1, 1, PdnResources.GetString("Menu.content.text")));
- helper.Headers.Add(new DataGridViewHelper.TopHeader(2, 1, PdnResources.GetString("Menu.operation.text")));
- this.dataGridView1.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable;
- this.dataGridView1.Columns[0].ReadOnly = true;
- this.dataGridView1.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable;
- this.dataGridView1.Columns[1].ReadOnly = true;
- this.dataGridView1.AllowUserToResizeRows = false;
- this.dataGridView1.AllowUserToResizeColumns = false;
- }
- }
- }
|