コード例 #1
0
        private void chxNEWEXTEN_CheckedChanged(object sender, EventArgs e)
        {
            newExt = lblNewExVal.Visible = chxNEWEXTEN.Checked;
            if (newExt)
            {
                checkBoxsaveExt.Checked = false;
            }
            if (chxNEWEXTEN.Checked)
            {
                if (lblNewExVal.Text != "")
                {
                    return;
                }

                UserINP u = new UserINP();
                u.ShowDialog();
                if (u.DialogResult != DialogResult.OK)
                {
                    chxNEWEXTEN.Checked = newExt = false;
                    return;
                }
                if (u.Text[0] != '.') // if user forget the DOT
                {
                    u.Text = ("." + u.Text);
                }
                cus_exten = lblNewExVal.Text = u.Text;
            }
        }
コード例 #2
0
        private void lblNewExVal_Click(object sender, EventArgs e)
        {
            UserINP u = new UserINP();

            u.ShowDialog();
            if (u.DialogResult != DialogResult.OK)
            {
                chxNEWEXTEN.Checked = newExt = false;
                return;
            }
            if (u.Text[0] != '.') // if user forget the DOT
            {
                u.Text = ("." + u.Text);
            }
            cus_exten = lblNewExVal.Text = u.Text;
        }