private void InitializeComponent() { DataGridViewCellStyle dataGridViewCellStyle = new DataGridViewCellStyle(); this.dgvContact = new DataGridView(); this.txtName = new MyDataGridViewTextBoxColumn(); this.txtCode = new DataGridViewTextBoxColumn(); this.btnDel = new Button(); this.btnAdd = new Button(); this.pnlDtmfContact = new CustomPanel(); ((ISupportInitialize)this.dgvContact).BeginInit(); this.pnlDtmfContact.SuspendLayout(); base.SuspendLayout(); this.dgvContact.AllowUserToAddRows = false; dataGridViewCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; dataGridViewCellStyle.BackColor = SystemColors.Control; dataGridViewCellStyle.Font = new Font("Arial", 10f, FontStyle.Regular); dataGridViewCellStyle.ForeColor = SystemColors.WindowText; dataGridViewCellStyle.SelectionBackColor = SystemColors.Highlight; dataGridViewCellStyle.SelectionForeColor = SystemColors.HighlightText; dataGridViewCellStyle.WrapMode = DataGridViewTriState.True; this.dgvContact.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle; this.dgvContact.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvContact.Columns.AddRange(this.txtName, this.txtCode); this.dgvContact.Location = new Point(43, 69); this.dgvContact.Name = "dgvContact"; this.dgvContact.RowTemplate.Height = 23; this.dgvContact.Size = new Size(367, 401); this.dgvContact.TabIndex = 2; this.dgvContact.CellValidating += this.dgvContact_CellValidating; this.dgvContact.EditingControlShowing += this.dgvContact_EditingControlShowing; this.txtName.HeaderText = "Name"; this.txtName.MaxByteLength = 2147483647; this.txtName.Name = "txtName"; this.txtName.Width = 150; this.txtCode.HeaderText = "Number"; this.txtCode.Name = "txtCode"; this.txtCode.Width = 150; this.btnDel.Location = new Point(251, 28); this.btnDel.Name = "btnDel"; this.btnDel.Size = new Size(75, 23); this.btnDel.TabIndex = 1; this.btnDel.Text = "Delete"; this.btnDel.UseVisualStyleBackColor = true; this.btnDel.Click += this.btnDel_Click; this.btnAdd.Location = new Point(126, 28); this.btnAdd.Name = "btnAdd"; this.btnAdd.Size = new Size(75, 23); this.btnAdd.TabIndex = 0; this.btnAdd.Text = "Add"; this.btnAdd.UseVisualStyleBackColor = true; this.btnAdd.Click += this.sscOhyqVop; this.pnlDtmfContact.AutoScroll = true; this.pnlDtmfContact.AutoSize = true; this.pnlDtmfContact.Controls.Add(this.dgvContact); this.pnlDtmfContact.Controls.Add(this.btnAdd); this.pnlDtmfContact.Controls.Add(this.btnDel); this.pnlDtmfContact.Dock = DockStyle.Fill; this.pnlDtmfContact.Location = new Point(0, 0); this.pnlDtmfContact.Name = "pnlDtmfContact"; this.pnlDtmfContact.Size = new Size(454, 498); this.pnlDtmfContact.TabIndex = 3; // base.AutoScaleMode = AutoScaleMode.Font; base.ClientSize = new Size(454, 498); base.Controls.Add(this.pnlDtmfContact); this.Font = new Font("Arial", 10f, FontStyle.Regular, GraphicsUnit.Point, 0); base.Name = "DtmfContactForm"; this.Text = "DTMF Contact"; base.Load += this.DtmfContactForm_Load; base.FormClosing += this.DtmfContactForm_FormClosing; ((ISupportInitialize)this.dgvContact).EndInit(); this.pnlDtmfContact.ResumeLayout(false); base.ResumeLayout(false); base.PerformLayout(); }