Example #1
0
        private void txtPrefix_Leave(object sender, EventArgs e)
        {
            if (dgvDxcc.SelectedRows == null)
            {
                return;
            }
            if (dgvDxcc.SelectedRows.Count < 1)
            {
                return;
            }
            cDxcc dx = dgvDxcc.SelectedRows[0].DataBoundItem as cDxcc;

            if (dx == null)
            {
                return;
            }
            if (txtPrefix.Text != dx.Prefix)
            {
                //重複チェック
                foreach (cDxcc d in _blDxcc)
                {
                    if (d.Prefix == txtPrefix.Text)
                    {
                        ErrMsg("Prefixに重複がありました\n。処理を終了します。\n Prefix:" + txtPrefix.Text); return;
                    }
                }
                dx.Prefix = txtPrefix.Text;
            }
        }
Example #2
0
        private void cmdCreateNew_Click(object sender, EventArgs e)
        {
            cDxcc dxNew = new cDxcc("New", "NewEntity", "", -999);

            _blDxcc.Add(dxNew);
            dgvDxcc.CurrentCell = dgvDxcc.Rows[_blDxcc.Count - 1].Cells[0];
        }
Example #3
0
        private void cmdOK_Click(object sender, EventArgs e)
        {
            if (lstDXCC.SelectedIndex < 0)
            {
                return;
            }
            cDxcc dx = lstDXCC.SelectedItem as cDxcc;

            if (dx == null)
            {
                return;
            }

            _txtResultCode.Text = dx.Prefix;
            _txtResultName.Text = dx.Name;
            Close();
        }
Example #4
0
        private void txtName_Leave(object sender, EventArgs e)
        {
            if (dgvDxcc.SelectedRows == null)
            {
                return;
            }
            if (dgvDxcc.SelectedRows.Count < 1)
            {
                return;
            }
            cDxcc dx = dgvDxcc.SelectedRows[0].DataBoundItem as cDxcc;

            if (dx == null)
            {
                return;
            }
            dx.Name = txtName.Text;
        }
Example #5
0
        private void dgvDxcc_SelectionChanged(object sender, EventArgs e)
        {
            if (dgvDxcc.SelectedRows == null)
            {
                return;
            }
            if (dgvDxcc.SelectedRows.Count < 1)
            {
                return;
            }
            cDxcc dx = dgvDxcc.SelectedRows[0].DataBoundItem as cDxcc;

            if (dx == null)
            {
                return;
            }
            txtPrefix.Text  = dx.Prefix;
            txtName.Text    = dx.Name;
            txtPattern.Text = dx.Pattern;
            txtCode.Text    = dx.Code.ToString();
        }
Example #6
0
        private void txtCode_Leave(object sender, EventArgs e)
        {
            int iC;

            if (!int.TryParse(txtCode.Text, out iC))
            {
                ErrMsg("Entity Codeは数字(整数)を入力してください。\n入力された文字列: " + txtCode.Text);
            }
            if (dgvDxcc.SelectedRows == null)
            {
                return;
            }
            if (dgvDxcc.SelectedRows.Count < 1)
            {
                return;
            }
            cDxcc dx = dgvDxcc.SelectedRows[0].DataBoundItem as cDxcc;

            if (dx == null)
            {
                return;
            }
            dx.Code = iC;
        }