public static HtmlString CtrlLabel(this HtmlHelper html, string id, string label) { var ctrl = new CtrlLabel { Id = id, Label = label }; return(new HtmlString(ctrl.GetHtml())); }
private WinCtrlRoot GetRootControl() { var root = new WinCtrlRoot(this.winGLCanvas1.Width, this.winGLCanvas1.Height); string folder = System.Windows.Forms.Application.StartupPath; var bitmap = new Bitmap(System.IO.Path.Combine(folder, @"particle.png")); { var control = new CtrlImage(bitmap, false) { Anchor = GUIAnchorStyles.Left | GUIAnchorStyles.Bottom }; control.Location = new GUIPoint(10, 10); control.Width = 100; control.Height = 50; bitmap.Dispose(); control.MouseUp += control_MouseUp; root.Children.Add(control); } { var control = new CtrlButton() { Anchor = GUIAnchorStyles.Left | GUIAnchorStyles.Bottom }; control.Location = new GUIPoint(10, 70); control.Width = 100; control.Height = 50; control.Focused = true; control.MouseUp += control_MouseUp; root.Children.Add(control); } { var control = new CtrlLabel(100) { Anchor = GUIAnchorStyles.Left | GUIAnchorStyles.Bottom }; control.Location = new GUIPoint(10, 130); control.Width = 100; control.Height = 30; control.Text = "Hello CSharpGL!"; control.RenderBackground = true; control.BackgroundColor = new vec4(1, 0, 0, 1); control.MouseUp += control_MouseUp; root.Children.Add(control); } return(root); }
/// <summary> /// This method is required for Windows Forms designer support. /// Do not change the method contents inside the source code editor. The Forms designer might /// not be able to load this method if it was changed manually. /// </summary> private void InitializeComponent() { this.radioButton1 = new CtrlRadioButton(); this.radioButton2 = new CtrlRadioButton(); this.radioButton3 = new CtrlRadioButton(); this.radioButton4 = new CtrlRadioButton(); this.radioButton5 = new CtrlRadioButton(); this.radioButton6 = new CtrlRadioButton(); this.radioButton7 = new CtrlRadioButton(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.label1 = new CtrlLabel(); this.tableLayoutPanel1.SuspendLayout(); this.SuspendLayout(); // // radioButton1 // this.radioButton1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.radioButton1.AutoSize = true; this.radioButton1.BackColor = System.Drawing.SystemColors.ButtonHighlight; this.radioButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); this.radioButton1.FlatAppearance.BorderSize = 3; this.radioButton1.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.radioButton1.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.radioButton1.Location = new System.Drawing.Point(4, 32); this.radioButton1.Name = "radioButton1"; this.radioButton1.Size = new System.Drawing.Size(116, 54); this.radioButton1.TabIndex = 0; this.radioButton1.TabStop = true; this.radioButton1.Text = "1"; this.radioButton1.UseVisualStyleBackColor = false; this.radioButton1.Enter += new System.EventHandler(this.RadioButtonEnter); // // radioButton2 // this.radioButton2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.radioButton2.AutoSize = true; this.radioButton2.BackColor = System.Drawing.SystemColors.ButtonHighlight; this.radioButton2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); this.radioButton2.FlatAppearance.BorderSize = 3; this.radioButton2.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.radioButton2.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.radioButton2.Location = new System.Drawing.Point(4, 93); this.radioButton2.Name = "radioButton2"; this.radioButton2.Size = new System.Drawing.Size(116, 54); this.radioButton2.TabIndex = 1; this.radioButton2.TabStop = true; this.radioButton2.Text = "2"; this.radioButton2.UseVisualStyleBackColor = false; this.radioButton2.Enter += new System.EventHandler(this.RadioButtonEnter); // // radioButton3 // this.radioButton3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.radioButton3.AutoSize = true; this.radioButton3.BackColor = System.Drawing.SystemColors.ButtonHighlight; this.radioButton3.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); this.radioButton3.FlatAppearance.BorderSize = 3; this.radioButton3.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.radioButton3.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.radioButton3.Location = new System.Drawing.Point(4, 154); this.radioButton3.Name = "radioButton3"; this.radioButton3.Size = new System.Drawing.Size(116, 54); this.radioButton3.TabIndex = 2; this.radioButton3.TabStop = true; this.radioButton3.Text = "3"; this.radioButton3.UseVisualStyleBackColor = false; this.radioButton3.Enter += new System.EventHandler(this.RadioButtonEnter); // // radioButton4 // this.radioButton4.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.radioButton4.AutoSize = true; this.radioButton4.BackColor = System.Drawing.SystemColors.ButtonHighlight; this.radioButton4.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); this.radioButton4.FlatAppearance.BorderSize = 3; this.radioButton4.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.radioButton4.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.radioButton4.Location = new System.Drawing.Point(4, 215); this.radioButton4.Name = "radioButton4"; this.radioButton4.Size = new System.Drawing.Size(116, 54); this.radioButton4.TabIndex = 3; this.radioButton4.TabStop = true; this.radioButton4.Text = "4"; this.radioButton4.UseVisualStyleBackColor = false; this.radioButton4.Enter += new System.EventHandler(this.RadioButtonEnter); // // radioButton5 // this.radioButton5.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.radioButton5.AutoSize = true; this.radioButton5.BackColor = System.Drawing.SystemColors.ButtonHighlight; this.radioButton5.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); this.radioButton5.FlatAppearance.BorderSize = 3; this.radioButton5.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.radioButton5.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.radioButton5.Location = new System.Drawing.Point(4, 276); this.radioButton5.Name = "radioButton5"; this.radioButton5.Size = new System.Drawing.Size(116, 54); this.radioButton5.TabIndex = 4; this.radioButton5.TabStop = true; this.radioButton5.Text = "5"; this.radioButton5.UseVisualStyleBackColor = false; this.radioButton5.Enter += new System.EventHandler(this.RadioButtonEnter); // // radioButton6 // this.radioButton6.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.radioButton6.AutoSize = true; this.radioButton6.BackColor = System.Drawing.SystemColors.ButtonHighlight; this.radioButton6.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); this.radioButton6.FlatAppearance.BorderSize = 3; this.radioButton6.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.radioButton6.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.radioButton6.Location = new System.Drawing.Point(4, 337); this.radioButton6.Name = "radioButton6"; this.radioButton6.Size = new System.Drawing.Size(116, 54); this.radioButton6.TabIndex = 5; this.radioButton6.TabStop = true; this.radioButton6.Text = "6"; this.radioButton6.UseVisualStyleBackColor = false; this.radioButton6.Enter += new System.EventHandler(this.RadioButtonEnter); // // radioButton7 // this.radioButton7.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.radioButton7.AutoSize = true; this.radioButton7.BackColor = System.Drawing.SystemColors.ButtonHighlight; this.radioButton7.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); this.radioButton7.FlatAppearance.BorderSize = 3; this.radioButton7.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.radioButton7.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.radioButton7.Location = new System.Drawing.Point(4, 398); this.radioButton7.Name = "radioButton7"; this.radioButton7.Size = new System.Drawing.Size(116, 60); this.radioButton7.TabIndex = 6; this.radioButton7.TabStop = true; this.radioButton7.Text = "7"; this.radioButton7.UseVisualStyleBackColor = false; this.radioButton7.Enter += new System.EventHandler(this.RadioButtonEnter); // // tableLayoutPanel1 // this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.tableLayoutPanel1.AutoSize = true; this.tableLayoutPanel1.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single; this.tableLayoutPanel1.ColumnCount = 1; this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel1.Controls.Add(this.radioButton7, 0, 7); this.tableLayoutPanel1.Controls.Add(this.radioButton6, 0, 6); this.tableLayoutPanel1.Controls.Add(this.radioButton5, 0, 5); this.tableLayoutPanel1.Controls.Add(this.radioButton1, 0, 1); this.tableLayoutPanel1.Controls.Add(this.radioButton2, 0, 2); this.tableLayoutPanel1.Controls.Add(this.radioButton4, 0, 4); this.tableLayoutPanel1.Controls.Add(this.radioButton3, 0, 3); this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0); this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 3); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.RowCount = 8; this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 5.9994F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 13.42866F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 13.42866F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 13.42866F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 13.42866F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 13.42866F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 13.42866F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 13.42866F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.tableLayoutPanel1.Size = new System.Drawing.Size(124, 462); this.tableLayoutPanel1.TabIndex = 8; // // label1 // this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.label1.AutoSize = true; this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label1.Location = new System.Drawing.Point(4, 1); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(116, 27); this.label1.TabIndex = 8; this.label1.Text = "Ingrédients:"; // // CtrlIngredientSelect // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.tableLayoutPanel1); this.Name = "CtrlIngredientSelect"; this.Size = new System.Drawing.Size(134, 476); this.tableLayoutPanel1.ResumeLayout(false); this.tableLayoutPanel1.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); }
/// <summary> /// This method is required for Windows Forms designer support. /// Do not change the method contents inside the source code editor. The Forms designer might /// not be able to load this method if it was changed manually. /// </summary> private void InitializeComponent() { this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.lblValue2 = new CtrlLabel(); this.lblValue1 = new CtrlLabel(); this.lblTitle2 = new CtrlLabel(); this.lblTitle1 = new CtrlLabel(); this.tableLayoutPanel1.SuspendLayout(); this.SuspendLayout(); // // tableLayoutPanel1 // this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.tableLayoutPanel1.ColumnCount = 2; this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); this.tableLayoutPanel1.Controls.Add(this.lblValue2, 1, 1); this.tableLayoutPanel1.Controls.Add(this.lblValue1, 1, 0); this.tableLayoutPanel1.Controls.Add(this.lblTitle2, 0, 1); this.tableLayoutPanel1.Controls.Add(this.lblTitle1, 0, 0); this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 3); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.RowCount = 2; this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); this.tableLayoutPanel1.Size = new System.Drawing.Size(291, 99); this.tableLayoutPanel1.TabIndex = 12; // // lblValue2 // this.lblValue2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.lblValue2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.lblValue2.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblValue2.Location = new System.Drawing.Point(148, 52); this.lblValue2.Margin = new System.Windows.Forms.Padding(3); this.lblValue2.Name = "lblValue2"; this.lblValue2.Size = new System.Drawing.Size(140, 44); this.lblValue2.TabIndex = 13; this.lblValue2.Text = "9999 KG"; this.lblValue2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // lblValue1 // this.lblValue1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.lblValue1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.lblValue1.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblValue1.Location = new System.Drawing.Point(148, 3); this.lblValue1.Margin = new System.Windows.Forms.Padding(3); this.lblValue1.Name = "lblValue1"; this.lblValue1.Size = new System.Drawing.Size(140, 43); this.lblValue1.TabIndex = 13; this.lblValue1.Text = "9999 KG"; this.lblValue1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // lblTitle2 // this.lblTitle2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.lblTitle2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.lblTitle2.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblTitle2.Location = new System.Drawing.Point(3, 52); this.lblTitle2.Margin = new System.Windows.Forms.Padding(3); this.lblTitle2.Name = "lblTitle2"; this.lblTitle2.Size = new System.Drawing.Size(139, 44); this.lblTitle2.TabIndex = 3; this.lblTitle2.Text = "Balance:"; this.lblTitle2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // lblTitle1 // this.lblTitle1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.lblTitle1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.lblTitle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblTitle1.Location = new System.Drawing.Point(3, 3); this.lblTitle1.Margin = new System.Windows.Forms.Padding(3); this.lblTitle1.Name = "lblTitle1"; this.lblTitle1.Size = new System.Drawing.Size(139, 43); this.lblTitle1.TabIndex = 1; this.lblTitle1.Text = "Cible:"; this.lblTitle1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // Ctrl2ValuesDisplay // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.tableLayoutPanel1); this.Name = "Ctrl2ValuesDisplay"; this.Size = new System.Drawing.Size(297, 105); this.tableLayoutPanel1.ResumeLayout(false); this.ResumeLayout(false); }