示例#1
0
        void PRVL()
        {
            if (ryven == "Easy")
            {
                file.GoToLevel("light.tt");
                label89.Text = file.Str;

                label86.Text = "0";
            }
            else if (ryven == "Normal")
            {
                file.GoToLevel("average.tt");
                label89.Text = file.Str;
                error        = 6;
                label86.Text = error.ToString();
                fullTime     = 6;
            }
            else if (ryven == "Complicated")
            {
                file.GoToLevel("hard.tt");
                label89.Text = file.Str;
                error        = 3;
                label86.Text = error.ToString();
                fullTime     = 8;
            }
        }
示例#2
0
        public void save()
        {
            string       tmp     = "";
            string       tmp1    = " ";
            string       url     = string.Format(@"{0}\{1}", "file", "level.tt");
            variants     variant = new variants();
            open_TO_file filet   = new open_TO_file();

            filet.GoToLevel("level.tt");
            for (int i = 1; i <= 12; i++)
            {
                if (str == variant.SSR[i])
                {
                    i++;
                    tmp = "radioButton" + i.ToString();
                    break;
                }
            }
            for (int i = 0; i < 6; i++)
            {
                tmp1 += filet.Mas[i] + "\r\n";
                tmp1  = tmp1.Trim(' ');
                if (filet.Mas[i] == lev)
                {
                    i             = i + 1;
                    filet.Mas[i] += ',';
                    filet.Mas[i] += tmp + ",\r\n";
                    tmp1         += filet.Mas[i];
                }
            }
            StreamWriter sev = new StreamWriter(url);

            sev.Write(tmp1);
            sev.Close();
        }
示例#3
0
        void Label2Click(object sender, EventArgs e)
        {
            number++;
            open_TO_file file = new open_TO_file();

            file.GoToLevel("level.tt");
            if (number == 3)
            {
                number = 0;
            }
            label1.Text = level[number];
            file.Znaky(label1.Text);

            //	CheckPuzel(file.SL);
        }
示例#4
0
        void VariantsLoad(object sender, EventArgs e)
        {
            menu menu = new menu();

            if (menu.ShowDialog() == DialogResult.Cancel)
            {
                close = true;
                this.Close();
            }
            else if (menu.DialogResult == DialogResult.OK)
            {
                open_TO_file file = new open_TO_file();
                file.GoToLevel("level.tt");
                file.Znaky(label1.Text);
                //CheckPuzel(file.SL);
            }
        }
示例#5
0
 void Button1Click(object sender, EventArgs e)
 {
     if (tmp == true)
     {
         MainForm mainform = new MainForm(struck[index], label1.Text);
         this.Hide();
         if (mainform.ShowDialog() == DialogResult.OK)
         {
             this.Close();
         }
         else if (mainform.DialogResult == DialogResult.No)
         {
             open_TO_file to_file = new open_TO_file();
             to_file.GoToLevel("level.tt");
             to_file.Znaky(label1.Text);
             //	CheckPuzel(to_file.SL);
             this.Visible = true;
         }
     }
     else
     {
         MessageBox.Show("You didn't choose", "Error");
     }
 }