Exemplo n.º 1
0
        void PRVL()
        {
            if (slojnost == "Легкий")
            {
                fole.Open_ToGoo_mas("light.tt");
                label89.Text = fole.Str;

                label86.Text = "0";
            }
            else if (slojnost == "Средний")
            {
                fole.Open_ToGoo_mas("average.tt");
                label89.Text = fole.Str;
                ohibki       = 6;
                label86.Text = ohibki.ToString();
                conTimer     = 6;
            }
            else if (slojnost == "Ад...!!")
            {
                fole.Open_ToGoo_mas("average.tt");
                label89.Text = fole.Str;
                ohibki       = 3;
                label86.Text = ohibki.ToString();
                conTimer     = 8;
            }
        }
        public void save()
        {
            string       temp  = "";
            string       temp1 = " ";
            string       url   = string.Format(@"{0}\{1}", "file restaet", "YRAven-Slojnosti.tt");
            variants     varit = new variants();
            open_TO_file filet = new open_TO_file();

            filet.Open_ToGoo_mas("YRAven-Slojnosti.tt");
            for (int i = 1; i <= 12; i++)
            {
                if (str == varit.SSR[i])
                {
                    i++;
                    temp = "radioButton" + i.ToString();
                    break;
                }
            }
            for (int i = 0; i < 6; i++)
            {
                temp1 += filet.Mas[i] + "\r\n";
                temp1  = temp1.Trim(' ');
                if (filet.Mas[i] == cl)
                {
                    i             = i + 1;
                    filet.Mas[i] += ',';
                    filet.Mas[i] += temp + ",\r\n";
                    temp1        += filet.Mas[i];
                }
            }
            StreamWriter sev = new StreamWriter(url);

            sev.Write(temp1);
            sev.Close();
        }
Exemplo n.º 3
0
        void Label3Click(object sender, EventArgs e)
        {
            open_TO_file file = new open_TO_file();

            file.Open_ToGoo_mas("YRAven-Slojnosti.tt");

            flog--;
            if (flog < 0)
            {
                flog = 2;
            }
            label1.Text = slognost[flog];
            file.Resojes(label1.Text);

            mas_ok_pz(file.SL);
        }
Exemplo n.º 4
0
        void VariantsLoad(object sender, EventArgs e)
        {
            menu men = new menu();

            if (men.ShowDialog() == DialogResult.Cancel)
            {
                clos = true;
                this.Close();
            }
            else if (men.DialogResult == DialogResult.OK)
            {
                open_TO_file file = new open_TO_file();
                file.Open_ToGoo_mas("YRAven-Slojnosti.tt");
                file.Resojes(label1.Text);
                mas_ok_pz(file.SL);
            }
        }
Exemplo n.º 5
0
 void Button1Click(object sender, EventArgs e)
 {
     if (cl == true)
     {
         MainForm MAns = new MainForm(struck[index], label1.Text);
         this.Hide();
         if (MAns.ShowDialog() == DialogResult.OK)
         {
             this.Close();
         }
         else if (MAns.DialogResult == DialogResult.No)
         {
             open_TO_file to_file = new open_TO_file();
             to_file.Open_ToGoo_mas("YRAven-Slojnosti.tt");
             to_file.Resojes(label1.Text);
             mas_ok_pz(to_file.SL);
             this.Visible = true;
         }
     }
     else
     {
         MessageBox.Show("Вы не выбрали карту", " ощибка");
     }
 }