コード例 #1
0
        private void method_2()
        {
            int num = 0;

            int[] array = new int[6]
            {
                80,
                200,
                100,
                100,
                100,
                100
            };
            this.dgvContacts.ReadOnly = true;
            this.dgvContacts.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
            this.dgvContacts.AllowUserToAddRows      = false;
            this.dgvContacts.AllowUserToDeleteRows   = false;
            this.dgvContacts.AllowUserToResizeRows   = false;
            this.dgvContacts.AllowUserToOrderColumns = false;
            this.dgvContacts.SelectionMode           = DataGridViewSelectionMode.FullRowSelect;
            DataGridViewTextBoxColumn dataGridViewTextBoxColumn = null;

            string[] sZ_HEADER_TEXT = ContactsForm.SZ_HEADER_TEXT;
            foreach (string headerText in sZ_HEADER_TEXT)
            {
                dataGridViewTextBoxColumn            = new DataGridViewTextBoxColumn();
                dataGridViewTextBoxColumn.Width      = array[num++];
                dataGridViewTextBoxColumn.HeaderText = headerText;
                dataGridViewTextBoxColumn.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
                dataGridViewTextBoxColumn.ReadOnly = true;
                dataGridViewTextBoxColumn.SortMode = DataGridViewColumnSortMode.NotSortable;
                this.dgvContacts.Columns.Add(dataGridViewTextBoxColumn);
            }
            Class15.smethod_40(this.cmbAddType, ContactForm.SZ_CALL_TYPE, new int[2]
            {
                0,
                1
            });
            Class15.smethod_37(this.cmbType, ContactForm.SZ_CALL_TYPE);
            Class15.smethod_37(this.cmbCallRxTone, ContactForm.SZ_CALL_RX_TONE);
            Class15.smethod_43(this.cmbRingStyle, 0, 10, 0, Class15.SZ_NONE);
            this.txtName.MaxLength   = 16;
            this.txtCallId.MaxLength = 8;
        }