Exemplo n.º 1
0
        public void InitialSerialization()
        {
            // check the document for controls and directives
            RootDocument.InitControlsAndDirectives();

            // init the designer context tags, and find the absolute path to the current project
            var view = editorHost.DesignerView as AspNetEdit.Editor.UI.RootDesignerView;

            view.InitProperties();

            // pass the freshly generated designer context to the html serializer
            serializer.SetDesignerContext(view.DesignerContext);

            // serialize the document for displaying in the designer
            SerializeDocument();

            // subscribe to changes in the component container
            container.ComponentChanged += new ComponentChangedEventHandler(OnComponentUpdated);

            // serialize when a transaction is closed
            TransactionClosed += new DesignerTransactionCloseEventHandler(this_OnTransactionClosed);

            // subscibe for undo or redo events
            RootDocument.UndoRedo += document_OnUndoRedo;
        }
        /// <summary>
        /// Extends BeginInvoke so that when a state object is not needed, null does not need to be passed.
        /// <example>
        /// designertransactioncloseeventhandler.BeginInvoke(sender, e, callback);
        /// </example>
        /// </summary>
        public static IAsyncResult BeginInvoke(this DesignerTransactionCloseEventHandler designertransactioncloseeventhandler, Object sender, DesignerTransactionCloseEventArgs e, AsyncCallback callback)
        {
            if (designertransactioncloseeventhandler == null)
            {
                throw new ArgumentNullException("designertransactioncloseeventhandler");
            }

            return(designertransactioncloseeventhandler.BeginInvoke(sender, e, callback, null));
        }
Exemplo n.º 3
0
		public void InitialSerialization ()
		{
			// check the document for controls and directives
			RootDocument.InitControlsAndDirectives ();

			// init the designer context tags, and find the absolute path to the current project
			var view = editorHost.DesignerView as AspNetEdit.Editor.UI.RootDesignerView;
			view.InitProperties ();

			// pass the freshly generated designer context to the html serializer
			serializer.SetDesignerContext (view.DesignerContext);

			// serialize the document for displaying in the designer
			SerializeDocument ();

			// subscribe to changes in the component container
			container.ComponentChanged += new ComponentChangedEventHandler (OnComponentUpdated);

			// serialize when a transaction is closed
			TransactionClosed += new DesignerTransactionCloseEventHandler (this_OnTransactionClosed);

			// subscibe for undo or redo events
			RootDocument.UndoRedo += document_OnUndoRedo;
		}