kulpot / STUDY.VS2022.CSharp.HeroMaker

C# avatar maker app 01 How to use checkboxes tutorial
1 stars 0 forks source link

C# Chess Board 10 gui controls #10

Open kulpot opened 8 months ago

kulpot commented 8 months ago

############################# Form1.Designer.cs #################################

namespace C__Chess_Board_10 { partial class Form1 { ///

/// Required designer variable. /// private System.ComponentModel.IContainer components = null;

    /// <summary>
    /// Clean up any resources being used.
    /// </summary>
    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
    protected override void Dispose(bool disposing)
    {
        if (disposing && (components != null))
        {
            components.Dispose();
        }
        base.Dispose(disposing);
    }

    #region Windows Form Designer generated code

    /// <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.comboBox1 = new System.Windows.Forms.ComboBox();
        this.panel1 = new System.Windows.Forms.Panel();
        this.SuspendLayout();
        // 
        // label1
        // 
        this.label1.AutoSize = true;
        this.label1.Location = new System.Drawing.Point(12, 9);
        this.label1.Name = "label1";
        this.label1.Size = new System.Drawing.Size(441, 13);
        this.label1.TabIndex = 0;
        this.label1.Text = "Select a piece from the drop down menu and click any square i will show you all l" +
"egal moves";
        // 
        // comboBox1
        // 
        this.comboBox1.FormattingEnabled = true;
        this.comboBox1.Items.AddRange(new object[] {
        "Bishop",
        "Rook",
        "Knight",
        "King",
        "Queen",
        "Pawn"});
        this.comboBox1.Location = new System.Drawing.Point(461, 1);
        this.comboBox1.Name = "comboBox1";
        this.comboBox1.Size = new System.Drawing.Size(121, 21);
        this.comboBox1.TabIndex = 1;
        // 
        // panel1
        // 
        this.panel1.Location = new System.Drawing.Point(15, 25);
        this.panel1.Name = "panel1";
        this.panel1.Size = new System.Drawing.Size(500, 500);
        this.panel1.TabIndex = 2;
        // 
        // Form1
        // 
        this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
        this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
        this.ClientSize = new System.Drawing.Size(594, 531);
        this.Controls.Add(this.panel1);
        this.Controls.Add(this.comboBox1);
        this.Controls.Add(this.label1);
        this.Name = "Form1";
        this.Text = "Chess Piece Moves";
        this.ResumeLayout(false);
        this.PerformLayout();

    }

    #endregion

    private System.Windows.Forms.Label label1;
    private System.Windows.Forms.ComboBox comboBox1;
    private System.Windows.Forms.Panel panel1;
}

}

############################# Form1.cs ########################################

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms;

//--------------------------- C# Chess Board 10 gui controls ------------------------------------------------- //ref link:https://www.youtube.com/watch?v=cTNtnS6BSN0&list=PLhPyEFL5u-i0YDRW6FLMd1PavZp9RcYdF&index=10&t=1s

// add label(Prop:Text:Select a piece from the drop down menu.....), comboBox(Prop:items->...->Bishop/Rook...), Panel(Prop:SizeWidth500Height500),Form1(Prop:Text:Chess Piece Moves)

namespace C__Chess_Board_10 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } } }