public void SetUp()
        {
            this.Viewer          = new CodeViewer();
            this.Viewer.Language = PredefinedLanguage.MsSql;

            var oTestProvider      = new TestDbInfoProvider();
            var oSuggestionBuilder = new EditQueryRegExBuilder(Viewer, oTestProvider);

            oSuggestionBuilder.DefaultSchema = "Schema_Second";

            Viewer.UseSuggestionRules(oSuggestionBuilder);
        }
Пример #2
0
        public void Linking()
        {
            CodeViewer oViewer = new CodeViewer();

            Assert.IsNull(oViewer.CodeCompletor);

            oViewer.ReadOnly = false;
            Assert.IsNull(oViewer.CodeCompletor);

            TestDbInfoProvider oTestProvider = new TestDbInfoProvider();
            var oSuggestionBuilder           = new EditQueryRegExBuilder(oViewer, oTestProvider);

            oViewer.UseSuggestionRules(oSuggestionBuilder);

            Assert.IsNotNull(oViewer.CodeCompletor);
            Assert.IsNotNull(oViewer.CodeCompletor.Builder);
            Assert.AreEqual(oSuggestionBuilder, oViewer.CodeCompletor.Builder);
        }
Пример #3
0
        //=========================================================================================
        public StartForm()
        {
            this.InitializeComponent();
            this.Viewers = new CodeViewer[] { this.codeViewer1, this.codeViewer2 };
            this.checkLineNumbers.CheckedChanged += new System.EventHandler(checkLineNumbers_CheckedChanged);
            this.checkMargin.CheckedChanged      += new System.EventHandler(checkMargin_CheckedChanged);

            foreach (CodeViewer oViewer in this.Viewers)
            {
                oViewer.ScrollBars = ScrollBars.Both;
                oViewer.VerticalScroll.ValueChanged += new System.EventHandler(VerticalScroll_ValueChanged);
            }
            this.checkLineNumbers.Checked = true;
            this.Test_Small_MsSql();

            SuggestionBuilder oSugBuilder = new EditQueryRegExBuilder(codeViewer1, new TestDbInfoProvider());

            ((EditQueryRegExBuilder)oSugBuilder).DefaultSchema = "Schema_Second";

            codeViewer1.UseSuggestionRules(oSugBuilder);
        }