示例#1
0
        /// <summary>
        /// Shows the search form.
        /// </summary>
        /// <param name="searchForm">the value be look up to TextBox control</param>
        private void ShowSearchForm(string lookupTo)
        {
            MemberWizard_Find findForm = new MemberWizard_Find();

            findForm.Closed  += new EventHandler(findForm_Closed);
            findForm.LookUpTo = lookupTo;
            findForm.ShowDialog();
        }
示例#2
0
        /// <summary>
        /// Handles the Closed event of the findForm control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void findForm_Closed(object sender, EventArgs e)
        {
            MemberWizard_Find findForm = sender as MemberWizard_Find;

            if (findForm != null)
            {
                Control[] txtCtrls = this.gbxOptions.Controls.Find(findForm.LookUpTo, false);
                if (txtCtrls.Length > 0)
                {
                    TextBox txtCtrl = txtCtrls[0] as TextBox;
                    if (txtCtrl != null)
                    {
                        txtCtrl.Text = findForm.SelectedMember;
                    }
                }
            }
        }