frmInput.cs 15.1 KB
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 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace HaierExe04
{
    public partial class frmInput : Form
    {
        public class Equipment
        {
            public string MODEL;
            public string TYPE;
            public string P1X;
            public string P1Y;
            public string P1Z;
            public string P1E1;
            public string P1E2;
            public string P1E3;
            public string P1E4;
            public string P2X;
            public string P2Y;
            public string P2Z;
            public string P2E1;
            public string P2E2;
            public string P2E3;
            public string P2E4;
            public string P3X;
            public string P3Y;
            public string P3Z;
            public string P3E1;
            public string P3E2;
            public string P3E3;
            public string P3E4;
            public string P4X;
            public string P4Y;
            public string P4Z;
            public string P4E1;
            public string P4E2;
            public string P4E3;
            public string P4E4;
            public string P5X;
            public string P5Y;
            public string P5Z;
            public string P5E1;
            public string P5E2;
            public string P5E3;
            public string P5E4;

            public string W1A;
            public string W1B;
            public string W1C;
            public string W1D;
            public string W1E;
            public string W1F;
            public string W2A;
            public string W2B;
            public string W2C;
            public string W2D;
            public string W2E;
            public string W2F;
            public string W3A;
            public string W3B;
            public string W3C;
            public string W3D;
            public string W3E;
            public string W3F;
            public string W4A;
            public string W4B;
            public string W4C;
            public string W4D;
            public string W4E;
            public string W4F;
            public string W5A;
            public string W5B;
            public string W5C;
            public string W5D;
            public string W5E;
            public string W5F;

            public string BASEX;
            public string BASEY;
            public string BASEZ;
            public string BASEA;
            public string BASEB;
            public string BASEC;
        };

        public string[] equipments = new string[100];

        public static Equipment equipment ;
        public frmInput()
        {
            InitializeComponent();
            if(equipment == null)
            {
                init();
            } else
            {
                initView(equipment);
            }

        }

        private void init()
        {
            equipment = new Equipment();
            equipment.MODEL = "1";
            equipment.TYPE = "1";
            equipment.P1X = "1.000000";
            equipment.P1Y = "1.000000";
            equipment.P1Z = "1.020000";
            equipment.P1E1 = "1.030000";
            equipment.P1E2 = "1.000000";
            equipment.P1E3 = "1.000000";
            equipment.P1E4 = "1.000000";
            equipment.P2X = "1.000000";
            equipment.P2Y = "1.000000";
            equipment.P2Z = "1.020000";
            equipment.P2E1 = "1.030000";
            equipment.P2E2 = "1.000000";
            equipment.P2E3 = "1.000000";
            equipment.P2E4 = "1.000000";
            equipment.P3X = "1.000000";
            equipment.P3Y = "1.000000";
            equipment.P3Z = "1.020000";
            equipment.P3E1 = "1.030000";
            equipment.P3E2 = "1.000000";
            equipment.P3E3 = "1.000000";
            equipment.P3E4 = "1.000000";
            equipment.P4X = "1.000000";
            equipment.P4Y = "1.000000";
            equipment.P4Z = "1.020000";
            equipment.P4E1 = "1.030000";
            equipment.P4E2 = "1.000000";
            equipment.P4E3 = "1.000000";
            equipment.P4E4 = "1.000000";
            equipment.P5X = "1.000000";
            equipment.P5Y = "1.000000";
            equipment.P5Z = "1.020000";
            equipment.P5E1 = "1.030000";
            equipment.P5E2 = "1.000000";
            equipment.P5E3 = "1.000000";
            equipment.P5E4 = "1.000000";
            equipment.W1A = "1.000000";
            equipment.W1B = "1.000000";
            equipment.W1C = "1.000000";
            equipment.W1D = "1.000000";
            equipment.W1E = "1.000000";
            equipment.W1F = "1.000000";
            equipment.W2A = "1.000000";
            equipment.W2B = "1.000000";
            equipment.W2C = "1.000000";
            equipment.W2D = "1.000000";
            equipment.W2E = "1.000000";
            equipment.W2F = "1.000000";
            equipment.W3A = "1.000000";
            equipment.W3B = "1.000000";
            equipment.W3C = "1.000000";
            equipment.W3D = "1.000000";
            equipment.W3E = "1.000000";
            equipment.W3F = "1.000000";
            equipment.W4A = "1.000000";
            equipment.W4B = "1.000000";
            equipment.W4C = "1.000000";
            equipment.W4D = "1.000000";
            equipment.W4E = "1.000000";
            equipment.W4F = "1.000000";
            equipment.W5A = "1.000000";
            equipment.W5B = "1.000000";
            equipment.W5C = "1.000000";
            equipment.W5D = "1.000000";
            equipment.W5E = "1.000000";
            equipment.W5F = "1.000000";
            equipment.BASEX = "1.000000";
            equipment.BASEY = "1.000000";
            equipment.BASEZ = "1.000000";
            equipment.BASEA = "1.000000";
            equipment.BASEB = "1.000000";
            equipment.BASEC = "1.000000";
            initView(equipment);
        }

        private void initView(Equipment equipment)
        {
            textBox1.Text = equipment.MODEL.ToString();
            textBox2.Text = equipment.TYPE.ToString();
            textBox3.Text = equipment.P1X.ToString();
            textBox4.Text = equipment.P1Y.ToString();
            textBox5.Text = equipment.P1Z.ToString();
            textBox6.Text = equipment.P1E1.ToString();
            textBox7.Text = equipment.P1E2.ToString();
            textBox8.Text = equipment.P1E3.ToString();
            textBox9.Text = equipment.P1E4.ToString();
            textBox10.Text = equipment.P2X.ToString();
            textBox11.Text = equipment.P2Y.ToString();
            textBox12.Text = equipment.P2Z.ToString();
            textBox13.Text = equipment.P2E1.ToString();
            textBox14.Text = equipment.P2E2.ToString();
            textBox15.Text = equipment.P2E3.ToString();
            textBox16.Text = equipment.P2E4.ToString();
            textBox17.Text = equipment.P3X.ToString();
            textBox18.Text = equipment.P3Y.ToString();
            textBox19.Text = equipment.P3Z.ToString();
            textBox20.Text = equipment.P3E1.ToString();
            textBox21.Text = equipment.P3E2.ToString();
            textBox22.Text = equipment.P3E3.ToString();
            textBox23.Text = equipment.P3E4.ToString();
            textBox24.Text = equipment.P4X.ToString();
            textBox25.Text = equipment.P4Y.ToString();
            textBox26.Text = equipment.P4Z.ToString();
            textBox27.Text = equipment.P4E1.ToString();
            textBox28.Text = equipment.P4E2.ToString();
            textBox29.Text = equipment.P4E3.ToString();
            textBox30.Text = equipment.P4E4.ToString();
            textBox31.Text = equipment.P5X.ToString();
            textBox32.Text = equipment.P5Y.ToString();
            textBox33.Text = equipment.P5Z.ToString();
            textBox34.Text = equipment.P5E1.ToString();
            textBox35.Text = equipment.P5E2.ToString();
            textBox36.Text = equipment.P5E3.ToString();
            textBox37.Text = equipment.P5E4.ToString();

            textBox38.Text = equipment.W1A.ToString();
            textBox39.Text = equipment.W1B.ToString();
            textBox40.Text = equipment.W1C.ToString();
            textBox41.Text = equipment.W1D.ToString();
            textBox42.Text = equipment.W1E.ToString();
            textBox43.Text = equipment.W1F.ToString();
            textBox44.Text = equipment.W2A.ToString();
            textBox45.Text = equipment.W2B.ToString();
            textBox46.Text = equipment.W2C.ToString();
            textBox47.Text = equipment.W2D.ToString();
            textBox48.Text = equipment.W2E.ToString();
            textBox49.Text = equipment.W2F.ToString();
            textBox50.Text = equipment.W3A.ToString();
            textBox51.Text = equipment.W3B.ToString();
            textBox52.Text = equipment.W3C.ToString();
            textBox53.Text = equipment.W3D.ToString();
            textBox54.Text = equipment.W3E.ToString();
            textBox55.Text = equipment.W3F.ToString();
            textBox56.Text = equipment.W4A.ToString();
            textBox57.Text = equipment.W4B.ToString();
            textBox58.Text = equipment.W4C.ToString();
            textBox59.Text = equipment.W4D.ToString();
            textBox60.Text = equipment.W4E.ToString();
            textBox61.Text = equipment.W4F.ToString();
            textBox62.Text = equipment.W5A.ToString();
            textBox63.Text = equipment.W5B.ToString();
            textBox64.Text = equipment.W5C.ToString();
            textBox65.Text = equipment.W5D.ToString();
            textBox66.Text = equipment.W5E.ToString();
            textBox67.Text = equipment.W5F.ToString();
            textBox68.Text = equipment.BASEX.ToString();
            textBox69.Text = equipment.BASEY.ToString();
            textBox70.Text = equipment.BASEZ.ToString();
            textBox71.Text = equipment.BASEA.ToString();
            textBox72.Text = equipment.BASEB.ToString();
            textBox73.Text = equipment.BASEC.ToString();
        }

        private void freshView()
        {
            equipment.MODEL = textBox1.Text;
            equipment.TYPE = textBox2.Text;
            equipment.P1X = textBox3.Text;
            equipment.P1Y = textBox4.Text;
            equipment.P1Z = textBox5.Text;
            equipment.P1E1 = textBox6.Text;
            equipment.P1E2 = textBox7.Text;
            equipment.P1E3 = textBox8.Text;
            equipment.P1E4 = textBox9.Text;
            equipment.P2X = textBox10.Text;
            equipment.P2Y = textBox11.Text;
            equipment.P2Z = textBox12.Text;
            equipment.P2E1 = textBox13.Text;
            equipment.P2E2 = textBox14.Text;
            equipment.P2E3 = textBox15.Text;
            equipment.P2E4 = textBox16.Text;
            equipment.P3X = textBox17.Text;
            equipment.P3Y = textBox18.Text;
            equipment.P3Z = textBox19.Text;
            equipment.P3E1 = textBox20.Text;
            equipment.P3E2 = textBox21.Text;
            equipment.P3E3 = textBox22.Text;
            equipment.P3E4 = textBox23.Text;
            equipment.P4X = textBox24.Text;
            equipment.P4Y = textBox25.Text;
            equipment.P4Z = textBox26.Text;
            equipment.P4E1 = textBox27.Text;
            equipment.P4E2 = textBox28.Text;
            equipment.P4E3 = textBox29.Text;
            equipment.P4E4 = textBox30.Text;
            equipment.P5X = textBox31.Text;
            equipment.P5Y = textBox32.Text;
            equipment.P5Z = textBox33.Text;
            equipment.P5E1 = textBox34.Text;
            equipment.P5E2 = textBox35.Text;
            equipment.P5E3 = textBox36.Text;
            equipment.P5E4 = textBox37.Text;
            equipment.W1A = textBox38.Text;
            equipment.W1B = textBox39.Text;
            equipment.W1C = textBox40.Text;
            equipment.W1D = textBox41.Text;
            equipment.W1E = textBox42.Text;
            equipment.W1F = textBox43.Text;
            equipment.W2A = textBox44.Text;
            equipment.W2B = textBox45.Text;
            equipment.W2C = textBox46.Text;
            equipment.W2D = textBox47.Text;
            equipment.W2E = textBox48.Text;
            equipment.W2F = textBox49.Text;
            equipment.W3A = textBox50.Text;
            equipment.W3B = textBox51.Text;
            equipment.W3C = textBox52.Text;
            equipment.W3D = textBox53.Text;
            equipment.W3E = textBox54.Text;
            equipment.W3F = textBox55.Text;
            equipment.W4A = textBox56.Text;
            equipment.W4B = textBox57.Text;
            equipment.W4C = textBox58.Text;
            equipment.W4D = textBox59.Text;
            equipment.W4E = textBox60.Text;
            equipment.W4F = textBox61.Text;
            equipment.W5A = textBox62.Text;
            equipment.W5B = textBox63.Text;
            equipment.W5C = textBox64.Text;
            equipment.W5D = textBox65.Text;
            equipment.W5E = textBox66.Text;
            equipment.W5F = textBox67.Text;
            equipment.BASEX = textBox68.Text;
            equipment.BASEY = textBox69.Text;
            equipment.BASEZ = textBox70.Text;
            equipment.BASEA = textBox71.Text;
            equipment.BASEB = textBox72.Text;
            equipment.BASEC = textBox73.Text;
        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {

        }

        private void textBox2_TextChanged(object sender, EventArgs e)
        {

        }

        private void label44_Click(object sender, EventArgs e)
        {

        }

        private void label38_Click(object sender, EventArgs e)
        {

        }

        private void textBox39_TextChanged(object sender, EventArgs e)
        {

        }

        private void label39_Click(object sender, EventArgs e)
        {

        }

        private void textBox40_TextChanged(object sender, EventArgs e)
        {

        }

        private void label40_Click(object sender, EventArgs e)
        {

        }

        private void textBox38_TextChanged(object sender, EventArgs e)
        {

        }

        private void label41_Click(object sender, EventArgs e)
        {

        }

        private void textBox42_TextChanged(object sender, EventArgs e)
        {

        }

        private void label42_Click(object sender, EventArgs e)
        {

        }

        private void textBox43_TextChanged(object sender, EventArgs e)
        {

        }

        private void label43_Click(object sender, EventArgs e)
        {

        }

        private void textBox44_TextChanged(object sender, EventArgs e)
        {

        }

        private void textBox41_TextChanged(object sender, EventArgs e)
        {

        }

        private void frmInput_Load(object sender, EventArgs e)
        {

        }

        private void label70_Click(object sender, EventArgs e)
        {

        }

        private void label8_Click(object sender, EventArgs e)
        {

        }

        private void textBox1_TextChanged_1(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            freshView();
            Dispose();
        }

        private void textBox23_TextChanged(object sender, EventArgs e)
        {

        }
    }
}