예제 #1
0
//		public void Load (Stream file, string fileName)
//		{
//			using (TextReader reader = new StreamReader (file))
//			{
//				Load (reader.ReadToEnd (), fileName);
//			}
//		}

        public void LoadDocument()
        {
            if (activated || RootComponent != null)
            {
                throw new InvalidOperationException("You must reset the host before loading another file.");
            }
            loading = true;

            this.Container.Add(new WebFormPage());
            this.rootDocument = new Document((Control)rootComponent, this);
            //rootDocument.Changed += new EventHandler (Document_OnChanged);

            serializer         = new DocumentSerializer(this);
            designerSerializer = new DesignerSerializer(this);

            loading = false;
            OnLoadComplete();
        }
예제 #2
0
//		public void Load (Stream file, string fileName)
//		{
//			using (TextReader reader = new StreamReader (file))
//			{
//				Load (reader.ReadToEnd (), fileName);
//			}
//		}
		
		public void LoadDocument ()
		{
			if (activated || RootComponent != null)
				throw new InvalidOperationException ("You must reset the host before loading another file.");
			loading = true;

			this.Container.Add (new WebFormPage());
			this.rootDocument = new Document ((Control)rootComponent, this);
			//rootDocument.Changed += new EventHandler (Document_OnChanged);

			serializer = new DocumentSerializer (this);
			designerSerializer = new DesignerSerializer (this);

			loading = false;
			OnLoadComplete ();
		}