Exemple #1
0
        protected new static void DeserializeInto(IDictionary <string, object> dict, TicketItem into)
        {
            TextItem.DeserializeInto(dict, into);
            DateItem item = (DateItem)into;

            item.DateFormat = dict["format"].ToString();
        }
Exemple #2
0
 protected void copyBaseSettingsInto(TicketItem into)
 {
     into.HorizontalAlignment = this.HorizontalAlignment;
     into.VerticalAlignment   = this.VerticalAlignment;
     into.HorizontalScaling   = this.HorizontalScaling;
     into.Position            = this.Position;
     into.Rotation            = this.Rotation;
 }
Exemple #3
0
        protected new static void DeserializeInto(IDictionary <string, object> dict, TicketItem into)
        {
            TicketItem.DeserializeInto(dict, into);
            LineItem item = (LineItem)into;

            item.Thickness     = int.Parse(dict["thickness"].ToString());
            item.Length        = int.Parse(dict["length"].ToString());
            item.LineDirection = GetDirection(dict["direction"].ToString());
        }
Exemple #4
0
        protected new static void DeserializeInto(IDictionary <string, object> dict, TicketItem into)
        {
            BorderItem item = (BorderItem)into;

            TicketItem.DeserializeInto(dict, into);
            item.Thickness = int.Parse(dict["thickness"].ToString());
            item.Width     = int.Parse(dict["width"].ToString());
            item.Height    = int.Parse(dict["height"].ToString());
        }
Exemple #5
0
 protected static void DeserializeInto(IDictionary <string, object> dict, TicketItem into)
 {
     into.Position = new Point(
         int.Parse(dict["x"].ToString()),
         int.Parse(dict["y"].ToString())
         );
     into.HorizontalAlignment = GetAlignment(dict["hAlign"].ToString());
     into.VerticalAlignment   = GetAlignment(dict["vAlign"].ToString());
     into.HorizontalScaling   = int.Parse(dict["hScale"].ToString());
     into.Rotation            = GetRotation(int.Parse(dict["rotation"].ToString()));
 }
Exemple #6
0
        protected new static void DeserializeInto(IDictionary <string, object> dict, TicketItem into)
        {
            TicketItem.DeserializeInto(dict, into);
            TextItem text = (TextItem)into;

            // TicketNumber, Date, etc. don't have a text property
            if (dict.ContainsKey("text"))
            {
                text.Text = dict["text"].ToString();
            }

            text.TextSpacing = int.Parse(dict["spacing"].ToString());
            text.FontSize    = int.Parse(dict["size"].ToString());
            text.FontType    = GetFont(dict["font"].ToString());
        }