public XmlEditorViewContent()
        {
            xmlEditorWindow = new XmlEditorWindow(this);
            view            = xmlEditorWindow.View;
            buffer          = (SourceBuffer)view.Buffer;
            buffer.Changed += BufferChanged;

            view.SchemaCompletionDataItems = XmlSchemaManager.SchemaCompletionDataItems;
            SetInitialValues();

            // Watch for changes to the source editor properties.
            propertyChangedHandler = (EventHandler <PropertyChangedEventArgs>)DispatchService.GuiDispatch(new EventHandler <PropertyChangedEventArgs>(SourceEditorPropertyChanged));
            TextEditorProperties.Properties.PropertyChanged += propertyChangedHandler;

            buffer.ModifiedChanged += new EventHandler(OnModifiedChanged);
            XmlEditorAddInOptions.PropertyChanged += new EventHandler <PropertyChangedEventArgs>(XmlEditorPropertyChanged);

            XmlSchemaManager.UserSchemaAdded   += new EventHandler(UserSchemaAdded);
            XmlSchemaManager.UserSchemaRemoved += new EventHandler(UserSchemaRemoved);

            xmlEditorWindow.ShowAll();
        }
Esempio n. 2
0
		public XmlEditorViewContent()
		{
			xmlEditorWindow = new XmlEditorWindow(this);
			view = xmlEditorWindow.View;
			buffer = (SourceBuffer)view.Buffer;
			buffer.Changed += BufferChanged;

			view.SchemaCompletionDataItems = XmlSchemaManager.SchemaCompletionDataItems;
			SetInitialValues();	 
			
			// Watch for changes to the source editor properties.
			propertyChangedHandler = (EventHandler<PropertyChangedEventArgs>)DispatchService.GuiDispatch(new EventHandler<PropertyChangedEventArgs>(SourceEditorPropertyChanged));
			TextEditorProperties.Properties.PropertyChanged += propertyChangedHandler;

			buffer.ModifiedChanged += new EventHandler (OnModifiedChanged);
			XmlEditorAddInOptions.PropertyChanged += new EventHandler<PropertyChangedEventArgs>(XmlEditorPropertyChanged);
			
			XmlSchemaManager.UserSchemaAdded += new EventHandler(UserSchemaAdded);
			XmlSchemaManager.UserSchemaRemoved += new EventHandler(UserSchemaRemoved);
			
			xmlEditorWindow.ShowAll();
		}