1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211
|
/*
* Created by SharpDevelop.
* User: Thomas
* Date: 08/01/2005
* Time: 20:18
*/
using System;
using System.Drawing;
using System.Windows.Forms;
namespace Mastermind
{
/// <summary>
/// Description of MainForm.
/// </summary>
public class MainForm : System.Windows.Forms.Form
{
private System.Windows.Forms.TextBox o_pion1;
private System.Windows.Forms.TextBox o_pion3;
private System.Windows.Forms.Button bt_Tester;
private System.Windows.Forms.TextBox n_pion4;
private System.Windows.Forms.TextBox o_pion4;
private System.Windows.Forms.TextBox n_pion5;
private System.Windows.Forms.TextBox n_pion1;
private System.Windows.Forms.TextBox n_pion2;
private System.Windows.Forms.TextBox n_pion3;
private System.Windows.Forms.TextBox o_pion2;
private System.Windows.Forms.TextBox o_pion5;
public MainForm()
{
//
// The InitializeComponent() call is required for Windows Forms designer support.
//
InitializeComponent();
//
// TODO: Add constructor code after the InitializeComponent() call.
//
}
[STAThread]
public static void Main(string[] args)
{
Application.Run(new MainForm());
}
#region Windows Forms Designer generated code
/// <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.o_pion5 = new System.Windows.Forms.TextBox();
this.o_pion2 = new System.Windows.Forms.TextBox();
this.n_pion3 = new System.Windows.Forms.TextBox();
this.n_pion2 = new System.Windows.Forms.TextBox();
this.n_pion1 = new System.Windows.Forms.TextBox();
this.n_pion5 = new System.Windows.Forms.TextBox();
this.o_pion4 = new System.Windows.Forms.TextBox();
this.n_pion4 = new System.Windows.Forms.TextBox();
this.bt_Tester = new System.Windows.Forms.Button();
this.o_pion3 = new System.Windows.Forms.TextBox();
this.o_pion1 = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// o_pion5
//
this.o_pion5.Location = new System.Drawing.Point(130, 40);
this.o_pion5.MaxLength = 1;
this.o_pion5.Name = "o_pion5";
this.o_pion5.ReadOnly = true;
this.o_pion5.Size = new System.Drawing.Size(21, 20);
this.o_pion5.TabIndex = 9;
this.o_pion5.Text = "";
this.o_pion5.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// o_pion2
//
this.o_pion2.Location = new System.Drawing.Point(40, 40);
this.o_pion2.MaxLength = 1;
this.o_pion2.Name = "o_pion2";
this.o_pion2.ReadOnly = true;
this.o_pion2.Size = new System.Drawing.Size(21, 20);
this.o_pion2.TabIndex = 6;
this.o_pion2.Text = "";
this.o_pion2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// n_pion3
//
this.n_pion3.Location = new System.Drawing.Point(70, 10);
this.n_pion3.MaxLength = 1;
this.n_pion3.Name = "n_pion3";
this.n_pion3.Size = new System.Drawing.Size(21, 20);
this.n_pion3.TabIndex = 2;
this.n_pion3.Text = "";
this.n_pion3.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// n_pion2
//
this.n_pion2.Location = new System.Drawing.Point(40, 10);
this.n_pion2.MaxLength = 1;
this.n_pion2.Name = "n_pion2";
this.n_pion2.Size = new System.Drawing.Size(21, 20);
this.n_pion2.TabIndex = 1;
this.n_pion2.Text = "";
this.n_pion2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// n_pion1
//
this.n_pion1.Location = new System.Drawing.Point(10, 10);
this.n_pion1.MaxLength = 1;
this.n_pion1.Name = "n_pion1";
this.n_pion1.Size = new System.Drawing.Size(21, 20);
this.n_pion1.TabIndex = 0;
this.n_pion1.Text = "";
this.n_pion1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// n_pion5
//
this.n_pion5.Location = new System.Drawing.Point(130, 10);
this.n_pion5.MaxLength = 1;
this.n_pion5.Name = "n_pion5";
this.n_pion5.Size = new System.Drawing.Size(21, 20);
this.n_pion5.TabIndex = 4;
this.n_pion5.Text = "";
this.n_pion5.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// o_pion4
//
this.o_pion4.Location = new System.Drawing.Point(100, 40);
this.o_pion4.MaxLength = 1;
this.o_pion4.Name = "o_pion4";
this.o_pion4.ReadOnly = true;
this.o_pion4.Size = new System.Drawing.Size(21, 20);
this.o_pion4.TabIndex = 8;
this.o_pion4.Text = "";
this.o_pion4.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// n_pion4
//
this.n_pion4.Location = new System.Drawing.Point(100, 10);
this.n_pion4.MaxLength = 1;
this.n_pion4.Name = "n_pion4";
this.n_pion4.Size = new System.Drawing.Size(21, 20);
this.n_pion4.TabIndex = 3;
this.n_pion4.Text = "";
this.n_pion4.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// bt_Tester
//
this.bt_Tester.Location = new System.Drawing.Point(160, 10);
this.bt_Tester.Name = "bt_Tester";
this.bt_Tester.Size = new System.Drawing.Size(75, 21);
this.bt_Tester.TabIndex = 10;
this.bt_Tester.Text = "Tester";
//
// o_pion3
//
this.o_pion3.Location = new System.Drawing.Point(70, 40);
this.o_pion3.MaxLength = 1;
this.o_pion3.Name = "o_pion3";
this.o_pion3.ReadOnly = true;
this.o_pion3.Size = new System.Drawing.Size(21, 20);
this.o_pion3.TabIndex = 7;
this.o_pion3.Text = "";
this.o_pion3.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// o_pion1
//
this.o_pion1.Location = new System.Drawing.Point(10, 40);
this.o_pion1.MaxLength = 1;
this.o_pion1.Name = "o_pion1";
this.o_pion1.ReadOnly = true;
this.o_pion1.Size = new System.Drawing.Size(21, 20);
this.o_pion1.TabIndex = 5;
this.o_pion1.Text = "";
this.o_pion1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// fen_Princ
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(244, 75);
this.Controls.Add(this.bt_Tester);
this.Controls.Add(this.o_pion5);
this.Controls.Add(this.o_pion4);
this.Controls.Add(this.o_pion3);
this.Controls.Add(this.o_pion2);
this.Controls.Add(this.o_pion1);
this.Controls.Add(this.n_pion5);
this.Controls.Add(this.n_pion4);
this.Controls.Add(this.n_pion3);
this.Controls.Add(this.n_pion2);
this.Controls.Add(this.n_pion1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.Name = "fen_Princ";
this.Text = "Yamasteg";
this.ResumeLayout(false);
}
#endregion
int[] combi = new int[5];
Random rnd = new Random();
for (int c=0; c<5; c++)
{
combi[c] = rnd.Next(1, 8);
}
}
} |
Partager