Example #1
0
        public void AddImage(string path, int left, int top)
        {
            TemplateTextObject text = new TemplateTextObject();

            text.ImgPath = path;
            text.Top     = top;
            text.Left    = left;
            config.Lists.Add(text);
        }
Example #2
0
        public void AddContent(string content, string fontname, int size, int left, int top)
        {
            TemplateTextObject text = new TemplateTextObject();

            text.Content  = content;
            text.FontName = fontname;
            text.FontSize = size;
            text.Top      = top;
            text.Left     = left;
            config.Lists.Add(text);
        }
        private void btnAddToPrintTemplate_Click(object sender, EventArgs e)
        {
            TemplateTextObject text = new TemplateTextObject();

            text.Content  = this.txtContent.Text.TrimEnd();
            text.FontName = this.cbFonts.Text;
            text.FontSize = Convert.ToInt32(this.txtFontSize.Text);
            text.Left     = Convert.ToInt32(this.txtLeft.Text);
            text.Top      = Convert.ToInt32(this.txtTop.Text);
            config.Lists.Add(text);
            this.RefreshData();
        }