Пример #1
0
        private void tvTags_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            DialogResult          dialogResult;
            ToolsWindowsTagsInput toolsWindowsTagsInput = new ToolsWindowsTagsInput((TagsStorage)e.Node.Tag);

            dialogResult = toolsWindowsTagsInput.ShowDialog(Application.OpenForms[0]);
            if (dialogResult == DialogResult.OK)
            {
                if (lastActiveControl != null)
                {
                    lastActiveControl.SelectedText = toolsWindowsTagsInput.BuildTagString;
                    //lastActiveControl.Text = toolsWindowsTagsInput.BuildTagString;
                }
                else
                {
                    dialogResult = MessageBox.Show("No active control selected, copy tag in clipbord", "Error - No active control selected", MessageBoxButtons.YesNo, MessageBoxIcon.Error);
                    if (dialogResult == DialogResult.Yes)
                    {
                        Clipboard.SetText(toolsWindowsTagsInput.BuildTagString);
                    }
                }
            }
        }
Пример #2
0
        private void tvTags_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            DialogResult dialogResult;
            ToolsWindowsTagsInput toolsWindowsTagsInput = new ToolsWindowsTagsInput((TagsStorage)e.Node.Tag);
            dialogResult = toolsWindowsTagsInput.ShowDialog(Application.OpenForms[0]);
            if (dialogResult == DialogResult.OK)
            {
                if (lastActiveControl != null)
                {
                    lastActiveControl.SelectedText = toolsWindowsTagsInput.BuildTagString;
                    //lastActiveControl.Text = toolsWindowsTagsInput.BuildTagString;
                }
                else
                {

                    dialogResult = MessageBox.Show("No active control selected, copy tag in clipbord", "Error - No active control selected", MessageBoxButtons.YesNo,MessageBoxIcon.Error);
                    if (dialogResult == DialogResult.Yes)
                    {
                        Clipboard.SetText(toolsWindowsTagsInput.BuildTagString);
                    }

                }
            }
        }