//-------------------------------------------------------------------------------- /// <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)"; } }
//-------------------------------------------------------------------------------- /// <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); }