Exemplo n.º 1
0
        //--------------------------------------------------------------------------------
        /// <summary>
        /// Fired when the modelss form's visibility property changes.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void formExistingNames_VisibleChanged(object sender, EventArgs e)
        {
            FormExistingNames form = sender as FormExistingNames;

            if (form.HiddenBySelection && string.IsNullOrEmpty(this.textBoxName.Text))
            {
                this.textBoxName.Text = form.CurrentSelection + " (B)";
            }
        }
Exemplo n.º 2
0
 //--------------------------------------------------------------------------------
 /// <summary>
 /// Moves the modeless form to an appropriate position relative to the existin
 /// names label.
 /// </summary>
 private void PositionModeless()
 {
     if (m_formExistingNames == null)
     {
         m_formExistingNames = new FormExistingNames(this.m_existingNames);
         m_formExistingNames.VisibleChanged += new EventHandler(formExistingNames_VisibleChanged);
         m_formExistingNames.StartPosition   = FormStartPosition.Manual;
         m_formExistingNames.Visible         = false;
     }
     m_formExistingNames.Location = this.PointToScreen(this.labelHoverList.Location);
 }