Esempio n. 1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 5 "..\..\MainWindow.xaml"
                ((TextRedactor.MainWindow)(target)).Closed += new System.EventHandler(this.Window_Closed);

            #line default
            #line hidden

            #line 5 "..\..\MainWindow.xaml"
                ((TextRedactor.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.TextRedactor = ((Controls.SuperTextRedactor)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 2
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
 {
     switch (connectionId)
     {
     case 1:
         this.TextRedactor = ((Controls.SuperTextRedactor)(target));
         return;
     }
     this._contentLoaded = true;
 }
Esempio n. 3
0
 public static void RestoreOriginalState(SuperTextRedactor control)
 {
     new TextRange
         (control.TextBox.MainControl.Document.ContentStart, control.TextBox.MainControl.Document.ContentEnd)
     .ApplyPropertyValue(TextElement.BackgroundProperty, Brushes.White);
     foreach (var item in control.NotesBrowser.Notes)
     {
         new TextRange
             (control.TextBox.MainControl.GetTextPointAt(control.TextBox.MainControl.Document.ContentStart, item.Value.OffsetStart), (control.TextBox.MainControl.GetTextPointAt(control.TextBox.MainControl.Document.ContentStart, item.Value.OffsetEnd)))
         .ApplyPropertyValue(TextElement.BackgroundProperty, Brushes.PaleGreen);
     }
 }