コード例 #1
0
        public void ShowInsertJoin()
        {
            var anal = m_anal;

            if (anal != null && anal.UsedTables.Count > 0)
            {
                m_editor.CallDatabaseConnectionNeeded();
                InsertJoinForm.Run(anal, m_editor, m_editor.Connection.Settings.CodeCompletion());
            }
        }
コード例 #2
0
ファイル: InsertJoinForm.cs プロジェクト: janproch/datadmin
        public static void Run(SqlEditorAnalyser anal, CodeEditor editor, CodeCompletionSettings settings)
        {
            var win = new InsertJoinForm(anal, settings);

            if (win.ShowDialogEx() == DialogResult.OK)
            {
                string text = win.GetSqlText();
                editor.InsertTextOnCursor(text);
                editor.ActiveTextAreaControl.Caret.Position = editor.Document.OffsetToPosition(editor.ActiveTextAreaControl.Caret.Offset + text.Length);
            }
        }