示例#1
0
            public AisinoPrintGridLabel(XmlElement xmlElement_0, AisinoPrintGrid aisinoPrintGrid_1) : base(xmlElement_0)
            {
                this._HeadText = string.Empty;
                string attribute = xmlElement_0.GetAttribute("HeadText");

                this._HeadText         = attribute;
                this.aisinoPrintGrid_0 = aisinoPrintGrid_1;
            }
示例#2
0
        public AisinoPrintControl(XmlElement xmlElement_0)
        {
            this._ID              = string.Empty;
            this._width           = 100f;
            this._height          = 25f;
            this._Location        = new PointF(0f, 0f);
            this._backColor       = Color.Transparent;
            this._foreColor       = Color.Black;
            this._lineColor       = Color.Transparent;
            this._isPrint         = true;
            this._Nodes           = new List <AisinoPrintControl>();
            this.absoluteLocation = new PointF(0f, 0f);
            this.gDpi             = Graphics.FromImage(new Bitmap(10, 10));
            string attribute = xmlElement_0.GetAttribute("Id");
            string str2      = xmlElement_0.GetAttribute("Height");
            string str3      = xmlElement_0.GetAttribute("Width");
            string str4      = xmlElement_0.GetAttribute("BackColor");
            string str5      = xmlElement_0.GetAttribute("ForeColor");
            string str6      = xmlElement_0.GetAttribute("TaoDa");
            string str7      = xmlElement_0.GetAttribute("LineWidth");
            string str8      = xmlElement_0.GetAttribute("LineColor");
            string str9      = xmlElement_0.GetAttribute("Location");

            if (attribute != string.Empty)
            {
                this._ID = attribute;
            }
            if (str2 != string.Empty)
            {
                this.Height = Common.ToFloat(str2);
            }
            else if (this._parent != null)
            {
                this.Height = this._parent.Height;
            }
            if (str3 != string.Empty)
            {
                this.Width = Common.ToFloat(str3);
            }
            else if (this._parent != null)
            {
                this.Width = this._parent.Width;
            }
            if (str4 != string.Empty)
            {
                this.BackColor = Common.ToColor(str4);
            }
            if (str5 != string.Empty)
            {
                this.ForeColor = Common.ToColor(str5);
            }
            if (str8 != string.Empty)
            {
                this.LineColor = Common.ToColor(str8);
            }
            if (str6 != string.Empty)
            {
                this.IsPrint = Common.ToBool(str6);
            }
            this.LineWidth = 0;
            if (str7 != string.Empty)
            {
                this.LineWidth = Common.ToInt(str7);
            }
            if (str9 != string.Empty)
            {
                this.Location = Common.ToPointF(str9);
            }
            XmlNodeList childNodes = xmlElement_0.ChildNodes;

            if (childNodes.Count > 0)
            {
                foreach (XmlNode node in childNodes)
                {
                    AisinoPrintControl control;
                    XmlElement         element = node as XmlElement;
                    switch (node.Name)
                    {
                    case "Label":
                        control = new AisinoPrintLabel(element);
                        break;

                    case "Line":
                        control = new AisinoPrintLine(element);
                        break;

                    case "Panel":
                        control = new AisinoPrintPanel(element);
                        break;

                    case "Repeater":
                        control = new AisinoPrintRepeater(element);
                        break;

                    case "Image":
                        control = new AisinoPrintImage(element);
                        break;

                    case "Check":
                        control = new AisinoPrintCheck(element);
                        break;

                    case "Grid":
                        control = new AisinoPrintGrid(element);
                        break;

                    case "HXM":
                        control = new AisinoPrintAsHX(element);
                        break;

                    case "QRM":
                        control = new AisinoPrintAsQR(element);
                        break;

                    case "PDF417":
                        control = new GControl0(element);
                        break;

                    default:
                        control = null;
                        break;
                    }
                    if (control != null)
                    {
                        this.AddNode(control);
                    }
                }
            }
        }