예제 #1
0
		//factory method
		public static BaseCompendiumPageElement CreateHtmlElement(XElement elementXml)
		{
			var elementToReturn = new HtmlElement();

			try
			{
				elementToReturn.Deserialize(elementXml);
			}
			catch
			{
				elementToReturn = null;
			}

			return elementToReturn;
		}
예제 #2
0
		public override object Clone()
		{
			var html = new HtmlElement
			{
				ElementType = ElementType.Clone() as string,
				Name = Name.Clone() as string,
				X = X,
				Y = Y,
				Z = Z,
				Text = (string)Text.Clone(),
				Width = Width,
				Height = Height,
				Scrollbar = Scrollbar,
				Background = Background
			};

			return html;
		}
예제 #3
0
        public override object Clone()
        {
            HtmlElement html = new HtmlElement();

            html.ElementType = this.ElementType.Clone() as string;
            html.Name = this.Name.Clone() as string;
            html.X = this.X;
            html.Y = this.Y;
            html.Z = this.Z;

            html.Text = (string)this.Text.Clone();
            html.Width = this.Width;
            html.Height = this.Height;
            html.Scrollbar = this.Scrollbar;
            html.Background = this.Background;

            return html;
        }
예제 #4
0
		public static BaseCompendiumPageElement CreateInstance()
		{
			var html = new HtmlElement
			{
				Text = "",
				X = 0,
				Y = 0,
				Width = 100,
				Height = 40,
				Background = false,
				Scrollbar = false,
				Name = "new Html",
				ElementType = "HtmlElement"
			};

			return html;
		}
예제 #5
0
 public static BaseCompendiumPageElement CreateInstance()
 {
     HtmlElement html = new HtmlElement();
     html.Text = "";
     html.X = 0;
     html.Y = 0;
     html.Width = 100;
     html.Height = 40;
     html.Background = false;
     html.Scrollbar = false;
     html.Name = "new Html";
     html.ElementType = "HtmlElement";
     return html;
 }