Пример #1
0
        void TagPanelVisibleChanged(object sender, EventArgs e)
        {
            FTagsTextBox.Text = FTagsTextBox.Text.Trim();
            FTagsTextBox.Focus();
            FToolTip.Hide(FRichTextBox);

            if (PendingRedraw)
            {
                Redraw();
            }
        }
Пример #2
0
        void RichTextBoxMouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            //if cloned via ctrl+click the self is now hidden
            //and we don't want the nodebrowser to vanish yet
            if (Visible)
            {
                //hack: called only to re-focus active patch
                //after this mouseup set the focus to the already hidden NodeBrowser window
                OnCreateNodeFromString("");

                FTagsTextBox.Focus();
            }
        }
Пример #3
0
        void RichTextBoxMouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            if (FHoverLine < 0 || FHoverLine >= FRichTextBox.Lines.Length)
            {
                return;
            }

            string username = FRichTextBox.Lines[FHoverLine].Trim();

            FRichTextBox.SelectionStart = FRichTextBox.GetFirstCharIndexFromLine(FHoverLine) + 1;
            FTagsTextBox.Focus();

            //as plugin in its own window
            if (AllowDragDrop)
            {
                var selNode = FSelectionList[FHoverLine + ScrolledLine];
                FTagsTextBox.DoDragDrop(string.Format("{0}||{1}", selNode.Systemname, selNode.Filename), DragDropEffects.All);
                return;
            }
            //else popped up on doubleclick
            else if (e.Button == MouseButtons.Left)
            {
                CreateNodeFromHoverLine();
            }
            else
            {
                try
                {
                    var selNode = FSelectionList[FHoverLine + ScrolledLine];
                    if (e.Button == MouseButtons.Middle)
                    {
                        OnShowNodeReference(selNode);
                    }
                    else
                    {
                        FTagsTextBox.Text = "";
                        OnShowHelpPatch(selNode);
                    }
                }
                catch //username is a filename..do nothing
                {}
            }
        }
Пример #4
0
 public void AfterShow()
 {
     this.FRichTextBox.Resize += this.HandleRichTextBoxResize;
     FTagsTextBox.Focus();
 }