private void frmMesas_Load(object sender, EventArgs e) { int mesa = 0; bool bitx = false; bool bity = false; Int32 contadorx = 0; Int32 contadory = 0; int contadordemesas = 0; for (int x = 0; x < 10; x++) { if (bitx) { contadorx = contadorx + 160; } bitx = true; bity = true; contadory = 0; for (int i = 0; i < 10; i++) { if (bity) { contadory = contadory + 60; } VistaButton vbmesa2 = new VistaButton(); this.SuspendLayout(); vbmesa2.BackColor = System.Drawing.Color.Transparent; vbmesa2.ButtonColor = System.Drawing.Color.Blue; contadordemesas++; vbmesa2.ButtonText = "Mesa " + contadordemesas.ToString(); vbmesa2.CornerRadius = 0; vbmesa2.Font = new System.Drawing.Font("Calibri", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); vbmesa2.GlowColor = System.Drawing.Color.FromName("Blue"); vbmesa2.HighlightColor = System.Drawing.Color.FromArgb(((int)(((byte)(193)))), ((int)(((byte)(203)))), ((int)(((byte)(223))))); vbmesa2.Location = new System.Drawing.Point(40 + contadorx, 30 + contadory); vbmesa2.Name = "vbmesa2"; vbmesa2.Size = new System.Drawing.Size(136, 40); vbmesa2.TabIndex = 1; vbmesa2.Tag2 = ""; vbmesa2.Click += new System.EventHandler(this.txtactualiza); this.Controls.Add(vbmesa2); if (mesa == contadordemesas) { break; } } if (mesa == contadordemesas) { break; } } }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.label1 = new System.Windows.Forms.Label(); this.txtInput = new System.Windows.Forms.TextBox(); this.cmdMakeBarcode = new System.Windows.Forms.VistaButton(); this.printDocument1 = new System.Drawing.Printing.PrintDocument(); this.cmdPrint = new System.Windows.Forms.VistaButton(); this.pictBarcode = new System.Windows.Forms.PictureBox(); this.btnSave = new System.Windows.Forms.VistaButton(); ((System.ComponentModel.ISupportInitialize)(this.pictBarcode)).BeginInit(); this.SuspendLayout(); // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.ForeColor = System.Drawing.Color.White; this.label1.Location = new System.Drawing.Point(8, 9); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(43, 17); this.label1.TabIndex = 0; this.label1.Text = "Data:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // txtInput // this.txtInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.txtInput.Location = new System.Drawing.Point(57, 8); this.txtInput.Name = "txtInput"; this.txtInput.Size = new System.Drawing.Size(475, 20); this.txtInput.TabIndex = 1; // // cmdMakeBarcode // this.cmdMakeBarcode.BackColor = System.Drawing.Color.Transparent; this.cmdMakeBarcode.BaseColor = System.Drawing.Color.Transparent; this.cmdMakeBarcode.ButtonText = "Make barcode"; this.cmdMakeBarcode.Location = new System.Drawing.Point(8, 168); this.cmdMakeBarcode.Name = "cmdMakeBarcode"; this.cmdMakeBarcode.Size = new System.Drawing.Size(121, 33); this.cmdMakeBarcode.TabIndex = 2; this.cmdMakeBarcode.Click += new System.EventHandler(this.cmdMakeBarcode_Click); // // printDocument1 // this.printDocument1.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printDocument1_PrintPage); // // cmdPrint // this.cmdPrint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.cmdPrint.BackColor = System.Drawing.Color.Transparent; this.cmdPrint.BaseColor = System.Drawing.Color.Transparent; this.cmdPrint.ButtonText = "Print"; this.cmdPrint.Location = new System.Drawing.Point(368, 168); this.cmdPrint.Name = "cmdPrint"; this.cmdPrint.Size = new System.Drawing.Size(79, 33); this.cmdPrint.TabIndex = 6; this.cmdPrint.Click += new System.EventHandler(this.cmdPrint_Click); // // pictBarcode // this.pictBarcode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.pictBarcode.BackColor = System.Drawing.Color.AliceBlue; this.pictBarcode.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.pictBarcode.Location = new System.Drawing.Point(8, 34); this.pictBarcode.Name = "pictBarcode"; this.pictBarcode.Size = new System.Drawing.Size(528, 128); this.pictBarcode.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; this.pictBarcode.TabIndex = 3; this.pictBarcode.TabStop = false; // // btnSave // this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.btnSave.BackColor = System.Drawing.Color.Transparent; this.btnSave.BaseColor = System.Drawing.Color.Transparent; this.btnSave.ButtonText = "Save"; this.btnSave.Location = new System.Drawing.Point(453, 168); this.btnSave.Name = "btnSave"; this.btnSave.Size = new System.Drawing.Size(79, 33); this.btnSave.TabIndex = 6; this.btnSave.Click += new System.EventHandler(this.btnSave_Click); // // FrmGenBarcode // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.BackColor = System.Drawing.Color.SteelBlue; this.ClientSize = new System.Drawing.Size(540, 213); this.Controls.Add(this.btnSave); this.Controls.Add(this.cmdPrint); this.Controls.Add(this.txtInput); this.Controls.Add(this.pictBarcode); this.Controls.Add(this.cmdMakeBarcode); this.Controls.Add(this.label1); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "FrmGenBarcode"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Barcode Generator"; ((System.ComponentModel.ISupportInitialize)(this.pictBarcode)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); }