Esempio n. 1
0
        public void Initialize(AppDBQueryLink linkQueryRow, IQueryableConnection connection)
        {
            currentQuery = linkQueryRow;
            completionHelper = QueryComposerResources.ComposerHelper(connection);

            Reset();
        }
Esempio n. 2
0
        public void Initialize(AppDBQueryLink linkQueryRow, IQueryableConnection connection)
        {
            currentQuery     = linkQueryRow;
            completionHelper = QueryComposerResources.ComposerHelper(connection);

            Reset();
        }
Esempio n. 3
0
        public static QueryComposerHelper ComposerHelper(IQueryableConnection connection)
        {
            QueryComposerHelper composer;

            if (!Composers.TryGetValue(connection, out composer))
            {
                composer = new QueryComposerHelper(connection);
                Composers.Add(connection, composer);
            }

            return(composer);
        }
Esempio n. 4
0
        public void Complete(ICSharpCode.AvalonEdit.Editing.TextArea textArea, ISegment completionSegment, EventArgs insertionRequestEventArgs)
        {
            var word = QueryComposerHelper.ExtractPreviousWord(textArea.Document.Text, completionSegment.EndOffset - 1);

            ISegment replaceSegment = completionSegment;

            if (stringval.Substring(0, word.Length) == word)
            {
                replaceSegment = new CustomSegment(completionSegment.EndOffset - word.Length, word.Length);
            }

            textArea.Document.Replace(replaceSegment, stringval);
        }
        public static QueryComposerHelper ComposerHelper(IQueryableConnection connection)
        {
            QueryComposerHelper composer;

            if (!Composers.TryGetValue(connection, out composer))
            {
                composer = new QueryComposerHelper(connection);
                Composers.Add(connection, composer);
            }

            return composer;
        }