示例#1
0
        private void btnTo_Click(object sender, EventArgs e)
        {
            txtTo.Hide();
            txtCc.Hide();

            dlgEmailList dlg = new dlgEmailList();

            if (dlg.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
            {
                txtTo.Value = dlg.SelectedEmails[0] + "; ";
                txtTo.TxtBox.SelectionStart = txtTo.Value.Length;
                txtTo.Hide();
            }
        }
示例#2
0
        private void btnCc_Click(object sender, EventArgs e)
        {
            txtTo.Hide();
            txtCc.Hide();

            dlgEmailList dlg = new dlgEmailList();

            if (dlg.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
            {
                List <string> selectedEmails = dlg.SelectedEmails;
                foreach (var email in selectedEmails)
                {
                    txtCc.TxtBox.AppendText(string.Format("{0}; ", email));
                }

                txtCc.TxtBox.SelectionStart = txtTo.Value.Length;
                txtCc.Hide();
            }
        }