Пример #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            Japanese_Exercises JE = new Japanese_Exercises(this, this.Top, this.Left);

            this.Hide();
            JE.Show();
        }
        public Japanese_EX_JapJRus(Japanese_Exercises JE, int a, int b)
        {
            InitializeComponent();

            this.MaximizeBox = false;

            _JE = JE;

            CloseFlag = 1;

            this.label5.Visible = false;
            this.label6.Visible = false;

            this.Top  = a;
            this.Left = b;

            toolTip1.SetToolTip(button1, "Назад");
            toolTip2.SetToolTip(button2, "Проверить кану");
            toolTip3.SetToolTip(button3, "Проверить перевод");
            toolTip4.SetToolTip(button4, "Следующее слово");

            this.tableTableAdapter.Fill(japanese_DataBaseDataSet.Table);

            i = this.japanese_DataBaseDataSet.Table.Rows.Count;

            String s1 = i.ToString();

            label2.Text = s1;

            Random rand = new Random();
            int    k    = 0;

            if (i != 0)
            {
                j = rand.Next(i);
                k = j + 1;
            }

            String s2 = k.ToString();

            label1.Text = s2;

            if (i == 0)
            {
                this.label4.Text = "";
                this.label5.Text = "";
                this.label6.Text = "";
            }

            if (i != 0)
            {
                label4.Text = this.japanese_DataBaseDataSet.Table.Rows[j][1].ToString();
                label5.Text = this.japanese_DataBaseDataSet.Table.Rows[j][2].ToString();
                label6.Text = this.japanese_DataBaseDataSet.Table.Rows[j][3].ToString();
            }
        }