Beispiel #1
0
 /// <summary>
 /// Constructor with the specified initial values.
 /// </summary>
 /// <param name="designId">Internal identifier of the design.</param>
 /// <param name="userId">Internal identifier of the agent.</param>
 /// <param name="category">Category of the design.</param>
 /// <param name="type">Type of the design.</param>
 /// <param name="size">Size of the design.</param>
 /// <param name="gender">Gender of the Agent that should be used for the
 /// message on the design.</param>
 /// <param name="onDesignName">Name of the Agent that should be used for the
 /// message on the design.</param>
 /// <param name="justification">Justification of the message on the
 /// design.</param>
 /// <param name="gutter">Gutter of the message on the design.</param>
 /// <param name="messageRectangle">The rectangle in which the message should be
 /// displayed on the design.</param>
 /// <param name="lowResolutionFile">Low resolution file location of the
 /// design.</param>
 /// <param name="highResolutionFile">High resolution file location of the
 /// design.</param>
 /// <param name="extraFile">Extra file location of the design.</param>
 /// <param name="status">Status of the design.</param>
 /// <param name="createDate">Created date of the design.</param>
 /// <param name="lastModifyDate">Last modified date of the design.</param>
 /// <param name="lastModifyBy">The internal idetifier of the user that recently
 /// modified the design.</param>
 /// <param name="approveDate">Date on which the design is approved.</param>
 /// <param name="approveBy">The internal idetifier of the user that approved
 /// the design.</param>
 /// <param name="comments">Comments about the design.</param>
 /// <param name="history">History of the design.</param>
 /// <param name="used">Usage status of the design.</param>
 public DesignInfo(int designId, int userId, LookupInfo category, LookupInfo type,
                   SizeF size, string gender, string onDesignName, JustificationType justification,
                   string gutter, RectangleF messageRectangle, string lowResolutionFile,
                   string highResolutionFile, string extraFile, LookupInfo status,
                   DateTime createDate, DateTime lastModifyDate, int lastModifyBy,
                   DateTime approveDate, int approveBy, string comments, string history,
                   DesignUsed used)
 {
     this.designId           = designId;
     this.userId             = userId;
     this.category           = category;
     this.type               = type;
     this.size               = size;
     this.gender             = gender;
     this.onDesignName       = onDesignName;
     this.justification      = justification;
     this.gutter             = gutter;
     this.messageRectangle   = messageRectangle;
     this.lowResolutionFile  = lowResolutionFile;
     this.highResolutionFile = highResolutionFile;
     this.extraFile          = extraFile;
     this.status             = status;
     this.createDate         = createDate;
     this.lastModifyDate     = lastModifyDate;
     this.lastModifyBy       = lastModifyBy;
     this.approveDate        = approveDate;
     this.approveBy          = approveBy;
     this.comments           = comments;
     this.history            = history;
     this.used               = used;
 }
Beispiel #2
0
        public static PrintableBuilder SetJustification(this PrintableBuilder builder,
                                                        JustificationType justificationType = JustificationType.Left)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            return(builder.Add(new SetJustification(justificationType)));
        }
Beispiel #3
0
        public static void SetJustification(this IPrinter printer,
                                            JustificationType justificationType = JustificationType.Left)
        {
            if (printer == null)
            {
                throw new ArgumentNullException(nameof(printer));
            }

            printer.Print(new SetJustification(justificationType));
        }
Beispiel #4
0
 public ESCPosDocumentFragment SetJustification(JustificationType justificationType)
 {
     return(Add(new SetJustification(justificationType)));
 }
Beispiel #5
0
        public TestForm()
        {
            InitializeComponent();
            demos.mouseClickCallback = DrawPoly;
            rbElip.CheckedChanged   += delegate { if (rbElip.Checked)
                                                  {
                                                      selectCirc();
                                                  }
            };
            rbRect.CheckedChanged += delegate { if (rbRect.Checked)
                                                {
                                                    selectRect();
                                                }
            };
            rbLine.CheckedChanged += delegate { if (rbLine.Checked)
                                                {
                                                    selectLine();
                                                }
            };
            rbPoly.CheckedChanged += delegate { if (rbPoly.Checked)
                                                {
                                                    selectPoly();
                                                }
                                                numericUpDown1.Enabled = rbPoly.Checked; };
            button2.Click += delegate { chooseSprite(); selectSprite(); };
            numericUpDown1.ValueChanged += delegate { prevPoly.SideCount = (int)numericUpDown1.Value; };
            richTextBox1.TextChanged    += delegate { if (prevText != null)
                                                      {
                                                          prevText.Body = richTextBox1.Text;
                                                      }
            };

            trackBar1.ValueChanged   += delegate { updatePreview(); trackBar2.Maximum = trackBar1.Value / 2; };
            trackBar2.ValueChanged   += delegate { updatePreview(); };
            trackBar3.ValueChanged   += delegate { updatePreview(); };
            checkBox1.CheckedChanged += delegate { updatePreview(); };
            checkBox2.CheckedChanged += delegate { updatePreview(); };
            trackBar2.Maximum         = trackBar1.Value / 2;
            wheel.StartPosition       = FormStartPosition.Manual;

            panel5.Click += delegate
            {
                Color temp = panel5.BackColor;
                wheel.set   = x => { panel5.BackColor = x; updatePreview(); };
                wheel.color = panel5.BackColor;
                if (wheel.ShowDialog() == DialogResult.Cancel)
                {
                    panel5.BackColor = temp;
                }
                updatePreview();
            };
            panel6.Click += delegate
            {
                Color temp = panel6.BackColor;
                wheel.set   = x => { panel6.BackColor = x; updatePreview(); };
                wheel.color = panel6.BackColor;
                if (wheel.ShowDialog() == DialogResult.Cancel)
                {
                    panel6.BackColor = temp;
                }
                updatePreview();
            };
            demos.mouseMovedCallback          = UpdateLineOverlay;
            tabControl1.SelectedIndexChanged += delegate
            {
                if (tabControl1.SelectedIndex == 0)
                {
                    lastPolySelection();
                }
                if (tabControl1.SelectedIndex == 1 && prevSprite != null)
                {
                    selectSprite();
                }
                if (tabControl1.SelectedIndex == 2)
                {
                    selectText();
                }
            };

            //list of all ttf filepaths
            string[] fonts = Directory.GetFiles(@"C:\windows\fonts\").Where(x => x.ToLower().Contains(".ttf")).ToArray();
            for (int i = 0; i < fonts.Length; i++)
            {
                fonts[i] = fonts[i].Substring(17, fonts[i].Length - 21);
            }

            leftRadio.CheckedChanged += delegate {
                if (leftRadio.Checked)
                {
                    selectedJustification = JustificationType.Left;
                    recreateText();
                }
            };
            centRadio.CheckedChanged += delegate {
                if (centRadio.Checked)
                {
                    selectedJustification = JustificationType.Center;
                    recreateText();
                }
            };
            rightRadio.CheckedChanged += delegate {
                if (rightRadio.Checked)
                {
                    selectedJustification = JustificationType.Right;
                    recreateText();
                }
            };

            comboBox2.Items.AddRange(fonts);
            comboBox2.SelectedIndex         = fonts.ToList().IndexOf("times");
            comboBox2.SelectedIndexChanged += delegate { recreateText(); };
        }
Beispiel #6
0
 public SetJustification(JustificationType type)
 {
     _type = type;
 }
Beispiel #7
0
 public SetJustification(JustificationType type = JustificationType.Left)
 {
     _type = type;
 }