Esempio n. 1
0
            public void PrintHead(PointF pointF_0, Graphics graphics_0)
            {
                AisinoPrintLabel label = this;

                label.Text     = this.HeadText;
                label.DataBind = string.Empty;
                label.Print(pointF_0, null, graphics_0, false);
            }
Esempio n. 2
0
        public static string[] ZheHang(string string_0, string string_1, string string_2)
        {
            Canvas canvas = new Canvas(ReadXml.Get()[string_1].CanvasPath);

            if (canvas != null)
            {
                AisinoPrintLabel label = canvas[string_2] as AisinoPrintLabel;
                if (label != null)
                {
                    return(label.ZheHang(string_0));
                }
            }
            return(null);
        }
Esempio n. 3
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);
                    }
                }
            }
        }