예제 #1
0
파일: Form1.cs 프로젝트: unikursal/Metro
        private void button1_Click1(object sender, EventArgs e)
        {
            block = false;
            win   = new bool[2];

            nameImageToLabel.Clear();
            labelResult.Text = "";
            textLabel        = "";

            int numbName = random.Next(sizeListPerson);

            for (int i = 0; i < labelSize; i++)
            {
                string letter = letters[random.Next(lettersSize)];
                listLabel[i].Image = (Image)rm.GetObject(letter);

                nameImageToLabel.Add(i, letter);
            }

            string nam = "_" + numbName;

            pictureBox.Image = (Image)rm.GetObject(nam);

            name = mapName[numbName].Split(' ');

            Logic logic = new Logic(name, mapImage, nameImageToLabel);

            logic.rearrangeLName();

            fNameH = logic.getFName();
            lNameH = logic.getLName();
        }
예제 #2
0
파일: Logic.cs 프로젝트: unikursal/Metro
        private void draw(char[] text, int begin, int end, int step)
        {
            int numb = 0;

            if (text == fName)
            {
                fNameH          = new for_help();
                fNameH.position = begin;
                fNameH.mode     = (step == 1 ? ROW_MODE : COLUMN_MODE);
            }
            else
            {
                lNameH          = new for_help();
                lNameH.position = begin;
                lNameH.mode     = (step == 1 ? ROW_MODE : COLUMN_MODE);
            }

            for (int i = begin; i < end; i += step)
            {
                char key = text[numb];
                numb++;

                Form1.listLabel[i].Image = mapImage[key];

                nameImage.Remove(i);
                string nameImg = "" + key;
                nameImage.Add(i, nameImg);
            }
        }