Exemplo n.º 1
0
        public UCText( )
        {
            InitializeComponent( );

            ChangeEventHelper = new ChangeEventHelper(this.rtb);
            UndoRedoHelper    = new UndoRedoHelper(this.rtb);

            WhitespaceAdorner          = new WhitespaceAdorner(rtb, ChangeEventHelper);
            LocalUnderliningAdorner    = new UnderliningAdorner(rtb);
            ExternalUnderliningAdorner = new UnderliningAdorner(rtb);

            NormalStyleInfo = new StyleInfo("TextNormal");

            HighlightStyleInfos = new[]
            {
                new StyleInfo("MatchHighlight_0"),
                new StyleInfo("MatchHighlight_1"),
                new StyleInfo("MatchHighlight_2")
            };


            RecolouringLoop         = new ResumableLoop(RecolouringThreadProc, 333, 555);
            LocalUnderliningLoop    = new ResumableLoop(LocalUnderliningThreadProc, 222, 444);
            ExternalUnderliningLoop = new ResumableLoop(ExternalUnderliningThreadProc, 333, 555);


            pnlDebug.Visibility = Visibility.Collapsed;
#if !DEBUG
            pnlDebug.Visibility = Visibility.Collapsed;
#endif
            //WhitespaceAdorner.IsDbgDisabled = true;
            //LocalUnderliningAdorner.IsDbgDisabled = true;
            //ExternalUnderliningAdorner.IsDbgDisabled = true;
        }
Exemplo n.º 2
0
        public UCMatches( )
        {
            InitializeComponent( );

            LocalUnderliningAdorner    = new UnderliningAdorner(rtbMatches);
            ExternalUnderliningAdorner = new UnderliningAdorner(rtbMatches);

            ChangeEventHelper = new ChangeEventHelper(rtbMatches);

            HighlightStyleInfos = new[]
            {
                new StyleInfo("MatchHighlight_0"),
                new StyleInfo("MatchHighlight_1"),
                new StyleInfo("MatchHighlight_2")
            };

            HighlightLightStyleInfos = new[]
            {
                new StyleInfo("MatchHighlight_0_Light"),
                new StyleInfo("MatchHighlight_1_Light"),
                new StyleInfo("MatchHighlight_2_Light")
            };

            MatchNormalStyleInfo       = new StyleInfo("MatchNormal");
            MatchValueStyleInfo        = new StyleInfo("MatchValue");
            MatchValueSpecialStyleInfo = new StyleInfo("MatchValueSpecial");
            LocationStyleInfo          = new StyleInfo("MatchLocation");
            GroupNameStyleInfo         = new StyleInfo("MatchGroupName");
            GroupSiblingValueStyleInfo = new StyleInfo("MatchGroupSiblingValue");
            GroupValueStyleInfo        = new StyleInfo("MatchGroupValue");
            GroupFailedStyleInfo       = new StyleInfo("MatchGroupFailed");


            ShowMatchesLoop         = new ResumableLoop(ShowMatchesThreadProc, 333, 555);
            LocalUnderliningLoop    = new ResumableLoop(LocalUnderliningThreadProc, 222, 444);
            ExternalUnderliningLoop = new ResumableLoop(ExternalUnderliningThreadProc, 333, 555);


            pnlDebug.Visibility = Visibility.Collapsed;
#if !DEBUG
            pnlDebug.Visibility = Visibility.Collapsed;
#endif
            //LocalUnderliningAdorner.IsDbgDisabled = true;
            //ExternalUnderliningAdorner.IsDbgDisabled = true;
        }