Click here to Skip to main content
15,891,136 members
Articles / Programming Languages / C# 4.0

Lock Puzzle: A Perplexing Puzzle

Rate me:
Please Sign up or sign in to vote.
4.68/5 (26 votes)
22 Jun 2010CPOL3 min read 34K   840   31  
A brain melting puzzle in which you must turn several interconnected keys to unlock the solution
namespace LockProblemCS
{
    partial class frmLockPuzzle
    {
        /// <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()
        {
            this.components = new System.ComponentModel.Container();
            this.btnScramble = new System.Windows.Forms.Button();
            this.panel1 = new System.Windows.Forms.Panel();
            this.L44 = new LockProblemCS.Key();
            this.L34 = new LockProblemCS.Key();
            this.L24 = new LockProblemCS.Key();
            this.L14 = new LockProblemCS.Key();
            this.L43 = new LockProblemCS.Key();
            this.L33 = new LockProblemCS.Key();
            this.L23 = new LockProblemCS.Key();
            this.L13 = new LockProblemCS.Key();
            this.L42 = new LockProblemCS.Key();
            this.L32 = new LockProblemCS.Key();
            this.L22 = new LockProblemCS.Key();
            this.L12 = new LockProblemCS.Key();
            this.L41 = new LockProblemCS.Key();
            this.L31 = new LockProblemCS.Key();
            this.L21 = new LockProblemCS.Key();
            this.L11 = new LockProblemCS.Key();
            this.lblMoves = new System.Windows.Forms.Label();
            this.tmrIdle = new System.Windows.Forms.Timer(this.components);
            this.menuStrip1 = new System.Windows.Forms.MenuStrip();
            this.mnuAbout = new System.Windows.Forms.ToolStripMenuItem();
            this.panel1.SuspendLayout();
            this.menuStrip1.SuspendLayout();
            this.SuspendLayout();
            // 
            // btnScramble
            // 
            this.btnScramble.BackColor = System.Drawing.Color.Black;
            this.btnScramble.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.btnScramble.ForeColor = System.Drawing.Color.White;
            this.btnScramble.Location = new System.Drawing.Point(217, 317);
            this.btnScramble.Name = "btnScramble";
            this.btnScramble.Size = new System.Drawing.Size(75, 23);
            this.btnScramble.TabIndex = 1;
            this.btnScramble.Text = "Scramble";
            this.btnScramble.UseVisualStyleBackColor = false;
            this.btnScramble.Click += new System.EventHandler(this.btnScramble_Click);
            // 
            // panel1
            // 
            this.panel1.BackColor = System.Drawing.Color.Black;
            this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.panel1.Controls.Add(this.L44);
            this.panel1.Controls.Add(this.L34);
            this.panel1.Controls.Add(this.L24);
            this.panel1.Controls.Add(this.L14);
            this.panel1.Controls.Add(this.L43);
            this.panel1.Controls.Add(this.L33);
            this.panel1.Controls.Add(this.L23);
            this.panel1.Controls.Add(this.L13);
            this.panel1.Controls.Add(this.L42);
            this.panel1.Controls.Add(this.L32);
            this.panel1.Controls.Add(this.L22);
            this.panel1.Controls.Add(this.L12);
            this.panel1.Controls.Add(this.L41);
            this.panel1.Controls.Add(this.L31);
            this.panel1.Controls.Add(this.L21);
            this.panel1.Controls.Add(this.L11);
            this.panel1.Location = new System.Drawing.Point(15, 29);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(277, 282);
            this.panel1.TabIndex = 2;
            // 
            // L44
            // 
            this.L44.BackColor = System.Drawing.Color.Transparent;
            this.L44.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
            this.L44.IsLocked = false;
            this.L44.IsTurning = false;
            this.L44.Location = new System.Drawing.Point(207, 207);
            this.L44.Name = "L44";
            this.L44.Size = new System.Drawing.Size(62, 62);
            this.L44.TabIndex = 4;
            this.L44.Click += new System.EventHandler(this.KeyObject_Click);
            // 
            // L34
            // 
            this.L34.BackColor = System.Drawing.Color.Transparent;
            this.L34.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
            this.L34.IsLocked = false;
            this.L34.IsTurning = false;
            this.L34.Location = new System.Drawing.Point(207, 139);
            this.L34.Name = "L34";
            this.L34.Size = new System.Drawing.Size(62, 62);
            this.L34.TabIndex = 4;
            this.L34.Click += new System.EventHandler(this.KeyObject_Click);
            // 
            // L24
            // 
            this.L24.BackColor = System.Drawing.Color.Transparent;
            this.L24.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
            this.L24.IsLocked = false;
            this.L24.IsTurning = false;
            this.L24.Location = new System.Drawing.Point(207, 71);
            this.L24.Name = "L24";
            this.L24.Size = new System.Drawing.Size(62, 62);
            this.L24.TabIndex = 4;
            this.L24.Click += new System.EventHandler(this.KeyObject_Click);
            // 
            // L14
            // 
            this.L14.BackColor = System.Drawing.Color.Transparent;
            this.L14.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
            this.L14.IsLocked = false;
            this.L14.IsTurning = false;
            this.L14.Location = new System.Drawing.Point(207, 3);
            this.L14.Name = "L14";
            this.L14.Size = new System.Drawing.Size(62, 62);
            this.L14.TabIndex = 4;
            this.L14.Click += new System.EventHandler(this.KeyObject_Click);
            // 
            // L43
            // 
            this.L43.BackColor = System.Drawing.Color.Transparent;
            this.L43.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
            this.L43.IsLocked = false;
            this.L43.IsTurning = false;
            this.L43.Location = new System.Drawing.Point(139, 207);
            this.L43.Name = "L43";
            this.L43.Size = new System.Drawing.Size(62, 62);
            this.L43.TabIndex = 4;
            this.L43.Click += new System.EventHandler(this.KeyObject_Click);
            // 
            // L33
            // 
            this.L33.BackColor = System.Drawing.Color.Transparent;
            this.L33.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
            this.L33.IsLocked = false;
            this.L33.IsTurning = false;
            this.L33.Location = new System.Drawing.Point(139, 139);
            this.L33.Name = "L33";
            this.L33.Size = new System.Drawing.Size(62, 62);
            this.L33.TabIndex = 4;
            this.L33.Click += new System.EventHandler(this.KeyObject_Click);
            // 
            // L23
            // 
            this.L23.BackColor = System.Drawing.Color.Transparent;
            this.L23.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
            this.L23.IsLocked = false;
            this.L23.IsTurning = false;
            this.L23.Location = new System.Drawing.Point(139, 71);
            this.L23.Name = "L23";
            this.L23.Size = new System.Drawing.Size(62, 62);
            this.L23.TabIndex = 4;
            this.L23.Click += new System.EventHandler(this.KeyObject_Click);
            // 
            // L13
            // 
            this.L13.BackColor = System.Drawing.Color.Transparent;
            this.L13.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
            this.L13.IsLocked = false;
            this.L13.IsTurning = false;
            this.L13.Location = new System.Drawing.Point(139, 3);
            this.L13.Name = "L13";
            this.L13.Size = new System.Drawing.Size(62, 62);
            this.L13.TabIndex = 4;
            this.L13.Click += new System.EventHandler(this.KeyObject_Click);
            // 
            // L42
            // 
            this.L42.BackColor = System.Drawing.Color.Transparent;
            this.L42.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
            this.L42.IsLocked = false;
            this.L42.IsTurning = false;
            this.L42.Location = new System.Drawing.Point(71, 207);
            this.L42.Name = "L42";
            this.L42.Size = new System.Drawing.Size(62, 62);
            this.L42.TabIndex = 4;
            this.L42.Click += new System.EventHandler(this.KeyObject_Click);
            // 
            // L32
            // 
            this.L32.BackColor = System.Drawing.Color.Transparent;
            this.L32.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
            this.L32.IsLocked = false;
            this.L32.IsTurning = false;
            this.L32.Location = new System.Drawing.Point(71, 139);
            this.L32.Name = "L32";
            this.L32.Size = new System.Drawing.Size(62, 62);
            this.L32.TabIndex = 4;
            this.L32.Click += new System.EventHandler(this.KeyObject_Click);
            // 
            // L22
            // 
            this.L22.BackColor = System.Drawing.Color.Transparent;
            this.L22.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
            this.L22.IsLocked = false;
            this.L22.IsTurning = false;
            this.L22.Location = new System.Drawing.Point(71, 71);
            this.L22.Name = "L22";
            this.L22.Size = new System.Drawing.Size(62, 62);
            this.L22.TabIndex = 4;
            this.L22.Click += new System.EventHandler(this.KeyObject_Click);
            // 
            // L12
            // 
            this.L12.BackColor = System.Drawing.Color.Transparent;
            this.L12.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
            this.L12.IsLocked = false;
            this.L12.IsTurning = false;
            this.L12.Location = new System.Drawing.Point(71, 3);
            this.L12.Name = "L12";
            this.L12.Size = new System.Drawing.Size(62, 62);
            this.L12.TabIndex = 4;
            this.L12.Click += new System.EventHandler(this.KeyObject_Click);
            // 
            // L41
            // 
            this.L41.BackColor = System.Drawing.Color.Transparent;
            this.L41.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
            this.L41.IsLocked = false;
            this.L41.IsTurning = false;
            this.L41.Location = new System.Drawing.Point(3, 207);
            this.L41.Name = "L41";
            this.L41.Size = new System.Drawing.Size(62, 62);
            this.L41.TabIndex = 4;
            this.L41.Click += new System.EventHandler(this.KeyObject_Click);
            // 
            // L31
            // 
            this.L31.BackColor = System.Drawing.Color.Transparent;
            this.L31.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
            this.L31.IsLocked = false;
            this.L31.IsTurning = false;
            this.L31.Location = new System.Drawing.Point(3, 139);
            this.L31.Name = "L31";
            this.L31.Size = new System.Drawing.Size(62, 62);
            this.L31.TabIndex = 4;
            this.L31.Click += new System.EventHandler(this.KeyObject_Click);
            // 
            // L21
            // 
            this.L21.BackColor = System.Drawing.Color.Transparent;
            this.L21.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
            this.L21.IsLocked = false;
            this.L21.IsTurning = false;
            this.L21.Location = new System.Drawing.Point(3, 71);
            this.L21.Name = "L21";
            this.L21.Size = new System.Drawing.Size(62, 62);
            this.L21.TabIndex = 4;
            this.L21.Click += new System.EventHandler(this.KeyObject_Click);
            // 
            // L11
            // 
            this.L11.BackColor = System.Drawing.Color.Transparent;
            this.L11.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
            this.L11.IsLocked = false;
            this.L11.IsTurning = false;
            this.L11.Location = new System.Drawing.Point(3, 3);
            this.L11.Name = "L11";
            this.L11.Size = new System.Drawing.Size(62, 62);
            this.L11.TabIndex = 4;
            this.L11.Click += new System.EventHandler(this.KeyObject_Click);
            // 
            // lblMoves
            // 
            this.lblMoves.AutoSize = true;
            this.lblMoves.ForeColor = System.Drawing.Color.White;
            this.lblMoves.Location = new System.Drawing.Point(12, 327);
            this.lblMoves.Name = "lblMoves";
            this.lblMoves.Size = new System.Drawing.Size(51, 13);
            this.lblMoves.TabIndex = 3;
            this.lblMoves.Text = "Moves: 0";
            // 
            // tmrIdle
            // 
            this.tmrIdle.Interval = 10;
            this.tmrIdle.Tick += new System.EventHandler(this.tmrIdle_Tick);
            // 
            // menuStrip1
            // 
            this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.mnuAbout});
            this.menuStrip1.Location = new System.Drawing.Point(0, 0);
            this.menuStrip1.Name = "menuStrip1";
            this.menuStrip1.Size = new System.Drawing.Size(304, 24);
            this.menuStrip1.TabIndex = 4;
            this.menuStrip1.Text = "menuStrip1";
            // 
            // mnuAbout
            // 
            this.mnuAbout.Name = "mnuAbout";
            this.mnuAbout.Size = new System.Drawing.Size(52, 20);
            this.mnuAbout.Text = "About";
            this.mnuAbout.Click += new System.EventHandler(this.mnuAbout_Click);
            // 
            // frmLockPuzzle
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.BackColor = System.Drawing.Color.Black;
            this.ClientSize = new System.Drawing.Size(304, 347);
            this.Controls.Add(this.lblMoves);
            this.Controls.Add(this.panel1);
            this.Controls.Add(this.btnScramble);
            this.Controls.Add(this.menuStrip1);
            this.DoubleBuffered = true;
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
            this.MainMenuStrip = this.menuStrip1;
            this.MaximizeBox = false;
            this.Name = "frmLockPuzzle";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "Lock Problem";
            this.panel1.ResumeLayout(false);
            this.menuStrip1.ResumeLayout(false);
            this.menuStrip1.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.Button btnScramble;
        private System.Windows.Forms.Panel panel1;
        private System.Windows.Forms.Label lblMoves;
        private Key L11;
        private Key L12;
        private Key L44;
        private Key L34;
        private Key L24;
        private Key L14;
        private Key L43;
        private Key L33;
        private Key L23;
        private Key L13;
        private Key L42;
        private Key L32;
        private Key L22;
        private Key L41;
        private Key L31;
        private Key L21;
        private System.Windows.Forms.Timer tmrIdle;
        private System.Windows.Forms.MenuStrip menuStrip1;
        private System.Windows.Forms.ToolStripMenuItem mnuAbout;
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United States United States
Technical professional with 11 years of experience in designing, developing and implementing sophisticated software solutions.

Comments and Discussions