Don't wanna be here? Send us removal request.
Text
Form1.Designer.cs
namespace Project1 { partial class Form1 { /// <summary> /// Required designer variable. /// </summary> 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() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); this.panel1 = new System.Windows.Forms.Panel(); this.lblTime = new System.Windows.Forms.Label(); this.lblStaticTime = new System.Windows.Forms.Label(); this.lblNumGuess = new System.Windows.Forms.Label(); this.lblStaticNumGuess = new System.Windows.Forms.Label(); this.card_3_6 = new System.Windows.Forms.Button(); this.card_3_5 = new System.Windows.Forms.Button(); this.card_3_7 = new System.Windows.Forms.Button(); this.card_3_4 = new System.Windows.Forms.Button(); this.card_3_3 = new System.Windows.Forms.Button(); this.card_3_2 = new System.Windows.Forms.Button(); this.card_3_1 = new System.Windows.Forms.Button(); this.card_3_0 = new System.Windows.Forms.Button(); this.card_2_6 = new System.Windows.Forms.Button(); this.card_2_5 = new System.Windows.Forms.Button(); this.card_2_7 = new System.Windows.Forms.Button(); this.card_2_4 = new System.Windows.Forms.Button(); this.card_2_3 = new System.Windows.Forms.Button(); this.card_2_2 = new System.Windows.Forms.Button(); this.card_2_1 = new System.Windows.Forms.Button(); this.card_2_0 = new System.Windows.Forms.Button(); this.card_1_6 = new System.Windows.Forms.Button(); this.card_1_5 = new System.Windows.Forms.Button(); this.card_1_7 = new System.Windows.Forms.Button(); this.card_1_4 = new System.Windows.Forms.Button(); this.card_1_3 = new System.Windows.Forms.Button(); this.card_1_2 = new System.Windows.Forms.Button(); this.card_1_1 = new System.Windows.Forms.Button(); this.card_1_0 = new System.Windows.Forms.Button(); this.card_0_6 = new System.Windows.Forms.Button(); this.card_0_5 = new System.Windows.Forms.Button(); this.card_0_7 = new System.Windows.Forms.Button(); this.card_0_4 = new System.Windows.Forms.Button(); this.card_0_3 = new System.Windows.Forms.Button(); this.card_0_2 = new System.Windows.Forms.Button(); this.card_0_1 = new System.Windows.Forms.Button(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.card_0_0 = new System.Windows.Forms.Button(); this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // // panel1 // this.panel1.BackColor = System.Drawing.Color.Black; this.panel1.Controls.Add(this.lblTime); this.panel1.Controls.Add(this.lblStaticTime); this.panel1.Controls.Add(this.lblNumGuess); this.panel1.Controls.Add(this.lblStaticNumGuess); this.panel1.Location = new System.Drawing.Point(-3, 644); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(931, 66); this.panel1.TabIndex = 2; // // lblTime // this.lblTime.AutoSize = true; this.lblTime.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblTime.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); this.lblTime.Location = new System.Drawing.Point(712, 18); this.lblTime.Name = "lblTime"; this.lblTime.Size = new System.Drawing.Size(0, 24); this.lblTime.TabIndex = 3; // // lblStaticTime // this.lblStaticTime.AutoSize = true; this.lblStaticTime.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblStaticTime.ForeColor = System.Drawing.Color.White; this.lblStaticTime.Location = new System.Drawing.Point(523, 18); this.lblStaticTime.Name = "lblStaticTime"; this.lblStaticTime.Size = new System.Drawing.Size(84, 24); this.lblStaticTime.TabIndex = 2; this.lblStaticTime.Text = "Time (s):"; // // lblNumGuess // this.lblNumGuess.AutoSize = true; this.lblNumGuess.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblNumGuess.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); this.lblNumGuess.Location = new System.Drawing.Point(215, 18); this.lblNumGuess.Name = "lblNumGuess"; this.lblNumGuess.Size = new System.Drawing.Size(0, 24); this.lblNumGuess.TabIndex = 1; // // lblStaticNumGuess // this.lblStaticNumGuess.AutoSize = true; this.lblStaticNumGuess.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblStaticNumGuess.ForeColor = System.Drawing.Color.White; this.lblStaticNumGuess.Location = new System.Drawing.Point(26, 18); this.lblStaticNumGuess.Name = "lblStaticNumGuess"; this.lblStaticNumGuess.Size = new System.Drawing.Size(183, 24); this.lblStaticNumGuess.TabIndex = 0; this.lblStaticNumGuess.Text = "Number of Guesses:"; // // card_3_6 // this.card_3_6.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("card_3_6.BackgroundImage"))); this.card_3_6.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.card_3_6.Location = new System.Drawing.Point(685, 509); this.card_3_6.Name = "card_3_6"; this.card_3_6.Size = new System.Drawing.Size(90, 100); this.card_3_6.TabIndex = 33; this.card_3_6.Text = " "; this.card_3_6.UseVisualStyleBackColor = true; this.card_3_6.Click += new System.EventHandler(this.card_Click); // // card_3_5 // this.card_3_5.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("card_3_5.BackgroundImage"))); this.card_3_5.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.card_3_5.Location = new System.Drawing.Point(578, 509); this.card_3_5.Name = "card_3_5"; this.card_3_5.Size = new System.Drawing.Size(90, 100); this.card_3_5.TabIndex = 31; this.card_3_5.Text = " "; this.card_3_5.UseVisualStyleBackColor = true; this.card_3_5.Click += new System.EventHandler(this.card_Click); // // card_3_7 // this.card_3_7.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("card_3_7.BackgroundImage"))); this.card_3_7.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.card_3_7.Location = new System.Drawing.Point(792, 509); this.card_3_7.Name = "card_3_7"; this.card_3_7.Size = new System.Drawing.Size(90, 100); this.card_3_7.TabIndex = 32; this.card_3_7.Text = " "; this.card_3_7.UseVisualStyleBackColor = true; this.card_3_7.Click += new System.EventHandler(this.card_Click); // // card_3_4 // this.card_3_4.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("card_3_4.BackgroundImage"))); this.card_3_4.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.card_3_4.Location = new System.Drawing.Point(471, 509); this.card_3_4.Name = "card_3_4"; this.card_3_4.Size = new System.Drawing.Size(90, 100); this.card_3_4.TabIndex = 30; this.card_3_4.Text = " "; this.card_3_4.UseVisualStyleBackColor = true; this.card_3_4.Click += new System.EventHandler(this.card_Click); // // card_3_3 // this.card_3_3.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("card_3_3.BackgroundImage"))); this.card_3_3.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.card_3_3.Location = new System.Drawing.Point(364, 509); this.card_3_3.Name = "card_3_3"; this.card_3_3.Size = new System.Drawing.Size(90, 100); this.card_3_3.TabIndex = 29; this.card_3_3.Text = " "; this.card_3_3.UseVisualStyleBackColor = true; this.card_3_3.Click += new System.EventHandler(this.card_Click); // // card_3_2 // this.card_3_2.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("card_3_2.BackgroundImage"))); this.card_3_2.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.card_3_2.Location = new System.Drawing.Point(257, 509); this.card_3_2.Name = "card_3_2"; this.card_3_2.Size = new System.Drawing.Size(90, 100); this.card_3_2.TabIndex = 28; this.card_3_2.Text = " "; this.card_3_2.UseVisualStyleBackColor = true; this.card_3_2.Click += new System.EventHandler(this.card_Click); // // card_3_1 // this.card_3_1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("card_3_1.BackgroundImage"))); this.card_3_1.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.card_3_1.Location = new System.Drawing.Point(150, 509); this.card_3_1.Name = "card_3_1"; this.card_3_1.Size = new System.Drawing.Size(90, 100); this.card_3_1.TabIndex = 27; this.card_3_1.Text = " "; this.card_3_1.UseVisualStyleBackColor = true; this.card_3_1.Click += new System.EventHandler(this.card_Click); // // card_3_0 // this.card_3_0.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("card_3_0.BackgroundImage"))); this.card_3_0.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.card_3_0.Location = new System.Drawing.Point(43, 509); this.card_3_0.Name = "card_3_0"; this.card_3_0.Size = new System.Drawing.Size(90, 100); this.card_3_0.TabIndex = 26; this.card_3_0.Text = " "; this.card_3_0.UseVisualStyleBackColor = true; this.card_3_0.Click += new System.EventHandler(this.card_Click); // // card_2_6 // this.card_2_6.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("card_2_6.BackgroundImage"))); this.card_2_6.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.card_2_6.Location = new System.Drawing.Point(685, 393); this.card_2_6.Name = "card_2_6"; this.card_2_6.Size = new System.Drawing.Size(90, 100); this.card_2_6.TabIndex = 25; this.card_2_6.Text = " "; this.card_2_6.UseVisualStyleBackColor = true; this.card_2_6.Click += new System.EventHandler(this.card_Click); // // card_2_5 // this.card_2_5.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("card_2_5.BackgroundImage"))); this.card_2_5.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.card_2_5.Location = new System.Drawing.Point(578, 393); this.card_2_5.Name = "card_2_5"; this.card_2_5.Size = new System.Drawing.Size(90, 100); this.card_2_5.TabIndex = 23; this.card_2_5.Text = " "; this.card_2_5.UseVisualStyleBackColor = true; this.card_2_5.Click += new System.EventHandler(this.card_Click); // // card_2_7 // this.card_2_7.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("card_2_7.BackgroundImage"))); this.card_2_7.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.card_2_7.Location = new System.Drawing.Point(792, 393); this.card_2_7.Name = "card_2_7"; this.card_2_7.Size = new System.Drawing.Size(90, 100); this.card_2_7.TabIndex = 24; this.card_2_7.Text = " "; this.card_2_7.UseVisualStyleBackColor = true; this.card_2_7.Click += new System.EventHandler(this.card_Click); // // card_2_4 // this.card_2_4.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("card_2_4.BackgroundImage"))); this.card_2_4.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.card_2_4.Location = new System.Drawing.Point(471, 393); this.card_2_4.Name = "card_2_4"; this.card_2_4.Size = new System.Drawing.Size(90, 100); this.card_2_4.TabIndex = 22; this.card_2_4.Text = " "; this.card_2_4.UseVisualStyleBackColor = true; this.card_2_4.Click += new System.EventHandler(this.card_Click); // // card_2_3 // this.card_2_3.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("card_2_3.BackgroundImage"))); this.card_2_3.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.card_2_3.Location = new System.Drawing.Point(364, 393); this.card_2_3.Name = "card_2_3"; this.card_2_3.Size = new System.Drawing.Size(90, 100); this.card_2_3.TabIndex = 21; this.card_2_3.Text = " "; this.card_2_3.UseVisualStyleBackColor = true; this.card_2_3.Click += new System.EventHandler(this.card_Click); // // card_2_2 // this.card_2_2.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("card_2_2.BackgroundImage"))); this.card_2_2.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.card_2_2.Location = new System.Drawing.Point(257, 393); this.card_2_2.Name = "card_2_2"; this.card_2_2.Size = new System.Drawing.Size(90, 100); this.card_2_2.TabIndex = 20; this.card_2_2.Text = " "; this.card_2_2.UseVisualStyleBackColor = true; this.card_2_2.Click += new System.EventHandler(this.card_Click); // // card_2_1 // this.card_2_1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("card_2_1.BackgroundImage"))); this.card_2_1.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.card_2_1.Location = new System.Drawing.Point(150, 393); this.card_2_1.Name = "card_2_1"; this.card_2_1.Size = new System.Drawing.Size(90, 100); this.card_2_1.TabIndex = 19; this.card_2_1.Text = " "; this.card_2_1.UseVisualStyleBackColor = true; this.card_2_1.Click += new System.EventHandler(this.card_Click); // // card_2_0 // this.card_2_0.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("card_2_0.BackgroundImage"))); this.card_2_0.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.card_2_0.Location = new System.Drawing.Point(43, 393); this.card_2_0.Name = "card_2_0"; this.card_2_0.Size = new System.Drawing.Size(90, 100); this.card_2_0.TabIndex = 18; this.card_2_0.Text = " "; this.card_2_0.UseVisualStyleBackColor = true; this.card_2_0.Click += new System.EventHandler(this.card_Click); // // card_1_6 // this.card_1_6.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("card_1_6.BackgroundImage"))); this.card_1_6.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.card_1_6.Location = new System.Drawing.Point(685, 277); this.card_1_6.Name = "card_1_6"; this.card_1_6.Size = new System.Drawing.Size(90, 100); this.card_1_6.TabIndex = 17; this.card_1_6.Text = " "; this.card_1_6.UseVisualStyleBackColor = true; this.card_1_6.Click += new System.EventHandler(this.card_Click); // // card_1_5 // this.card_1_5.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("card_1_5.BackgroundImage"))); this.card_1_5.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.card_1_5.Location = new System.Drawing.Point(578, 277); this.card_1_5.Name = "card_1_5"; this.card_1_5.Size = new System.Drawing.Size(90, 100); this.card_1_5.TabIndex = 15; this.card_1_5.Text = " "; this.card_1_5.UseVisualStyleBackColor = true; this.card_1_5.Click += new System.EventHandler(this.card_Click); // // card_1_7 // this.card_1_7.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("card_1_7.BackgroundImage"))); this.card_1_7.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.card_1_7.Location = new System.Drawing.Point(792, 277); this.card_1_7.Name = "card_1_7"; this.card_1_7.Size = new System.Drawing.Size(90, 100); this.card_1_7.TabIndex = 16; this.card_1_7.Text = " "; this.card_1_7.UseVisualStyleBackColor = true; this.card_1_7.Click += new System.EventHandler(this.card_Click); // // card_1_4 // this.card_1_4.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("card_1_4.BackgroundImage"))); this.card_1_4.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.card_1_4.Location = new System.Drawing.Point(471, 277); this.card_1_4.Name = "card_1_4"; this.card_1_4.Size = new System.Drawing.Size(90, 100); this.card_1_4.TabIndex = 14; this.card_1_4.Text = " "; this.card_1_4.UseVisualStyleBackColor = true; this.card_1_4.Click += new System.EventHandler(this.card_Click); // // card_1_3 // this.card_1_3.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("card_1_3.BackgroundImage"))); this.card_1_3.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.card_1_3.Location = new System.Drawing.Point(364, 277); this.card_1_3.Name = "card_1_3"; this.card_1_3.Size = new System.Drawing.Size(90, 100); this.card_1_3.TabIndex = 13; this.card_1_3.Text = " "; this.card_1_3.UseVisualStyleBackColor = true; this.card_1_3.Click += new System.EventHandler(this.card_Click); // // card_1_2 // this.card_1_2.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("card_1_2.BackgroundImage"))); this.card_1_2.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.card_1_2.Location = new System.Drawing.Point(257, 277); this.card_1_2.Name = "card_1_2"; this.card_1_2.Size = new System.Drawing.Size(90, 100); this.card_1_2.TabIndex = 12; this.card_1_2.Text = " "; this.card_1_2.UseVisualStyleBackColor = true; this.card_1_2.Click += new System.EventHandler(this.card_Click); // // card_1_1 // this.card_1_1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("card_1_1.BackgroundImage"))); this.card_1_1.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.card_1_1.Location = new System.Drawing.Point(150, 277); this.card_1_1.Name = "card_1_1"; this.card_1_1.Size = new System.Drawing.Size(90, 100); this.card_1_1.TabIndex = 11; this.card_1_1.Text = " "; this.card_1_1.UseVisualStyleBackColor = true; this.card_1_1.Click += new System.EventHandler(this.card_Click); // // card_1_0 // this.card_1_0.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("card_1_0.BackgroundImage"))); this.card_1_0.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.card_1_0.Location = new System.Drawing.Point(43, 277); this.card_1_0.Name = "card_1_0"; this.card_1_0.Size = new System.Drawing.Size(90, 100); this.card_1_0.TabIndex = 10; this.card_1_0.Text = " "; this.card_1_0.UseVisualStyleBackColor = true; this.card_1_0.Click += new System.EventHandler(this.card_Click); // // card_0_6 // this.card_0_6.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("card_0_6.BackgroundImage"))); this.card_0_6.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.card_0_6.Location = new System.Drawing.Point(685, 161); this.card_0_6.Name = "card_0_6"; this.card_0_6.Size = new System.Drawing.Size(90, 100); this.card_0_6.TabIndex = 9; this.card_0_6.Text = " "; this.card_0_6.UseVisualStyleBackColor = true; this.card_0_6.Click += new System.EventHandler(this.card_Click); // // card_0_5 // this.card_0_5.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("card_0_5.BackgroundImage"))); this.card_0_5.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.card_0_5.Location = new System.Drawing.Point(578, 161); this.card_0_5.Name = "card_0_5"; this.card_0_5.Size = new System.Drawing.Size(90, 100); this.card_0_5.TabIndex = 8; this.card_0_5.Text = " "; this.card_0_5.UseVisualStyleBackColor = true; this.card_0_5.Click += new System.EventHandler(this.card_Click); // // card_0_7 // this.card_0_7.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("card_0_7.BackgroundImage"))); this.card_0_7.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.card_0_7.Location = new System.Drawing.Point(792, 161); this.card_0_7.Name = "card_0_7"; this.card_0_7.Size = new System.Drawing.Size(90, 100); this.card_0_7.TabIndex = 8; this.card_0_7.Text = " "; this.card_0_7.UseVisualStyleBackColor = true; this.card_0_7.Click += new System.EventHandler(this.card_Click); // // card_0_4 // this.card_0_4.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("card_0_4.BackgroundImage"))); this.card_0_4.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.card_0_4.Location = new System.Drawing.Point(471, 161); this.card_0_4.Name = "card_0_4"; this.card_0_4.Size = new System.Drawing.Size(90, 100); this.card_0_4.TabIndex = 7; this.card_0_4.Text = " "; this.card_0_4.UseVisualStyleBackColor = true; this.card_0_4.Click += new System.EventHandler(this.card_Click); // // card_0_3 // this.card_0_3.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("card_0_3.BackgroundImage"))); this.card_0_3.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.card_0_3.Location = new System.Drawing.Point(364, 161); this.card_0_3.Name = "card_0_3"; this.card_0_3.Size = new System.Drawing.Size(90, 100); this.card_0_3.TabIndex = 6; this.card_0_3.Text = " "; this.card_0_3.UseVisualStyleBackColor = true; this.card_0_3.Click += new System.EventHandler(this.card_Click); // // card_0_2 // this.card_0_2.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("card_0_2.BackgroundImage"))); this.card_0_2.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.card_0_2.Location = new System.Drawing.Point(257, 161); this.card_0_2.Name = "card_0_2"; this.card_0_2.Size = new System.Drawing.Size(90, 100); this.card_0_2.TabIndex = 5; this.card_0_2.Text = " "; this.card_0_2.UseVisualStyleBackColor = true; this.card_0_2.Click += new System.EventHandler(this.card_Click); // // card_0_1 // this.card_0_1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("card_0_1.BackgroundImage"))); this.card_0_1.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.card_0_1.Location = new System.Drawing.Point(150, 161); this.card_0_1.Name = "card_0_1"; this.card_0_1.Size = new System.Drawing.Size(90, 100); this.card_0_1.TabIndex = 4; this.card_0_1.Text = " "; this.card_0_1.UseVisualStyleBackColor = true; this.card_0_1.Click += new System.EventHandler(this.card_Click); // // pictureBox1 // this.pictureBox1.BackgroundImage = global::Project1.Properties.Resources.memory; this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.pictureBox1.Location = new System.Drawing.Point(208, 12); this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Size = new System.Drawing.Size(495, 125); this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.pictureBox1.TabIndex = 3; this.pictureBox1.TabStop = false; // // card_0_0 // this.card_0_0.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("card_0_0.BackgroundImage"))); this.card_0_0.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.card_0_0.Location = new System.Drawing.Point(43, 161); this.card_0_0.Name = "card_0_0"; this.card_0_0.Size = new System.Drawing.Size(90, 100); this.card_0_0.TabIndex = 0; this.card_0_0.Text = " "; this.card_0_0.UseVisualStyleBackColor = true; this.card_0_0.Click += new System.EventHandler(this.card_Click); // // Form1 // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.ClientSize = new System.Drawing.Size(925, 705); this.Controls.Add(this.card_3_6); this.Controls.Add(this.card_3_5); this.Controls.Add(this.card_3_7); this.Controls.Add(this.card_3_4); this.Controls.Add(this.card_3_3); this.Controls.Add(this.card_3_2); this.Controls.Add(this.card_3_1); this.Controls.Add(this.card_3_0); this.Controls.Add(this.card_2_6); this.Controls.Add(this.card_2_5); this.Controls.Add(this.card_2_7); this.Controls.Add(this.card_2_4); this.Controls.Add(this.card_2_3); this.Controls.Add(this.card_2_2); this.Controls.Add(this.card_2_1); this.Controls.Add(this.card_2_0); this.Controls.Add(this.card_1_6); this.Controls.Add(this.card_1_5); this.Controls.Add(this.card_1_7); this.Controls.Add(this.card_1_4); this.Controls.Add(this.card_1_3); this.Controls.Add(this.card_1_2); this.Controls.Add(this.card_1_1); this.Controls.Add(this.card_1_0); this.Controls.Add(this.card_0_6); this.Controls.Add(this.card_0_5); this.Controls.Add(this.card_0_7); this.Controls.Add(this.card_0_4); this.Controls.Add(this.card_0_3); this.Controls.Add(this.card_0_2); this.Controls.Add(this.card_0_1); this.Controls.Add(this.pictureBox1); this.Controls.Add(this.panel1); this.Controls.Add(this.card_0_0); this.Name = "Form1"; this.Text = "Form1"; this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button card_0_0; private System.Windows.Forms.Panel panel1; private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.Button card_0_1; private System.Windows.Forms.Button card_0_2; private System.Windows.Forms.Button card_0_3; private System.Windows.Forms.Button card_0_4; private System.Windows.Forms.Button card_0_7; private System.Windows.Forms.Button card_0_5; private System.Windows.Forms.Button card_0_6; private System.Windows.Forms.Button card_1_6; private System.Windows.Forms.Button card_1_5; private System.Windows.Forms.Button card_1_7; private System.Windows.Forms.Button card_1_4; private System.Windows.Forms.Button card_1_3; private System.Windows.Forms.Button card_1_2; private System.Windows.Forms.Button card_1_1; private System.Windows.Forms.Button card_1_0; private System.Windows.Forms.Button card_2_6; private System.Windows.Forms.Button card_2_5; private System.Windows.Forms.Button card_2_7; private System.Windows.Forms.Button card_2_4; private System.Windows.Forms.Button card_2_3; private System.Windows.Forms.Button card_2_2; private System.Windows.Forms.Button card_2_1; private System.Windows.Forms.Button card_2_0; private System.Windows.Forms.Button card_3_6; private System.Windows.Forms.Button card_3_5; private System.Windows.Forms.Button card_3_7; private System.Windows.Forms.Button card_3_4; private System.Windows.Forms.Button card_3_3; private System.Windows.Forms.Button card_3_2; private System.Windows.Forms.Button card_3_1; private System.Windows.Forms.Button card_3_0; private System.Windows.Forms.Label lblTime; private System.Windows.Forms.Label lblStaticTime; private System.Windows.Forms.Label lblNumGuess; private System.Windows.Forms.Label lblStaticNumGuess; } }
0 notes
Text
Program.cs
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using System.Windows.Forms;
namespace Project1 { static class Program { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); } } }
0 notes
Text
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;
namespace Project1 { public partial class Form1 : Form { // Attributes private Button[,] memoryCards; // array of buttons that will act as our memory cards private MemoryGame mg; // instance of the memorygame (you define) private Image imageHolder; // this will hold our image to swap back in and out of our card backs being set to null private string FirstClick; // this variable is used to make sure the 2nd click of something came from a different card
// constructor public Form1() { InitializeComponent(); // this takes the design elements
// reference the buttons we made on the design to an array so we can act on them in row/column fashion (as opposed to their name only) memoryCards = new Button[,] { { this.card_0_0, this.card_0_1, this.card_0_2, this.card_0_3, this.card_0_4, this.card_0_5, this.card_0_6, this.card_0_7 }, { this.card_1_0, this.card_1_1, this.card_1_2, this.card_1_3, this.card_1_4, this.card_1_5, this.card_1_6, this.card_1_7 }, { this.card_2_0, this.card_2_1, this.card_2_2, this.card_2_3, this.card_2_4, this.card_2_5, this.card_2_6, this.card_2_7 }, { this.card_3_0, this.card_3_1, this.card_3_2, this.card_3_3, this.card_3_4, this.card_3_5, this.card_3_6, this.card_3_7 } };
// create an instance of our memory game class and pass the number of rows and columns to it mg = new MemoryGame(4, 8);
// initialize our imageHolder variable imageHolder = memoryCards[0, 0].BackgroundImage;
// initialize the firstclick variable we use to detect double clicks of the same button FirstClick = "";
}
// as I described in class we are looking to handle the same event for every button. options are to either write 32 of the same // function OR write one function that handles all 32. I decided to go with the latter. private void card_Click(object sender, EventArgs e) { // trying to get the row/column (or i/j) of the card to pass to the gamestate object (mg) so we'll loop until we find the name for (int i = 0; i < mg.NumRows; i++) { for (int j = 0; j < mg.NumColumns; j++) {
// check the name and make sure we don't click the same button twice. we want 2 differnt i/js for pickOne and pickTwo if (memoryCards[i, j].Name.Equals(((Button)sender).Name) && !FirstClick.Equals(((Button)sender).Name)) {
// so i == row, j == column of card clicked // two scenarios - first card clicked or 2nd card clicked // first card if (mg.CurrentClickCount == 0) { // if there has been at least one set of guesses made on the previous turn if (mg.NumGuesses > 0) { // if we had a match, remove them from the board if (mg.matchMade() == true) { memoryCards[mg.PickOne[0], mg.PickOne[1]].Visible = false; memoryCards[mg.PickTwo[0], mg.PickTwo[1]].Visible = false;
} else { // no match - return their cool card borders to hide their content // clear previous showings memoryCards[mg.PickOne[0], mg.PickOne[1]].BackgroundImage = imageHolder; memoryCards[mg.PickOne[0], mg.PickOne[1]].Text = null;
memoryCards[mg.PickTwo[0], mg.PickTwo[1]].BackgroundImage = imageHolder; memoryCards[mg.PickTwo[0], mg.PickTwo[1]].Text = null; }
} else { // Start the game // this basically fires when the very first card of the game is clicked mg.StartTime(); }
// show the card value and hide the background memoryCards[i, j].Text = mg.GetCardValue(i, j); memoryCards[i, j].BackgroundImage = null;
// set the PickOne values mg.PickOne[0] = i; mg.PickOne[1] = j;
// save the name of the button we clicked so we can make sure we don't double click it for comparisons FirstClick = ((Button)sender).Name;
// increase the click count so we know what step of the 2-card pick process we are at mg.CurrentClickCount++; } else { // 2nd card turned over memoryCards[i, j].Text = mg.GetCardValue(i, j); memoryCards[i, j].BackgroundImage = null;
// set the PickTwo values mg.PickTwo[0] = i; mg.PickTwo[1] = j;
// add to the number of guesses (a guess is a 2-card click combination) mg.NumGuesses++;
// update the guess count and time at the bottom lblNumGuess.Text = mg.NumGuesses.ToString(); lblTime.Text = (mg.GetTime()).ToString();
// check to see if the game is won/finished if (mg.GameWon() == true) { // game won MessageBox.Show("Game is Finished!\n" + "It took: " + lblTime.Text + " seconds and " + mg.NumGuesses + " number of guesses");
}
// reset the card checks and click count FirstClick = ""; mg.CurrentClickCount = 0;
} } } } } } }
0 notes
Text
MemoryGame.cs
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Diagnostics;
namespace Project1 { class MemoryGame {
// Attributes private int numGuesses; // hold the number of guesses someone has made private Stopwatch sw; // used to start/stop/reset and get how long the game has been running private int currentClickCount; // used to figure out what part in the 2 card click cycle you are at private string[,] cardValues; // 2-dimentional (4 row x 8 column) array to hold the text values we are matching private int numRows; // variable to use instead of (4) private int numColumns; // variable to use instead of (8) private int numMatches; // our match count - in a game with 32 cards when you hit 16 matches you are done
private int[] pickOne; // array to hold the row + column value of the first card private int[] pickTwo; // array to hold the row + column value of the second card
// Constructor public MemoryGame(int nR, int nC) { // set the numRows and numColums variables
// give some memory to our pickOne and pickTwo arrays
// give some memory to our cardvalues array
// give some memory to our stopwatch instance
// Initialize everything resetGame(); }
// Create Properties for: //------------------------ // CurrentClickCount // NumGuesses // NumRows // NumColumns // PickOne // PickTwo
// Create a function that starts the stopwatch public void StartTime() {
}
// Create a function that retrieves the stopwatch's current value public decimal GetTime() {
}
// Create a function that returns the value of the card public string GetCardValue(int r, int c) {
}
// checks the card values of the two picks, returns true if they are the same, false otherwise public bool matchMade() {
}
// similar to matchMade() - this checks the card values of the two picks and increases the numMatches count if they are the same // also returns true/false if the game is finished or not public bool GameWon() {
}
// reset the game back to it's default states public void resetGame() { // initialize guesses
// reset the picks to an invalid value
// create a random object to generate a random number Random r = new Random(); // create a list of characters to choose from for our match game string allChoices = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "0123456789" + "!@#$%^*()";
// create an array of characters to hold all of the needed cards char[] guessPool;
// give guessPool some memory
// create a temporary character to hold the current selection
// generate all 32 characters (16 pairs of characters)
// Get one random character and then place it in the next slot too // Ex: if we are looking to fill 32 cards then we need 16 random character // we don't want any duplicates so keep trying to find a character that hasn't been picked before // HINT: look to use something like Array.IndexOf
// Once you find an unused character double it up
// Take the array we have and randomize the letters in it // HINT - call the ShuffleStuff function below
// assign our cardValues array values from our now valid list of characters (guessPool)
// reset the stopwatch
}
// Utility function to shuffle cards public static void ShuffleStuff(char[] array) { System.Random random = new System.Random(); for (int i = 0; i < array.Length; i++) { int j = random.Next(i, array.Length); // Don't select from the entire array on subsequent loops char temp = array[i]; array[i] = array[j]; array[j] = temp; } }
} }
0 notes