Exemple #1
0
 public PriceTagItem(PriceTagItem source, PriceTag priceTag)
 {
     Bold            = source.Bold;
     BorderThickness = source.BorderThickness;
     BottomBorder    = source.BottomBorder;
     BottomMargin    = source.BottomMargin;
     FontSize        = source.FontSize;
     Height          = source.Height;
     IsAutoHeight    = source.IsAutoHeight;
     IsAutoWidth     = source.IsAutoWidth;
     IsNewLine       = source.IsNewLine;
     Italic          = source.Italic;
     LeftBorder      = source.LeftBorder;
     LeftMargin      = source.LeftMargin;
     Name            = source.Name;
     Position        = source.Position;
     PriceTagId      = priceTag.Id;
     RightBorder     = source.RightBorder;
     RightMargin     = source.RightMargin;
     Text            = source.Text;
     TextAlignment   = source.TextAlignment;
     TopBorder       = source.TopBorder;
     TopMargin       = source.TopMargin;
     Underline       = source.Underline;
     Width           = source.Width;
     Wrap            = source.Wrap;
 }
Exemple #2
0
 public PriceTag(PriceTag source, Address address) : this()
 {
     AddressId       = address.Id;
     BorderThickness = source.BorderThickness;
     Height          = source.Height;
     TagType         = source.TagType;
     Width           = source.Width;
 }
Exemple #3
0
        public static PriceTag Default(TagType tagType, Address address)
        {
            var tag = new PriceTag {
                TagType         = tagType,
                AddressId       = (tagType == TagType.PriceTag && address != null) ? address.Id : (uint?)null,
                Height          = 5,
                Width           = 5,
                BorderThickness = 0.5d,
                Items           =
                {
                    new PriceTagItem("Наименование клиента")
                    {
                        BorderThickness = 1,
                        BottomBorder    = true,
                        TextAlignment   = TextAlignment.Center,
                        LeftMargin      = 2,
                        RightMargin     = 2,
                        Position        = 1,
                    },
                    new PriceTagItem("Наименование")
                    {
                        Underline     = true,
                        Bold          = true,
                        TextAlignment = TextAlignment.Center,
                        Wrap          = true,
                        LeftMargin    = 2,
                        RightMargin   = 2,
                        Position      = 2,
                    },
                    new PriceTagItem("<Произвольный текст>")
                    {
                        Text       = "Цена",
                        LeftMargin = 2,
                        Position   = 3,
                    },
                    new PriceTagItem("Цена")
                    {
                        IsNewLine     = false,
                        Bold          = true,
                        FontSize      = 20,
                        TextAlignment = TextAlignment.Right,
                        RightMargin   = 2,
                        Position      = 4,
                    },
                    new PriceTagItem("<Произвольный текст>")
                    {
                        Text       = "Произв.",
                        LeftMargin = 2,
                        Position   = 5,
                    },
                    new PriceTagItem("Страна")
                    {
                        IsNewLine     = false,
                        TextAlignment = TextAlignment.Right,
                        RightMargin   = 2,
                        Position      = 6,
                    },
                    new PriceTagItem("Производитель")
                    {
                        LeftMargin  = 2,
                        RightMargin = 2,
                        Position    = 7,
                    },
                    new PriceTagItem("<Произвольный текст>")
                    {
                        Text       = "Срок годности",
                        LeftMargin = 2,
                        Position   = 8,
                    },
                    new PriceTagItem("Срок годности")
                    {
                        IsNewLine     = false,
                        TextAlignment = TextAlignment.Right,
                        RightMargin   = 2,
                        Position      = 9,
                    },
                    new PriceTagItem("<Произвольный текст>")
                    {
                        Text       = "Серия товара",
                        LeftMargin = 2,
                        FontSize   = 10,
                        Position   = 10,
                    },
                    new PriceTagItem("Серия товара")
                    {
                        IsNewLine     = false,
                        TextAlignment = TextAlignment.Right,
                        RightMargin   = 2,
                        FontSize      = 10,
                        Position      = 11,
                    },
                    new PriceTagItem("<Произвольный текст>")
                    {
                        Text       = "№ накладной",
                        LeftMargin = 2,
                        FontSize   = 10,
                        Position   = 16,
                    },
                    new PriceTagItem("Номер накладной")
                    {
                        IsNewLine     = false,
                        TextAlignment = TextAlignment.Right,
                        RightMargin   = 2,
                        FontSize      = 10,
                        Position      = 17,
                    },
                    new PriceTagItem("<Произвольный текст>")
                    {
                        Text            = "Подпись",
                        LeftMargin      = 2,
                        BorderThickness = 1,
                        TopBorder       = true,
                        FontSize        = 10,
                        Position        = 18,
                    },
                    new PriceTagItem("Дата накладной")
                    {
                        IsNewLine       = false,
                        TextAlignment   = TextAlignment.Right,
                        RightMargin     = 2,
                        FontSize        = 10,
                        BorderThickness = 1,
                        TopBorder       = true,
                        Position        = 19,
                    },
                }
            };

            if (tagType == TagType.RackingMap)
            {
                tag.Height = 6;
                tag.Items.Add(new PriceTagItem("<Произвольный текст>")
                {
                    Text       = "Количество",
                    LeftMargin = 2,
                    FontSize   = 10,
                    Position   = 12,
                });
                tag.Items.Add(new PriceTagItem("Количество")
                {
                    IsNewLine     = false,
                    TextAlignment = TextAlignment.Right,
                    RightMargin   = 2,
                    FontSize      = 10,
                    Position      = 13,
                });
                tag.Items.Add(new PriceTagItem("<Произвольный текст>")
                {
                    Text       = "Номер сертификата",
                    LeftMargin = 2,
                    FontSize   = 10,
                    Position   = 14,
                });
                tag.Items.Add(new PriceTagItem("Номер сертификата")
                {
                    IsNewLine     = false,
                    TextAlignment = TextAlignment.Right,
                    RightMargin   = 2,
                    FontSize      = 10,
                    Position      = 15,
                });
                tag.Items = tag.Items.OrderBy(x => x.Position).ToList();
            }
            return(tag);
        }