using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using MySql.Data.MySqlClient;
using System.Runtime.InteropServices;
using WMPLib;

namespace saytan
{

    public partial class Form1 : Form
    {
        int position = 0;
        int c = 0;
         WMPLib.WindowsMediaPlayer wplayer = new WMPLib.WindowsMediaPlayer();
         WMPLib.WindowsMediaPlayer wplayer1 = new WMPLib.WindowsMediaPlayer();
         WMPLib.WindowsMediaPlayer wplayer2 = new WMPLib.WindowsMediaPlayer();
         WMPLib.WindowsMediaPlayer wplayer3 = new WMPLib.WindowsMediaPlayer();
         WMPLib.WindowsMediaPlayer wplayer4 = new WMPLib.WindowsMediaPlayer();
         WMPLib.WindowsMediaPlayer wplayer5 = new WMPLib.WindowsMediaPlayer();
         WMPLib.WindowsMediaPlayer wplayer6 = new WMPLib.WindowsMediaPlayer();
         WMPLib.WindowsMediaPlayer wplayer7 = new WMPLib.WindowsMediaPlayer();
         WMPLib.WindowsMediaPlayer wplayer9 = new WMPLib.WindowsMediaPlayer();
        public Form1()
        {
            InitializeComponent();
            label1.Text = "31";
            label14.Text = "0";
            label16.Text = "0";
            if(Class1.h == "0")
            {
                 timer1.Start();
            }
        }
        private void contextMenuStrip1_Opening(object sender, CancelEventArgs e)
        {

        }
        private void Form1_Load(object sender, EventArgs e)
        {
            wplayer.URL = @"D:\saytan\saytan\Resources\sounds\game_start.mp3";
            double time = wplayer.controls.currentPosition;
            wplayer.controls.play();
            label14.Visible = false;
            timer6.Start();
            label12.ForeColor = Color.YellowGreen;
            label1.Visible = false;
            label3.Visible = false;
            label15.Visible = false;
            label16.Visible = false;
            label39.Visible = false;
            label40.Visible = false;
            label41.Visible = false;
            label42.Visible = false;
            label43.Visible = false;
            label44.Visible = false;
            label45.Visible = false;
            label46.Visible = false;
            label47.Visible = false;
            label48.Visible = false;
            label49.Visible = false;
            label51.Visible = false;
            label2.Text = "Доорхоос аль нэгийг нь сонгоно уу ?";
            label2.BackColor = System.Drawing.Color.Transparent;
            label4.Text = "Тоглоом эхлэх";
            label4.BackColor = System.Drawing.Color.Transparent;
            label5.Text = "Тоглох заавар";
            label5.BackColor = System.Drawing.Color.Transparent;
            label6.Text = "Тоглоомын тухай";
            label6.BackColor = System.Drawing.Color.Transparent;
            label7.Text = "Дээд амжилт";
            label7.BackColor = System.Drawing.Color.Transparent;
            label8.BackColor = System.Drawing.Color.Transparent;
            label9.BackColor = System.Drawing.Color.Transparent;
            label10.BackColor = System.Drawing.Color.Transparent;
            label11.BackColor = System.Drawing.Color.Transparent;
            label1.BackColor = System.Drawing.Color.Transparent;
            label3.BackColor = System.Drawing.Color.Transparent;
            label12.BackColor = System.Drawing.Color.Transparent;
            label13.BackColor = System.Drawing.Color.Transparent;
            label14.BackColor = System.Drawing.Color.Transparent;
            label15.BackColor = System.Drawing.Color.Transparent;
            label15.ForeColor = Color.GreenYellow;
            label16.BackColor = System.Drawing.Color.Transparent;
            label17.BackColor = System.Drawing.Color.Transparent;
            label18.BackColor = System.Drawing.Color.Transparent;
            label19.BackColor = System.Drawing.Color.Transparent;
            label20.BackColor = System.Drawing.Color.Transparent;
            label21.BackColor = System.Drawing.Color.Transparent;
            label22.BackColor = System.Drawing.Color.Transparent;
            label23.BackColor = System.Drawing.Color.Transparent;
            label24.BackColor = System.Drawing.Color.Transparent;
            label25.BackColor = System.Drawing.Color.Transparent;
            label26.BackColor = System.Drawing.Color.Transparent;
            label27.BackColor = System.Drawing.Color.Transparent;
            label28.BackColor = System.Drawing.Color.Transparent;
            label29.BackColor = System.Drawing.Color.Transparent;
            label30.BackColor = System.Drawing.Color.Transparent;
            label31.BackColor = System.Drawing.Color.Transparent;
            label32.BackColor = System.Drawing.Color.Transparent;
            label33.BackColor = System.Drawing.Color.Transparent;
            label34.BackColor = System.Drawing.Color.Transparent;
            label36.BackColor = System.Drawing.Color.Transparent;
            label37.BackColor = System.Drawing.Color.Transparent;
            label38.BackColor = System.Drawing.Color.Transparent;
            label40.BackColor = System.Drawing.Color.Transparent;
            label41.BackColor = System.Drawing.Color.Transparent;
            label42.BackColor = System.Drawing.Color.Transparent;
            label43.BackColor = System.Drawing.Color.Transparent;
            label44.BackColor = System.Drawing.Color.Transparent;
            label45.BackColor = System.Drawing.Color.Transparent;
            label46.BackColor = System.Drawing.Color.Transparent;
            label47.BackColor = System.Drawing.Color.Transparent;
            label48.BackColor = System.Drawing.Color.Transparent;
            label49.BackColor = System.Drawing.Color.Transparent;
            label50.BackColor = System.Drawing.Color.Transparent;
            label51.BackColor = System.Drawing.Color.Red;
            label51.ForeColor = Color.White;
            label51.Size = new Size(10, 10);
            label51.AutoSize = false;
            label8.Enabled = false;
            label9.Enabled = false;
            label10.Enabled = false;
            label11.Enabled = false;
            pictureBox1.Enabled = false;
            pictureBox2.Enabled = false;
            pictureBox3.Enabled = false;
            label39.BackColor = System.Drawing.Color.Transparent;
        }
        private void pictureBox2_Click(object sender, EventArgs e)
        {
            wplayer6.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\50_50.mp3";
            double time = wplayer6.controls.currentPosition;
            wplayer6.controls.play();
            utas u = new utas();
            u.ShowDialog();
            pictureBox2.Enabled = false;
            label49.Visible = true;
        }
        private void pictureBox1_Click(object sender, EventArgs e)
        {
            wplayer6.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\50_50.mp3";
            double time = wplayer6.controls.currentPosition;
            wplayer6.controls.play();
            Class1.g = "1";
            label40.Visible = true;
            label41.Visible = true;
            label42.Visible = true;
            label43.Visible = true;
            label44.Visible = true;
            label45.Visible = true;
            label46.Visible = true;
            label47.Visible = true;
            pictureBox1.Enabled = false;
            label48.Visible = true;
            switch (Class1.b)
            {
                case "A" :
                    label47.Text = "48%";
                    label46.Text = "8%";
                    label45.Text = "22%";
                    label44.Text = "22%";
                    break;
                case "B":
                    label47.Text = "22%";
                    label46.Text = "48%";
                    label45.Text = "8%";
                    label44.Text = "22%";
                    break;
                case "C":
                    label47.Text = "22%";
                    label46.Text = "8%";
                    label45.Text = "48%";
                    label44.Text = "22%";
                    break;
                case "D":
                    label47.Text = "8%";
                    label46.Text = "22%";
                    label45.Text = "22%";
                    label44.Text = "48%";
                    break;
            }
        }
        protected const string _newline = "\r\n";
        public static string WordWrap(string the_string, int width)
        {
            int pos, next;
            StringBuilder sb = new StringBuilder();

            // Lucidity check
            if (width < 1)
                return the_string;

            // Parse each line of text
            for (pos = 0; pos < the_string.Length; pos = next)
            {
                // Find end of line
                int eol = the_string.IndexOf(_newline, pos);

                if (eol == -1)
                    next = eol = the_string.Length;
                else
                    next = eol + _newline.Length;

                // Copy this line of text, breaking into smaller lines as needed
                if (eol > pos)
                {
                    do
                    {
                        int len = eol - pos;

                        if (len > width)
                            len = BreakLine(the_string, pos, width);

                        sb.Append(the_string, pos, len);
                        sb.Append(_newline);

                        // Trim whitespace following break
                        pos += len;

                        while (pos < eol && Char.IsWhiteSpace(the_string[pos]))
                            pos++;

                    } while (eol > pos);
                }
                else sb.Append(_newline); // Empty line
            }

            return sb.ToString();
        }
        public static int BreakLine(string text, int pos, int max)
        {
            // Find last whitespace in line
            int i = max - 1;
            while (i >= 0 && !Char.IsWhiteSpace(text[pos + i]))
                i--;
            if (i < 0)
                return max; // No whitespace found; break at maximum length
            // Find start of whitespace
            while (i >= 0 && Char.IsWhiteSpace(text[pos + i]))
                i--;
            // Return length of text before whitespace
            return i + 1;
        }
        private void label4_Click(object sender, EventArgs e)
        {
            if (label4.Text == "Тоглоом эхлэх")
            {
                c = 0;
                wplayer.controls.stop();
                timer7.Start();
                wplayer1.URL = @"D:\saytan\saytan\Resources\sounds\game_start1.mp3";
                double time = wplayer1.controls.currentPosition;
                wplayer1.controls.play();
                label4.Enabled = false;
                label5.Enabled = false;
                label6.Enabled = false;
                label7.Enabled = false;
                label8.Enabled = false;
                label9.Enabled = false;
                label10.Enabled = false;
                label11.Enabled = false;
            }
            else
                A();
        }

        public void asuult()
        {
            int zereg;
            zereg = Convert.ToInt32(position) + 1;
            MySqlConnection n = new MySqlConnection("Server=localhost; database=saytan; UID=root; CHARSET=utf8;");
            n.Open();
            string asuultNo;
            label1.ForeColor = Color.White;
            label14.Text = Convert.ToString(Convert.ToInt32(label14.Text) +1);
            string query = "select asuultNo from asuult where zereg = '"+ zereg +"' order by rand() limit 0,1;";
            MySqlCommand cmd = new MySqlCommand(query, n);
            MySqlDataReader reader1 = cmd.ExecuteReader();
            reader1.Read();
            asuultNo = reader1.GetString(0);
            reader1.Close();
            cmd.CommandText = "select * from asuult where asuultNo = '" + asuultNo + "'";
            using (MySqlDataReader reader = cmd.ExecuteReader())
            {
                while (reader.Read())
                {
                    string asuult;
                    asuult = reader.GetString(1);
                    string wordWrappedText = WordWrap(asuult, 55);
                    label2.Text = wordWrappedText;
                    label4.Text =  reader.GetString(2);
                    label5.Text =  reader.GetString(3);
                    label6.Text =  reader.GetString(4);
                    label7.Text =  reader.GetString(5);
                    Class1.b = reader.GetString(6);
                    label1.Text = "30";
                    Random rnd = new Random();
                    int r = rnd.Next(1, 4);
                    switch (r)
                    {
                        case 1:
                            wplayer2.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\asuult_start1.mp3";
                            break;
                        case 2:
                            wplayer2.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\asuult_start2.mp3";
                            break;
                        case 3:
                            wplayer2.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\asuult_start3.mp3";
                            break;
                    }
                    double time = wplayer2.controls.currentPosition;
                    wplayer2.controls.play();
                    timer1.Start();
                    
                }
            }
            label4.ForeColor = Color.White;
            label5.ForeColor = Color.White;
            label6.ForeColor = Color.White;
            label7.ForeColor = Color.White;
            label9.Text = "A";
            label11.Text = "B";
            label8.Text = "C";
            label10.Text = "D";
            if (Class1.g == "1")
            {
                label40.Visible = false;
                label41.Visible = false;
                label42.Visible = false;
                label43.Visible = false;
                label44.Visible = false;
                label45.Visible = false;
                label46.Visible = false;
                label47.Visible = false;
            }
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            if (Convert.ToInt32(label1.Text) > 0)
            {
                if (Convert.ToInt32(label1.Text) < 11)
                {
                    wplayer7.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\tsag1.mp3";
                    double time = wplayer7.controls.currentPosition;
                    wplayer7.controls.play();
                    label1.ForeColor = Color.Yellow;
                    if (Convert.ToInt32(label1.Text) < 5)
                    {
                        if (Convert.ToInt32(label1.Text) < 2)
                        {
                            label1.ForeColor = Color.Red;
                            wplayer7.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\tsag3.mp3";
                            time = wplayer7.controls.currentPosition;
                            wplayer7.controls.play();
                        }
                        else
                        {
                            label1.ForeColor = Color.Red;
                            wplayer7.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\tsag2.mp3";
                            time = wplayer7.controls.currentPosition;
                            wplayer7.controls.play();
                        }
                    }
                }
                label1.Text = Convert.ToString(Convert.ToInt32(label1.Text) - 1);
            }
            else
            {
                Class1.i = "1";
                timer1.Stop();
                label3.Text = "Цаг дууслаа";
                switch (Class1.b)
                {
                    case "A":
                        label4.ForeColor = Color.Green;
                        break;
                    case "B":
                        label5.ForeColor = Color.Green;
                        break;
                    case "C":
                        label6.ForeColor = Color.Green;
                        break;
                    case "D":
                        label7.ForeColor = Color.Green;
                        break;
                }
                money();
                if (Convert.ToInt32(Class1.e) < 10000)
                    Class1.e = "0";
                else
                {
                    if (Convert.ToInt32(Class1.e) < 150000)
                        Class1.e = "10000";
                    else if (Convert.ToInt32(Class1.e) < 1000000)
                        Class1.e = "150000";
                }
                finish f = new finish();
                f.ShowDialog();
                if (Class1.d == "1")
                {
                    timer1.Enabled = true;
                    timer1.Start();
                    pictureBox1.Enabled = true;
                    pictureBox2.Enabled = true;
                    pictureBox3.Enabled = true;
                    label3.Text = "Цаг :";
                    label14.Text = "0";
                    label16.Text = "0";
                    position = 0;
                    fresh();
                    label39.Visible = false;
                    label48.Visible = false;
                    label49.Visible = false;
                    asuult();
                    label1.Text = Convert.ToString(Convert.ToInt32(label1.Text) - 1);
                }
                else
                {
                    this.Hide();
                    this.Close();
                }

            }
            if (Convert.ToInt32(label1.Text) == 30)
            {
                timer1.Stop();
                ner n = new ner();
                n.ShowDialog();
                if (Class1.a == "Таны нэр")
                {
                    label12.Text = "Нэр байхгүй";
                    Class1.a = "Нэр байхгүй";
                }
                else
                    label12.Text = Class1.a;
            }
        }

        private void OnKeyDownHandler(object sender, KeyEventArgs e)
        {
            if (Control.ModifierKeys == Keys.A)
            {
                A();
            }
            if (Control.ModifierKeys == Keys.B)
            {
                B();
            }
            if (Control.ModifierKeys == Keys.C)
            {
                C();
            }
            if (Control.ModifierKeys == Keys.D)
            {
                D();
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {

        }
        public void saytanAdd()
        {
            string count = "0";
            MySqlConnection conn = new MySqlConnection("Server=localhost; database=saytan; UID=root; CHARSET=utf8;");
            conn.Open();
            string query = "SELECT COUNT(`Name`)  FROM saytan  WHERE `Name` = '" +  Class1.a + "'";
            MySqlCommand cmd = new MySqlCommand(query, conn);
            MySqlDataReader reader = cmd.ExecuteReader();
            reader.Read();
            count = reader.GetString(0);
            reader.Close();
            if (count == "0")
            {
                query = "INSERT INTO saytan VALUES('"+Class1.a+"','"+1+"') " ;
                MySqlDataAdapter adapter = new MySqlDataAdapter(query, "Server=localhost; database=saytan; UID=root;CHARSET=utf8;");
                DataSet DS = new DataSet();
                DS.Clear();
                adapter.Fill(DS);
            }
            else
            {
                query = "SELECT Too FROM saytan  WHERE `Name` = '" + Class1.a + "'";
                cmd = new MySqlCommand(query, conn);
                reader = cmd.ExecuteReader();
                reader.Read();
                count = reader.GetString(0);
                reader.Close();
                count = Convert.ToString(Convert.ToInt32(count) + 1);
                query = "UPDATE saytan SET Name = '" + Class1.a + "',Too = '"+ count + "' WHERE Name ='" + Class1.a + "'";
                cmd = new MySqlCommand(query, conn);
                cmd.ExecuteNonQuery();
                conn.Close();
            }
        }
        public void A()
        {
            label4.ForeColor = Color.Orange;
            wplayer2.controls.pause();
            wplayer3.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\mouse_click.mp3";
            wplayer3.controls.play();
            if (position % 2 == 0)
            {
                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\itgeltei.3ga";
                wplayer1.controls.play();
            }
            else
            {
                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\itgeltei2.3ga";
                wplayer1.controls.play();
            }
            itgeltei it = new itgeltei();
            it.ShowDialog();
            if (Class1.c == "1")
            {
                if (Class1.b == label9.Text)
                {
                    if (position == 14)
                    {
                        timer1.Stop();
                        up();
                        saytanAdd();
                        label4.ForeColor = Color.Green;
                        say s = new say();
                        s.ShowDialog();
                        Class1.e = "0";
                        label4.ForeColor = Color.White;
                        if (Class1.d == "1")
                        {
                            position = 0;
                            fresh();
                            label39.Visible = false;
                            label48.Visible = false;
                            label49.Visible = false;
                            pictureBox1.Enabled = true;
                            pictureBox2.Enabled = true;
                            pictureBox3.Enabled = true;
                            label14.Text = "0";
                            label16.Text = "0";
                            c = 0;
                            wplayer.controls.stop();
                            timer7.Start();
                            wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\game_start1.mp3";
                            double time1 = wplayer1.controls.currentPosition;
                            wplayer1.controls.play();
                            label2.Text = "Тоглолт дахин эхэллээ. Танд амжилт хүсье.";
                            label4.Text = "";
                            label5.Text = "";
                            label6.Text = "";
                            label7.Text = "";
                            label8.Text = "";
                            label9.Text = "";
                            label10.Text = "";
                            label11.Text = "";
                        }
                        else
                        {
                            this.Hide();
                            this.Close();
                        }
                    }
                    else
                    {
                        wplayer4.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\zuw_hariult.mp3";
                        double time = wplayer4.controls.currentPosition;
                        wplayer4.controls.play();
                        switch (position)
                        {
                            case 0:
                            case 7:
                                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\bolj.3ga";
                                wplayer1.controls.play();
                                break;
                            case 2:
                            case 8:
                                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\sain.3ga";
                                wplayer1.controls.play();
                                break;
                            case 1:
                                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\owoo.3ga";
                                wplayer1.controls.play();
                                break;
                            case 3:
                            case 9:
                                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\ok.3ga";
                                wplayer1.controls.play();
                                break;
                            case 4:
                                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\yaya.3ga";
                                wplayer1.controls.play();
                                break;
                            case 5:
                            case 10:
                                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\uneheer.3ga";
                                wplayer1.controls.play();
                                break;
                            case 6:
                                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\tanii.3ga";
                                wplayer1.controls.play();
                                break;
                        }
                        label16.Text = Convert.ToString(Convert.ToInt32(label16.Text) + 1);
                        timer1.Stop();
                        second = 4;
                        timer2.Start();
                        label15.Visible = true;
                        label16.Visible = true;
                    }
                }
                else
                {
                    wplayer5.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\buruu_hariult.mp3";
                    double time = wplayer5.controls.currentPosition;
                    wplayer5.controls.play();
                    label4.ForeColor = Color.Red;
                    switch (Class1.b)
                    {
                        case "A":
                            label4.ForeColor = Color.Green;
                            break;
                        case "B":
                            label5.ForeColor = Color.Green;
                            break;
                        case "C":
                            label6.ForeColor = Color.Green;
                            break;
                        case "D":
                            label7.ForeColor = Color.Green;
                            break;
                    }
                    money();
                    switch (position)
                    {
                        case 0:
                        case 1:
                             wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\buruu_hariult2.3ga";
                             wplayer1.controls.play();
                            break;
                        case 2:
                             wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\buruu_hariult3.3ga";
                             wplayer1.controls.play();
                            break;
                        case 3:
                        case 4:
                            wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\buruu_hariult6.3ga";
                            wplayer1.controls.play();
                            break;
                        case 6:
                        case 5:
                            wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\buruu_hariult5.3ga";
                            wplayer1.controls.play();
                            break;
                        case 7:
                        case 8:
                        case 9:
                        case 10:
                            wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\buruu_hariult4.3ga";
                            wplayer1.controls.play();
                            break;
                    }
                    timer1.Stop();
                    if (Convert.ToInt32(Class1.e) < 10000)
                        Class1.e = "0";
                    else
                    {
                        if (Convert.ToInt32(Class1.e) < 150000)
                            Class1.e = "10000";
                        else if (Convert.ToInt32(Class1.e) < 1000000)
                            Class1.e = "150000";
                    }
                    finish f = new finish();
                    f.ShowDialog();
                    Class1.e = "0";
                    label4.ForeColor = Color.White;
                    if (Class1.d == "1")
                    {
                        position = 0;
                        fresh();
                        label39.Visible = false;
                        label48.Visible = false;
                        label49.Visible = false;
                        pictureBox1.Enabled = true;
                        pictureBox2.Enabled = true;
                        pictureBox3.Enabled = true;
                        label14.Text = "0";
                        label16.Text = "0";
                        c = 0;
                        wplayer.controls.stop();
                        timer7.Start();
                        wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\game_start1.mp3";
                        time = wplayer1.controls.currentPosition;
                        wplayer1.controls.play();
                        label2.Text = "Тоглолт дахин эхэллээ. Танд амжилт хүсье.";
                        label4.Text = "";
                        label5.Text = "";
                        label6.Text = "";
                        label7.Text = "";
                        label8.Text = "";
                        label9.Text = "";
                        label10.Text = "";
                        label11.Text = "";
                    }
                    else
                    {
                        this.Hide();
                        this.Close();
                    }
                }
            }
            else
            {
                label4.ForeColor = Color.White;
                wplayer3.controls.stop();
                wplayer2.controls.play();
            }
        }
        public void B()
        {
            label5.ForeColor = Color.Orange;
            wplayer2.controls.stop();
            wplayer3.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\mouse_click.mp3";
            wplayer3.controls.play();
            if (position % 2 == 0)
            {
                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\itgeltei.3ga";
                wplayer1.controls.play();
            }
            else
            {
                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\itgeltei2.3ga";
                wplayer1.controls.play();
            }
            itgeltei it = new itgeltei();
            it.ShowDialog();
            if (Class1.c == "1")
            {
                if (Class1.b == label11.Text)
                {
                    if (position == 14)
                    {
                        timer1.Stop();
                        up();
                        saytanAdd();
                        label5.ForeColor = Color.Green;
                        say s = new say();
                        s.ShowDialog();
                        Class1.e = "0";
                        label5.ForeColor = Color.White;
                        if (Class1.d == "1")
                        {
                            position = 0;
                            fresh();
                            label39.Visible = false;
                            label48.Visible = false;
                            label49.Visible = false;
                            pictureBox1.Enabled = true;
                            pictureBox2.Enabled = true;
                            pictureBox3.Enabled = true;
                            label14.Text = "0";
                            label16.Text = "0";
                            c = 0;
                            wplayer.controls.stop();
                            timer7.Start();
                            wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\game_start1.mp3";
                            double time1 = wplayer1.controls.currentPosition;
                            wplayer1.controls.play();
                            label2.Text = "Тоглолт дахин эхэллээ. Танд амжилт хүсье.";
                            label4.Text = "";
                            label5.Text = "";
                            label6.Text = "";
                            label7.Text = "";
                            label8.Text = "";
                            label9.Text = "";
                            label10.Text = "";
                            label11.Text = "";
                        }
                        else
                        {
                            this.Hide();
                            this.Close();
                        }
                    }
                    else
                    {
                        label16.Text = Convert.ToString(Convert.ToInt32(label16.Text) + 1);
                        timer1.Stop();
                        wplayer4.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\zuw_hariult.mp3";
                        double time = wplayer4.controls.currentPosition;
                        wplayer4.controls.play();
                        switch (position)
                        {
                            case 0:
                            case 7:
                                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\bolj.3ga";
                                wplayer1.controls.play();
                                break;
                            case 2:
                            case 8:
                                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\sain.3ga";
                                wplayer1.controls.play();
                                break;
                            case 1:
                                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\owoo.3ga";
                                wplayer1.controls.play();
                                break;
                            case 3:
                            case 9:
                                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\ok.3ga";
                                wplayer1.controls.play();
                                break;
                            case 4:
                                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\yaya.3ga";
                                wplayer1.controls.play();
                                break;
                            case 5:
                            case 10:
                                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\uneheer.3ga";
                                wplayer1.controls.play();
                                break;
                            case 6:
                                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\tanii.3ga";
                                wplayer1.controls.play();
                                break;
                        }
                        second = 4;
                        timer3.Start();
                        label15.Visible = true;
                        label16.Visible = true;
                    }
                }
                else
                {
                    wplayer5.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\buruu_hariult.mp3";
                    double time = wplayer5.controls.currentPosition;
                    wplayer5.controls.play();
                    label5.ForeColor = Color.Red;
                    switch (Class1.b)
                    {
                        case "A":
                            label4.ForeColor = Color.Green;
                            break;
                        case "B":
                            label5.ForeColor = Color.Green;
                            break;
                        case "C":
                            label6.ForeColor = Color.Green;
                            break;
                        case "D":
                            label7.ForeColor = Color.Green;
                            break;
                    }
                    money();
                    switch (position)
                    {
                        case 0:
                        case 1:
                            wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\buruu_hariult2.3ga";
                            wplayer1.controls.play();
                            break;
                        case 2:
                            wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\buruu_hariult3.3ga";
                            wplayer1.controls.play();
                            break;
                        case 3:
                        case 4:
                            wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\buruu_hariult6.3ga";
                            wplayer1.controls.play();
                            break;
                        case 6:
                        case 5:
                            wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\buruu_hariult5.3ga";
                            wplayer1.controls.play();
                            break;
                        case 7:
                        case 8:
                        case 9:
                        case 10:
                            wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\buruu_hariult4.3ga";
                            wplayer1.controls.play();
                            break;
                    }
                    timer1.Stop();
                    if (Convert.ToInt32(Class1.e) < 10000)
                        Class1.e = "0";
                    else
                    {
                        if (Convert.ToInt32(Class1.e) < 150000)
                            Class1.e = "10000";
                        else if (Convert.ToInt32(Class1.e) < 1000000)
                            Class1.e = "150000";
                    }
                    finish f = new finish();
                    f.ShowDialog();
                    Class1.e = "0";
                    label5.ForeColor = Color.White;
                    if (Class1.d == "1")
                    {
                        position = 0;
                        fresh();
                        label39.Visible = false;
                        label48.Visible = false;
                        label49.Visible = false;
                        pictureBox1.Enabled = true;
                        pictureBox2.Enabled = true;
                        pictureBox3.Enabled = true;
                        c = 0;
                        wplayer.controls.stop();
                        timer7.Start();
                        wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\game_start1.mp3";
                        time = wplayer1.controls.currentPosition;
                        wplayer1.controls.play();
                        label14.Text = "0";
                        label16.Text = "0";
                        label2.Text = "Тоглолт дахин эхэллээ. Танд амжилт хүсье.";
                        label4.Text = "";
                        label5.Text = "";
                        label6.Text = "";
                        label7.Text = "";
                        label8.Text = "";
                        label9.Text = "";
                        label10.Text = "";
                        label11.Text = "";
                    }
                    else
                    {
                        this.Hide();
                        this.Close();
                    }
                }
            }
            else
            {
                label5.ForeColor = Color.White;
                wplayer2.controls.play();
                wplayer3.controls.stop();
            }
        }
        public void C()
        {
            label6.ForeColor = Color.Orange;
            wplayer2.controls.stop();
            wplayer3.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\mouse_click.mp3";
            wplayer3.controls.play();
            if (position % 2 == 0)
            {
                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\itgeltei.3ga";
                wplayer1.controls.play();
            }
            else
            {
                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\itgeltei2.3ga";
                wplayer1.controls.play();
            }
            itgeltei it = new itgeltei();
            it.ShowDialog();
            if (Class1.c == "1")
            {
                if (Class1.b == label8.Text)
                {
                    if (position == 14)
                    {
                        timer1.Stop();
                        up();
                        saytanAdd();
                        label6.ForeColor = Color.Green;
                        say s = new say();
                        s.ShowDialog();
                        Class1.e = "0";
                        label6.ForeColor = Color.White;
                        if (Class1.d == "1")
                        {
                            position = 0;
                            fresh();
                            label39.Visible = false;
                            label48.Visible = false;
                            label49.Visible = false;
                            pictureBox1.Enabled = true;
                            pictureBox2.Enabled = true;
                            pictureBox3.Enabled = true;
                            label14.Text = "0";
                            label16.Text = "0";
                            c = 0;
                            wplayer.controls.stop();
                            timer7.Start();
                            wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\game_start1.mp3";
                            double time1 = wplayer1.controls.currentPosition;
                            wplayer1.controls.play();
                            label2.Text = "Тоглолт дахин эхэллээ. Танд амжилт хүсье.";
                            label4.Text = "";
                            label5.Text = "";
                            label6.Text = "";
                            label7.Text = "";
                            label8.Text = "";
                            label9.Text = "";
                            label10.Text = "";
                            label11.Text = "";
                        }
                        else
                        {
                            this.Hide();
                            this.Close();
                        }
                    }
                    else
                    {
                        label16.Text = Convert.ToString(Convert.ToInt32(label16.Text) + 1);
                        timer1.Stop();
                        wplayer4.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\zuw_hariult.mp3";
                        double time = wplayer4.controls.currentPosition;
                        wplayer4.controls.play();
                        switch (position)
                        {
                            case 0:
                            case 7:
                                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\bolj.3ga";
                                wplayer1.controls.play();
                                break;
                            case 2:
                            case 8:
                                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\sain.3ga";
                                wplayer1.controls.play();
                                break;
                            case 1:
                                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\owoo.3ga";
                                wplayer1.controls.play();
                                break;
                            case 3:
                            case 9:
                                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\ok.3ga";
                                wplayer1.controls.play();
                                break;
                            case 4:
                                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\yaya.3ga";
                                wplayer1.controls.play();
                                break;
                            case 5:
                            case 10:
                                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\uneheer.3ga";
                                wplayer1.controls.play();
                                break;
                            case 6:
                                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\tanii.3ga";
                                wplayer1.controls.play();
                                break;
                        }
                        second = 4;
                        timer4.Start();
                        label15.Visible = true;
                        label16.Visible = true;
                    }
                }
                else
                {
                    wplayer5.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\buruu_hariult.mp3";
                    double time = wplayer5.controls.currentPosition;
                    wplayer5.controls.play();
                    label6.ForeColor = Color.Red;
                    switch (Class1.b)
                    {
                        case "A":
                            label4.ForeColor = Color.Green;
                            break;
                        case "B":
                            label5.ForeColor = Color.Green;
                            break;
                        case "C":
                            label6.ForeColor = Color.Green;
                            break;
                        case "D":
                            label7.ForeColor = Color.Green;
                            break;
                    }
                    money();
                    switch (position)
                    {
                        case 0:
                        case 1:
                            wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\buruu_hariult2.3ga";
                            wplayer1.controls.play();
                            break;
                        case 2:
                            wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\buruu_hariult3.3ga";
                            wplayer1.controls.play();
                            break;
                        case 3:
                        case 4:
                            wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\buruu_hariult6.3ga";
                            wplayer1.controls.play();
                            break;
                        case 6:
                        case 5:
                            wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\buruu_hariult5.3ga";
                            wplayer1.controls.play();
                            break;
                        case 7:
                        case 8:
                        case 9:
                        case 10:
                            wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\buruu_hariult4.3ga";
                            wplayer1.controls.play();
                            break;
                    }
                    timer1.Stop();
                    if (Convert.ToInt32(Class1.e) < 10000)
                        Class1.e = "0";
                    else
                    {
                        if (Convert.ToInt32(Class1.e) < 150000)
                            Class1.e = "10000";
                        else if (Convert.ToInt32(Class1.e) < 1000000)
                            Class1.e = "150000";
                    }
                    finish f = new finish();
                    f.ShowDialog();
                    Class1.e = "0";
                    label6.ForeColor = Color.White;
                    if (Class1.d == "1")
                    {
                        position = 0;
                        label14.Text = "0";
                        label16.Text = "0";
                        label39.Visible = false;
                        label48.Visible = false;
                        label49.Visible = false;
                        fresh();
                        pictureBox1.Enabled = true;
                        pictureBox2.Enabled = true;
                        pictureBox3.Enabled = true;
                        c = 0;
                        wplayer.controls.stop();
                        timer7.Start();
                        wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\game_start1.mp3";
                         time = wplayer1.controls.currentPosition;
                        wplayer1.controls.play();
                        label2.Text = "Тоглолт дахин эхэллээ. Танд амжилт хүсье.";
                        label4.Text = "";
                        label5.Text = "";
                        label6.Text = "";
                        label7.Text = "";
                        label8.Text = "";
                        label9.Text = "";
                        label10.Text = "";
                        label11.Text = "";
                    }
                    else
                    {
                        this.Hide();
                        this.Close();
                    }
                }
            }
            else
            {
                label6.ForeColor = Color.White;
                wplayer2.controls.play();
                wplayer3.controls.stop();
            }
        }
        public void D()
        {
            label7.ForeColor = Color.Orange;
            wplayer2.controls.stop();
            wplayer3.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\mouse_click.mp3";
            wplayer3.controls.play();
            if (position % 2 == 0)
            {
                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\itgeltei.3ga";
                wplayer1.controls.play();
            }
            else
            {
                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\itgeltei2.3ga";
                wplayer1.controls.play();
            }
            itgeltei it = new itgeltei();
            it.ShowDialog();
            if (Class1.c == "1")
            {
                if (Class1.b == label10.Text)
                {
                    if (position == 14)
                    {
                        timer1.Stop();
                        up();
                        saytanAdd();
                        label7.ForeColor = Color.Green;
                        say s = new say();
                        s.ShowDialog();
                        Class1.e = "0";
                        label7.ForeColor = Color.White;
                        if (Class1.d == "1")
                        {
                            position = 0;
                            fresh();
                            label39.Visible = false;
                            label48.Visible = false;
                            label49.Visible = false;
                            pictureBox1.Enabled = true;
                            pictureBox2.Enabled = true;
                            pictureBox3.Enabled = true;
                            label14.Text = "0";
                            label16.Text = "0";
                            c = 0;
                            wplayer.controls.stop();
                            timer7.Start();
                            wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\game_start1.mp3";
                            double time1 = wplayer1.controls.currentPosition;
                            wplayer1.controls.play();
                            label2.Text = "Тоглолт дахин эхэллээ. Танд амжилт хүсье.";
                            label4.Text = "";
                            label5.Text = "";
                            label6.Text = "";
                            label7.Text = "";
                            label8.Text = "";
                            label9.Text = "";
                            label10.Text = "";
                            label11.Text = "";
                        }
                        else
                        {
                            this.Hide();
                            this.Close();
                        }
                    }
                    else
                    {
                        label16.Text = Convert.ToString(Convert.ToInt32(label16.Text) + 1);
                        timer1.Stop();
                        wplayer4.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\zuw_hariult.mp3";
                        double time = wplayer4.controls.currentPosition;
                        wplayer4.controls.play();
                        switch (position)
                        {
                            case 0:
                            case 7:
                                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\bolj.3ga";
                                wplayer1.controls.play();
                                break;
                            case 2:
                            case 8:
                                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\sain.3ga";
                                wplayer1.controls.play();
                                break;
                            case 1:
                                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\owoo.3ga";
                                wplayer1.controls.play();
                                break;
                            case 3:
                            case 9:
                                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\ok.3ga";
                                wplayer1.controls.play();
                                break;
                            case 4:
                                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\yaya.3ga";
                                wplayer1.controls.play();
                                break;
                            case 5:
                            case 10:
                                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\uneheer.3ga";
                                wplayer1.controls.play();
                                break;
                            case 6:
                                wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\tanii.3ga";
                                wplayer1.controls.play();
                                break;
                        }
                        second = 4;
                        timer5.Start();
                        label15.Visible = true;
                        label16.Visible = true;
                    }
                }
                else
                {
                    wplayer5.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\buruu_hariult.mp3";
                    double time1 = wplayer5.controls.currentPosition;
                    wplayer5.controls.play();
                    label7.ForeColor = Color.Red;
                    switch (Class1.b)
                    {
                        case "A":
                            label4.ForeColor = Color.Green;
                            break;
                        case "B":
                            label5.ForeColor = Color.Green;
                            break;
                        case "C":
                            label6.ForeColor = Color.Green;
                            break;
                        case "D":
                            label7.ForeColor = Color.Green;
                            break;
                    }
                    money();
                    switch (position)
                    {
                        case 0:
                        case 1:
                            wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\buruu_hariult2.3ga";
                            wplayer1.controls.play();
                            break;
                        case 2:
                            wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\buruu_hariult3.3ga";
                            wplayer1.controls.play();
                            break;
                        case 3:
                        case 4:
                            wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\buruu_hariult6.3ga";
                            wplayer1.controls.play();
                            break;
                        case 6:
                        case 5:
                            wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\buruu_hariult5.3ga";
                            wplayer1.controls.play();
                            break;
                        case 7:
                        case 8:
                        case 9:
                        case 10:
                            wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\buruu_hariult4.3ga";
                            wplayer1.controls.play();
                            break;
                    }
                    timer1.Stop();
                    if(Convert.ToInt32(Class1.e )< 10000)
                        Class1.e = "0";
                    else
                    {
                        if (Convert.ToInt32(Class1.e) < 150000)
                            Class1.e = "10000";
                        else if (Convert.ToInt32(Class1.e) < 1000000)
                            Class1.e = "150000";
                    }
                    finish f = new finish();
                    f.ShowDialog();
                    Class1.e = "0";
                    label7.ForeColor = Color.White;
                    if (Class1.d == "1")
                    {
                        position = 0;
                        pictureBox1.Enabled = true;
                        pictureBox2.Enabled = true;
                        pictureBox3.Enabled = true;
                        label39.Visible = false;
                        label48.Visible = false;
                        label49.Visible = false;
                        fresh();
                        c = 0;
                        wplayer.controls.stop();
                        timer7.Start();
                        wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\game_start1.mp3";
                        double time = wplayer1.controls.currentPosition;
                        wplayer1.controls.play();
                        label14.Text = "0";
                        label16.Text = "0";
                        label2.Text = "Тоглолт дахин эхэллээ. Танд амжилт хүсье.";
                        label4.Text = "";
                        label5.Text = "";
                        label6.Text = "";
                        label7.Text = "";
                        label8.Text = "";
                        label9.Text = "";
                        label10.Text = "";
                        label11.Text = "";
                    }
                    else
                    {
                        this.Hide();
                        this.Close();
                    }
                }
            }
            else
            {
                label7.ForeColor = Color.White;
                wplayer2.controls.play();
                wplayer3.controls.stop();
            }
        }

        private void label5_Click(object sender, EventArgs e)
        {
            if (label5.Text == "Тоглох заавар")
            {
                wplayer.controls.stop();
                zaavar z = new zaavar();
                z.ShowDialog();
            }
            else
            B();
        }

        private void label9_Click(object sender, EventArgs e)
        {
            A();
        }

        private void label11_Click(object sender, EventArgs e)
        {
            B();
        }

        private void label8_Click(object sender, EventArgs e)
        {
            C();
        }

        private void label6_Click(object sender, EventArgs e)
        {
            if (label6.Text == "Тоглоомын тухай")
            {
                wplayer.controls.stop();
                tuhai t = new tuhai();
                t.ShowDialog();
            }
            else
            C();
        }

        private void label10_Click(object sender, EventArgs e)
        {
            D();
        }

        private void label7_Click(object sender, EventArgs e)
        {
            if (label7.Text == "Дээд амжилт")
            {
                wplayer.controls.stop();
                deed d = new deed();
                d.ShowDialog();
            }
            else
            D();
        }
        int second = 6;
        private void timer2_Tick(object sender, EventArgs e)
        {
            label5.Enabled = false;
            label6.Enabled = false;
            label7.Enabled = false;
            label4.ForeColor = Color.Green;
            if (second % 2 == 1)
            {
                label4.ForeColor = Color.GreenYellow;
                label15.ForeColor = Color.GreenYellow;
            }
            else
            {
                label4.ForeColor = Color.Green;
                label15.ForeColor = Color.Green;
            }
            second = second-1;
            if (second == 3)
            {
                wplayer4.controls.stop();
                wplayer4.controls.play();
            }
            if (second == 1)
                up();
            if (second <1)
            {
                label5.Enabled = true;
                label6.Enabled = true;
                label7.Enabled = true;
                label15.Visible = false;
                label16.Visible = false;
                timer2.Stop();
                label4.ForeColor = Color.White;
                munguu m = new munguu();
                m.ShowDialog();
                if (Class1.f == "1")
                {
                    asuult();
                }
                else 
                {
                    money();
                    timer1.Stop();
                    finish f = new finish();
                    f.ShowDialog();
                    label7.ForeColor = Color.White;
                    if (Class1.d == "1")
                    {
                        wplayer4.controls.play();
                        position = 0;
                        label39.Visible = false;
                        label48.Visible = false;
                        label49.Visible = false;
                        pictureBox1.Enabled = true;
                        pictureBox2.Enabled = true;
                        pictureBox3.Enabled = true;
                        fresh();
                        c = 0;
                        wplayer.controls.stop();
                        timer7.Start();
                        wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\game_start1.mp3";
                        double time = wplayer1.controls.currentPosition;
                        wplayer1.controls.play();
                        label14.Text = "0";
                        label16.Text = "0";
                        label2.Text = "Тоглолт дахин эхэллээ. Танд амжилт хүсье.";
                        label4.Text = "";
                        label5.Text = "";
                        label6.Text = "";
                        label7.Text = "";
                        label8.Text = "";
                        label9.Text = "";
                        label10.Text = "";
                        label11.Text = "";
                        label14.Text = "0";
                        label16.Text = "0";
                    }
                    else
                    {
                        this.Hide();
                        this.Close();
                    }
                }
            }
        }

        private void timer3_Tick(object sender, EventArgs e)
        {
            label4.Enabled = false;
            label6.Enabled = false;
            label7.Enabled = false;
            label5.ForeColor = Color.Green;
            if (second % 2 == 1)
            {
                label5.ForeColor = Color.GreenYellow;
                label15.ForeColor = Color.GreenYellow;
            }
            else
            {
                label5.ForeColor = Color.Green;
                label15.ForeColor = Color.Green;
            }
            second = second - 1;
            if (second == 3)
            {
                wplayer4.controls.stop();
                wplayer4.controls.play();
            }
            if (second == 1)
                up();
            if (second < 1)
            {
                label4.Enabled = true;
                label6.Enabled = true;
                label7.Enabled = true;
                label15.Visible = false;
                label16.Visible = false;
                timer3.Stop();
                label5.ForeColor = Color.White;
                munguu m = new munguu();
                m.ShowDialog();
                if (Class1.f == "1")
                {
                    asuult();
                }
                else
                {
                    money();
                    timer1.Stop();
                    finish f = new finish();
                    f.ShowDialog();
                    if (Class1.d == "1")
                    {
                        position = 0;
                        label39.Visible = false;
                        label48.Visible = false;
                        label49.Visible = false;
                        pictureBox1.Enabled = true;
                        pictureBox2.Enabled = true;
                        pictureBox3.Enabled = true;
                        fresh();
                        c = 0;
                        wplayer.controls.stop();
                        timer7.Start();
                        wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\game_start1.mp3";
                        double time = wplayer1.controls.currentPosition;
                        wplayer1.controls.play();
                        label14.Text = "0";
                        label16.Text = "0";
                        label2.Text = "Тоглолт дахин эхэллээ. Танд амжилт хүсье.";
                        label4.Text = "";
                        label5.Text = "";
                        label6.Text = "";
                        label7.Text = "";
                        label8.Text = "";
                        label9.Text = "";
                        label10.Text = "";
                        label11.Text = "";
                        label14.Text = "0";
                        label16.Text = "0";

                    }
                    else
                    {
                        this.Hide();
                        this.Close();
                    }
                }
            }
        }

        private void timer4_Tick(object sender, EventArgs e)
        {
            label4.Enabled = false;
            label5.Enabled = false;
            label7.Enabled = false;
            label6.ForeColor = Color.Green;
            if (second % 2 == 1)
            {
                label6.ForeColor = Color.GreenYellow;
                label15.ForeColor = Color.GreenYellow;
            }
            else
            {
                label6.ForeColor = Color.Green;
                label15.ForeColor = Color.Green;
            }
            second = second - 1;
            if (second == 3)
            {
                wplayer4.controls.stop();
                wplayer4.controls.play();
            }
            if (second == 1)
                up();
            if (second < 1)
            {
                label4.Enabled = true;
                label5.Enabled = true;
                label7.Enabled = true;
                label15.Visible = false;
                label16.Visible = false;
                timer4.Stop();
                label6.ForeColor = Color.White;
                munguu m = new munguu();
                m.ShowDialog();
                if (Class1.f == "1")
                {
                    asuult();
                }
                else
                {
                    money();
                    timer1.Stop();
                    finish f = new finish();
                    f.ShowDialog();
                    if (Class1.d == "1")
                    {
                        position = 0;
                        label39.Visible = false;
                        label48.Visible = false;
                        label49.Visible = false;
                        pictureBox1.Enabled = true;
                        pictureBox2.Enabled = true;
                        pictureBox3.Enabled = true;
                        fresh();
                        c = 0;
                        wplayer.controls.stop();
                        timer7.Start();
                        wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\game_start1.mp3";
                        double time = wplayer1.controls.currentPosition;
                        wplayer1.controls.play();
                        label14.Text = "0";
                        label16.Text = "0";
                        label2.Text = "Тоглолт дахин эхэллээ. Танд амжилт хүсье.";
                        label4.Text = "";
                        label5.Text = "";
                        label6.Text = "";
                        label7.Text = "";
                        label8.Text = "";
                        label9.Text = "";
                        label10.Text = "";
                        label11.Text = "";
                        label14.Text = "0";
                        label16.Text = "0";
                    }
                    else
                    {
                        this.Hide();
                        this.Close();
                    }
                }
            }
        }

        private void timer5_Tick(object sender, EventArgs e)
        {
            label4.Enabled = false;
            label5.Enabled = false;
            label6.Enabled = false;
            label7.ForeColor = Color.Green;
            if (second % 2 == 1)
            {
                label7.ForeColor = Color.GreenYellow;
                label15.ForeColor = Color.GreenYellow;
            }
            else
            {
                label7.ForeColor = Color.Green;
                label15.ForeColor = Color.Green;
            }
            second = second - 1;
            if (second == 3)
            {
                wplayer4.controls.stop();
                wplayer4.controls.play();
            }
            if (second == 1)
                up();
            if (second < 1)
            {
                label4.Enabled = true;
                label5.Enabled = true;
                label6.Enabled = true;
                label15.Visible = false;
                label16.Visible = false;
                timer5.Stop();
                label7.ForeColor = Color.White;
                munguu m = new munguu();
                m.ShowDialog();
                if (Class1.f == "1")
                {
                    asuult();
                }
                else
                {
                    money();
                    timer1.Stop();
                    finish f = new finish();
                    f.ShowDialog();
                    if (Class1.d == "1")
                    {
                        position = 0;
                        label39.Visible = false;
                        label48.Visible = false;
                        label49.Visible = false;
                        pictureBox1.Enabled = true;
                        pictureBox2.Enabled = true;
                        pictureBox3.Enabled = true;
                        fresh();
                        c = 0;
                        wplayer.controls.stop();
                        timer7.Start();
                        wplayer1.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\game_start1.mp3";
                        double time = wplayer1.controls.currentPosition;
                        wplayer1.controls.play();
                        label2.Text = "Тоглолт дахин эхэллээ. Танд амжилт хүсье.";
                        label4.Text = "";
                        label5.Text = "";
                        label6.Text = "";
                        label7.Text = "";
                        label8.Text = "";
                        label9.Text = "";
                        label10.Text = "";
                        label11.Text = "";
                        label14.Text = "0";
                        label16.Text = "0";
                    }
                    else
                    {
                        this.Hide();
                        this.Close();
                    }
                }
            }
        }

        private void timer6_Tick(object sender, EventArgs e)
        {
            if (label32.ForeColor == Color.Green)
            {
                label32.ForeColor = Color.Blue;
                label33.ForeColor = Color.Blue;
                label34.ForeColor = Color.Blue;
            }
            else
            {
                if (label32.ForeColor == Color.Blue)
                {
                    label32.ForeColor = Color.Red;
                    label33.ForeColor = Color.Red;
                    label34.ForeColor = Color.Red;
                }
                else
                {
                    label32.ForeColor = Color.Green;
                    label33.ForeColor = Color.Green;
                    label34.ForeColor = Color.Green;
                }
            }
        }
        public void up()
        {
            position++;
            switch (position)
            {
                case 1:
                    label18.Text = "500";
                    label18.ForeColor = Color.Green;
                    break;
                case 2:
                    label18.Text = "500";
                    label18.ForeColor = Color.Chocolate;
                    label19.Text = "1 000";
                    label19.ForeColor = Color.Green;
                    break;
                case 3:
                    label19.Text = "1 000";
                    label19.ForeColor = Color.Chocolate;
                    label20.Text = "3 000";
                    label20.ForeColor = Color.Green;
                    break;
                case 4:
                    label20.Text = "3 000";
                    label20.ForeColor = Color.Chocolate;
                    label21.Text = "5 000";
                    label21.ForeColor = Color.Green;
                    break;
                case 5:
                    label21.Text = "5 000";
                    label21.ForeColor = Color.Chocolate;
                    label22.Text = "10 000";
                    label22.ForeColor = Color.Green;
                    break;
                case 6:
                    label22.Text = "10 000";
                    label22.ForeColor = Color.Chocolate;
                    label17.Text = "30 000";
                    label17.ForeColor = Color.Green;
                    break;
                case 7:
                    label17.Text = "30 000";
                    label17.ForeColor = Color.Chocolate;
                    label23.Text = "50 000";
                    label23.ForeColor = Color.Green;
                    break;
                case 8:
                    label23.Text = "50 000";
                    label23.ForeColor = Color.Chocolate;
                    label24.Text = "75 000";
                    label24.ForeColor = Color.Green;
                    break;
                case 9:
                    label24.Text = "75 000";
                    label24.ForeColor = Color.Chocolate;
                    label25.Text = "100 000";
                    label25.ForeColor = Color.Green;
                    break;
                case 10:
                    label25.Text = "100 000";
                    label25.ForeColor = Color.Chocolate;
                    label26.Text = "150 000";
                    label26.ForeColor = Color.Green;
                    break;
                case 11:
                    label26.Text = "150 000";
                    label26.ForeColor = Color.Chocolate;
                    label27.Text = "200 000";
                    label27.ForeColor = Color.Green;
                    break;
                case 12:
                    label27.Text = "200 000";
                    label27.ForeColor = Color.Chocolate;
                    label28.Text = "250 000";
                    label28.ForeColor = Color.Green;
                    break;
                case 13:
                    label28.Text = "250 000";
                    label28.ForeColor = Color.Chocolate;
                    label29.Text = "500 000";
                    label29.ForeColor = Color.Green;
                    break;
                case 14:
                    label29.Text = "500 000";
                    label29.ForeColor = Color.Chocolate;
                    label30.Text = "750 000";
                    label30.ForeColor = Color.Green;
                    break;
                case 15:
                    label30.Text = "750 000";
                    label30.ForeColor = Color.Chocolate;
                    label31.Text = "1 000 000";
                    label31.ForeColor = Color.Green;
                    break;
            }
        }
        public void fresh()
        {
            label17.ForeColor = Color.Chocolate;
            label18.ForeColor = Color.Chocolate;
            label19.ForeColor = Color.Chocolate;
            label20.ForeColor = Color.Chocolate;
            label21.ForeColor = Color.Chocolate;
            label22.ForeColor = Color.Chocolate;
            label23.ForeColor = Color.Chocolate;
            label24.ForeColor = Color.Chocolate;
            label25.ForeColor = Color.Chocolate;
            label26.ForeColor = Color.Chocolate;
            label27.ForeColor = Color.Chocolate;
            label28.ForeColor = Color.Chocolate;
            label29.ForeColor = Color.Chocolate;
            label30.ForeColor = Color.Chocolate;
            label31.ForeColor = Color.Chocolate;
        }
        public void money()
        {
            int i = Convert.ToInt32(label16.Text);
            switch (i)
            {
                case 1:
                    Class1.e = "500";
                    break;
                case 2:
                    Class1.e = "1000";
                    break;
                case 3:
                    Class1.e = "3000";
                    break;
                case 4:
                    Class1.e = "5000";
                    break;
                case 5:
                    Class1.e = "10000";
                    break;
                case 6:
                    Class1.e = "30000";
                    break;
                case 7:
                    Class1.e = "50000";
                    break;
                case 8:
                    Class1.e = "75000";
                    break;
                case 9:
                    Class1.e = "100000";
                    break;
                case 10:
                    Class1.e = "150000";
                    break;
                case 11:
                    Class1.e = "200000";
                    break;
                case 12:
                    Class1.e = "250000";
                    break;
                case 13:
                    Class1.e = "500000";
                    break;
                case 14:
                    Class1.e = "750000";
                    break;
                case 15:
                    Class1.e = "1000000";
                    break;
            }
        }

        private void pictureBox3_Click(object sender, EventArgs e)
        {
            wplayer6.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\50_50.mp3";
            double time = wplayer6.controls.currentPosition;
            wplayer6.controls.play();
            int k = 0, j = 0;
            switch (Class1.b)
            {
                case "A":
                    k = 1;
                    break;
                case "B":
                    k = 2;
                    break;
                case "C":
                    k = 3;
                    break;
                case "D":
                    k = 4;
                    break;
            }
            for (int i = 0; i < 2; )
            {
                Random rnd = new Random();
                int r = rnd.Next(1, 5);
                if ((r != k )&&( j!=r))
                {
                    i++;
                    j = r;
                    switch (r)
                    {
                        case 1:
                            label4.Text = "";
                            label9.Text = "";
                            break;
                        case 2:
                            label5.Text = "";
                            label11.Text = "";
                            break;
                        case 3:
                            label6.Text = "";
                            label8.Text = "";
                            break;
                        case 4:
                            label7.Text = "";
                            label10.Text = "";
                            break;
                    }
                }
            }
            pictureBox3.Enabled = false;
            label39.Visible = true;
        }

        private void timer7_Tick(object sender, EventArgs e)
        {
                if(c==0)label18.ForeColor = Color.Green;
                if(c==1)label18.ForeColor = Color.Chocolate;
                if(c==2)label19.ForeColor = Color.Green;
                if(c==3)label19.ForeColor = Color.Chocolate;
                if(c==4)label20.ForeColor = Color.Green;
                if(c==5)label20.ForeColor = Color.Chocolate;
                if(c==6)label21.ForeColor = Color.Green;
                if(c==7)label21.ForeColor = Color.Chocolate;
                if (c == 8) label17.ForeColor = Color.Green;
                if (c == 9) label17.ForeColor = Color.Chocolate;
                if(c==10)label22.ForeColor = Color.Green;
                if(c==11)label22.ForeColor = Color.Chocolate;
                if(c==12)label23.ForeColor = Color.Green;
                if(c==13)label23.ForeColor = Color.Chocolate;
                if (c == 14) label24.ForeColor = Color.Green;
                if (c == 15) label24.ForeColor = Color.Chocolate;
                if (c == 16) label25.ForeColor = Color.Green;
                if (c == 17) label25.ForeColor = Color.Chocolate;
                if (c == 18) label26.ForeColor = Color.Green;
                if (c == 19) label26.ForeColor = Color.Chocolate;
                if (c == 20) label27.ForeColor = Color.Green;
                if (c == 21) label27.ForeColor = Color.Chocolate;
                if (c == 22) label28.ForeColor = Color.Green;
                if (c == 23) label28.ForeColor = Color.Chocolate;
                if (c == 24) label29.ForeColor = Color.Green;
                if (c == 25) label29.ForeColor = Color.Chocolate;
                if (c == 26) label30.ForeColor = Color.Green;
                if (c == 27) label30.ForeColor = Color.Chocolate;
                if (c == 28) label31.ForeColor = Color.Green;
                if (c == 29) label31.ForeColor = Color.Chocolate;
                if (c == 30) label31.ForeColor = Color.Green;
                if (c == 31) label31.ForeColor = Color.Chocolate;
                if (c == 32) label31.ForeColor = Color.Chocolate;
                if (c == 33) label31.ForeColor = Color.Green;
                if (c == 34) label31.ForeColor = Color.Chocolate;
                if (c == 35) label30.ForeColor = Color.Green;
                if (c == 36) label30.ForeColor = Color.Chocolate;
                if (c == 37) label29.ForeColor = Color.Green;
                if (c == 38) label29.ForeColor = Color.Chocolate;
                if (c == 39) label28.ForeColor = Color.Green;
                if (c == 40) label28.ForeColor = Color.Chocolate;
                if (c == 41) label27.ForeColor = Color.Green;
                if (c == 42) label27.ForeColor = Color.Chocolate;
                if (c == 43) label26.ForeColor = Color.Green;
                if (c == 44) label26.ForeColor = Color.Chocolate;
                if (c == 45) label25.ForeColor = Color.Green;
                if (c == 46) label25.ForeColor = Color.Chocolate;
                if (c == 47) label24.ForeColor = Color.Green;
                if (c == 48) label24.ForeColor = Color.Chocolate;
                if (c == 49) label23.ForeColor = Color.Green;
                if (c == 50) label23.ForeColor = Color.Chocolate;
                if (c == 51) label17.ForeColor = Color.Green;
                if (c == 52) label17.ForeColor = Color.Chocolate;
                if (c == 53) label22.ForeColor = Color.Green;
                if (c == 54) label22.ForeColor = Color.Chocolate;
                if (c == 55) label21.ForeColor = Color.Green;
                if (c == 56) label21.ForeColor = Color.Chocolate;
                if (c == 57) label20.ForeColor = Color.Green;
                if (c == 58) label20.ForeColor = Color.Chocolate;
                if (c == 59) label19.ForeColor = Color.Green;
                if (c == 60) label19.ForeColor = Color.Chocolate;
                if (c == 61) label18.ForeColor = Color.Green;
                if (c == 62) label18.ForeColor = Color.Chocolate;
                if (c == 63) label18.ForeColor = Color.Green;
                if (c == 64) label18.ForeColor = Color.Chocolate;
                if (c == 65) label18.ForeColor = Color.Green;
                if (c == 66) label18.ForeColor = Color.Chocolate;
                if (c == 67) label18.ForeColor = Color.Red;
                if (c == 68) label18.ForeColor = Color.Yellow;
                if (c == 69) label18.ForeColor = Color.Chocolate;
                if (c == 70) label18.ForeColor = Color.Green;
                if (c == 71) label18.ForeColor = Color.Chocolate;
                if (c == 72) label18.ForeColor = Color.Red;
                if (c == 73) label18.ForeColor = Color.Yellow;
                if (c == 74) label18.ForeColor = Color.Green;
                if (c == 75) label18.ForeColor = Color.Green;
                if (c == 76) label18.ForeColor = Color.Green;
                if (c == 77) label18.ForeColor = Color.Green;
                if (c == 78) label18.ForeColor = Color.Green;
                if (c == 79) label18.ForeColor = Color.Green;
                if (c == 80) label18.ForeColor = Color.Green;
                if (c == 81) label18.ForeColor = Color.Green;
                if (c == 82) label18.ForeColor = Color.Green;
                if (c == 83) label18.ForeColor = Color.Green;
                if (c == 84) label18.ForeColor = Color.Green;
                if (c == 85) label18.ForeColor = Color.Green;
                if (c == 86) label18.ForeColor = Color.Green;
                if (c == 87) label18.ForeColor = Color.Green;
                if (c == 88) label18.ForeColor = Color.Green;
                if (c == 89) label18.ForeColor = Color.Chocolate;
                if (c == 90)
                {
                    timer7.Stop();
                    wplayer9.URL = @"C:\Users\mg\Documents\Visual Studio 2012\Projects\saytan\saytan\Resources\sounds\game_start2.3ga";
                    double tim = wplayer9.controls.currentPosition;
                    wplayer9.controls.play();
                    asuult();
                    label1.Visible = true;
                    label3.Visible = true;
                    pictureBox1.Enabled = true;
                    pictureBox2.Enabled = true;
                    pictureBox3.Enabled = true;
                    label14.Visible = true;
                    label4.Enabled = true;
                    label5.Enabled = true;
                    label6.Enabled = true;
                    label7.Enabled = true;
                    label8.Enabled = true;
                    label9.Enabled = true;
                    label10.Enabled = true;
                    label11.Enabled = true;
                    label8.Text = "C";
                    label9.Text = "A";
                    label10.Text = "D";
                    label11.Text = "B";
                }
                c++;
        }
        private void label50_Click(object sender, EventArgs e)
        {
            wplayer.controls.stop();
            wplayer2.controls.stop();
            timer1.Stop();
            timer2.Stop();
            timer3.Stop();
            timer4.Stop();
            timer5.Stop();
            timer7.Stop();
            Class1.h = "1";
            Form1 f = new Form1();
            this.Hide();
            f.ShowDialog();
            this.Close();
            
        }

        private void label13_Click(object sender, EventArgs e)
        {
            if(label12.Text == "admin")
            {
            admin a = new admin();
            a.ShowDialog();
            }
        }

        private void label3_Click(object sender, EventArgs e)
        {
           
        }

        private void label2_Click(object sender, EventArgs e)
        {
           
                admin1 a = new admin1();
                a.ShowDialog();
           
        }

        private void button1_Click_1(object sender, EventArgs e)
        {

        }

        private void pictureBox4_Click(object sender, EventArgs e)
        {
            if (Class1.j == "0")
            {
                wplayer.settings.mute = true;
                wplayer1.settings.mute = true;
                wplayer2.settings.mute = true;
                wplayer3.settings.mute = true;
                wplayer4.settings.mute = true;
                wplayer5.settings.mute = true;
                wplayer6.settings.mute = true;
                wplayer7.settings.mute = true;
                label51.Visible = true;
                Class1.j = "1";
            }
            else
            {
                wplayer.settings.mute =  false;
                wplayer1.settings.mute = false;
                wplayer2.settings.mute = false;
                wplayer3.settings.mute = false;
                wplayer4.settings.mute = false;
                wplayer5.settings.mute = false;
                wplayer6.settings.mute = false;
                wplayer7.settings.mute = false;
                label51.Visible = false;
                Class1.j = "0";
            }
        }

        private void label51_Click(object sender, EventArgs e)
        {
            if (Class1.j == "0")
            {
                wplayer.settings.mute = true;
                wplayer1.settings.mute = true;
                wplayer2.settings.mute = true;
                wplayer3.settings.mute = true;
                wplayer4.settings.mute = true;
                wplayer5.settings.mute = true;
                wplayer6.settings.mute = true;
                wplayer7.settings.mute = true;
                label51.Visible = true;
                Class1.j = "1";
            }
            else
            {
                wplayer.settings.mute = false;
                wplayer1.settings.mute = false;
                wplayer2.settings.mute = false;
                wplayer3.settings.mute = false;
                wplayer4.settings.mute = false;
                wplayer5.settings.mute = false;
                wplayer6.settings.mute = false;
                wplayer7.settings.mute = false;
                label51.Visible = false;
                Class1.j = "0";
            }
        }

        private void label34_Click(object sender, EventArgs e)
        {

        }
    }
}
