Esempio n. 1
0
        public void FinishEdit()
        {
            if (Node != null)
            {
                var oldName = Text;
                var newName = Editor.UIText;
                if (!oldName.Equals(newName))
                {
                    Node.Name = newName;
                    ((INodeProperties)Node.NodeProperties).EndEdit();
                    if (Node.Name == null)
                    {
                        ParentControl.NodeText.Text = newName;
                    }
                }
                if (ParentControl.ParentSurface.Selector.NodeControls.Any() && !ParentControl.ParentSurface.Selector.IsMultiSelect)
                {
                    ParentControl.ParentSurface.Selector.NodeControls.First().Focus();
                }
                else
                {
                    ParentControl.Focus();
                }

                UnlinkNodeControl();
            }
        }
Esempio n. 2
0
 /// <summary>
 /// When the find form is being closed we record the user-changable settings for later restoration
 /// </summary>
 private void findForm_Closing(object sender, CancelEventArgs e)
 {
     formRestoreData = new MemoryStream();
     findForm.GetRestoreData(formRestoreData, new BinaryFormatter());
     findForm = null;
     ParentControl.Focus(); // This is required if an InforForm has been shown.
     // Otherwise, focus is orphaned. I am not sure why.
 }
Esempio n. 3
0
        private void SetPos()
        {
            if (Count == 1)
            {
                pnlSelect.Visible = false;
            }
            else
            {
                pnlSelect.Visible = true;
            }
            DoResize();

            lblIndex.Text = SelectedIndex.ToString() + " of " + Count.ToString();

            if (ParentControl != null)
            {
                ParentControl.Focus();
            }
        }
Esempio n. 4
0
 private void InfoText_Enter(object sender, EventArgs e)
 {
     ParentControl.Focus();
 }