public TextPatternTextSelectionChangedEvent(FragmentControlProvider provider)
            : base(provider, 
			        TextPatternIdentifiers.TextSelectionChangedEvent)
        {
            SWF.Document document = TextBoxBase.Document;
            selectionVisible = document.selection_visible;
            selectionStart = document.selection_start;
            selectionEnd = document.selection_end;
        }
		public TextPatternTextSelectionChangedEvent (FragmentControlProvider provider)
			: base (provider, 
			        TextPatternIdentifiers.TextSelectionChangedEvent)
		{
			SWF.Document document = TextBoxBase.Document;
			selectionVisible = document.selection_visible;
			selectionStart = document.selection_start;
			selectionEnd = document.selection_end;
		}
 private void OnSelectionChangedEvent(object sender, 
     EventArgs args)
 {
     SWF.Document document = TextBoxBase.Document;
     if (!selectionVisible && !document.selection_visible)
         return;
     if (document.selection_visible != selectionVisible || document.selection_start != selectionStart || document.selection_end != selectionEnd) {
         RaiseAutomationEvent ();
         selectionVisible = document.selection_visible;
         selectionStart = document.selection_start;
         selectionEnd = document.selection_end;
     }
 }
		private void OnSelectionChangedEvent (object sender, 
		                                    EventArgs args)
		{
			SWF.Document document = TextBoxBase.Document;
			if (!selectionVisible && !document.selection_visible)
				return;
			if (document.selection_visible != selectionVisible || document.selection_start != selectionStart || document.selection_end != selectionEnd) {
				RaiseAutomationEvent ();
				selectionVisible = document.selection_visible;
				selectionStart = document.selection_start;
				selectionEnd = document.selection_end;
			}
		}