Exemplo n.º 1
0
        public void aktar()
        {
            if (gelen == true)
            {
                Form10 frm10 = (Form10)Application.OpenForms["Form10"];

                frm10.TextBox3.Text  = "";
                frm10.TextBox4.Text  = "";
                frm10.TextBox5.Text  = "0";
                frm10.TextBox6.Text  = "0";
                frm10.TextBox7.Text  = "0";
                frm10.TextBox8.Text  = DataGridView1.Rows[DataGridView1.CurrentRow.Index].Cells[4].Value.ToString().Trim();
                frm10.TextBox9.Text  = DataGridView1.Rows[DataGridView1.CurrentRow.Index].Cells[5].Value.ToString().Trim();
                frm10.TextBox11.Text = "";
                frm10.TextBox12.Text = "";
                frm10.TextBox14.Text = "";

                frm10.ComboBox2.SelectedIndex = -1;

                frm10.TextBox1.Text  = DataGridView1.Rows[DataGridView1.CurrentRow.Index].Cells[0].Value.ToString().Trim();
                frm10.TextBox2.Text  = DataGridView1.Rows[DataGridView1.CurrentRow.Index].Cells[1].Value.ToString().Trim();
                frm10.TextBox7.Text  = DataGridView1.Rows[DataGridView1.CurrentRow.Index].Cells[6].Value.ToString().Trim();
                frm10.TextBox11.Text = DataGridView1.Rows[DataGridView1.CurrentRow.Index].Cells[2].Value.ToString().Trim();
                this.Close();
            }
            else if (gelen == false)
            {
                Form12 frm12 = (Form12)Application.OpenForms["Form12"];
                frm12.TextBox3.Text  = "";
                frm12.TextBox4.Text  = "";
                frm12.TextBox5.Text  = "0";
                frm12.TextBox6.Text  = "0";
                frm12.TextBox7.Text  = "0";
                frm12.TextBox8.Text  = DataGridView1.Rows[DataGridView1.CurrentRow.Index].Cells[4].Value.ToString().Trim();
                frm12.TextBox9.Text  = DataGridView1.Rows[DataGridView1.CurrentRow.Index].Cells[5].Value.ToString().Trim();
                frm12.TextBox11.Text = "";
                frm12.TextBox12.Text = "";
                frm12.TextBox14.Text = "";

                frm12.ComboBox2.SelectedIndex = -1;

                frm12.TextBox1.Text  = DataGridView1.Rows[DataGridView1.CurrentRow.Index].Cells[0].Value.ToString().Trim();
                frm12.TextBox2.Text  = DataGridView1.Rows[DataGridView1.CurrentRow.Index].Cells[1].Value.ToString().Trim();
                frm12.TextBox7.Text  = DataGridView1.Rows[DataGridView1.CurrentRow.Index].Cells[6].Value.ToString().Trim();
                frm12.TextBox11.Text = DataGridView1.Rows[DataGridView1.CurrentRow.Index].Cells[2].Value.ToString().Trim();

                this.Close();
            }
        }
Exemplo n.º 2
0
 private void Timer2_Tick(object sender, EventArgs e)
 {
     toolStripProgressBar1.Value += 1;
     if (toolStripProgressBar1.Value >= 100)
     {
         Timer2.Enabled = false;
         if (f == 1)
         {
             toolStripProgressBar1.Style = ProgressBarStyle.Blocks;
             toolStripProgressBar1.Value = 0;
             Form frm16 = new Form16();
             frm16.ShowDialog();
             return;
         }
         if (f == 2)
         {
             toolStripProgressBar1.Style = ProgressBarStyle.Blocks;
             toolStripProgressBar1.Value = 0;
             Form frm10 = new Form10();
             frm10.ShowDialog();
             return;
         }
         if (f == 3)
         {
             toolStripProgressBar1.Style = ProgressBarStyle.Blocks;
             toolStripProgressBar1.Value = 0;
             Form frm12 = new Form12();
             frm12.ShowDialog();
             return;
         }
         if (f == 4)
         {
             toolStripProgressBar1.Style = ProgressBarStyle.Blocks;
             toolStripProgressBar1.Value = 0;
             this.WindowState            = FormWindowState.Maximized;
             Form frm5 = new Form5();
             frm5.ShowDialog();
         }
         if (f == 5)
         {
             toolStripProgressBar1.Style = ProgressBarStyle.Blocks;
             toolStripProgressBar1.Value = 0;
             Form frm7 = new Form7();
             frm7.ShowDialog();
             return;
         }
         if (f == 6)
         {
             toolStripProgressBar1.Style = ProgressBarStyle.Blocks;
             toolStripProgressBar1.Value = 0;
             Form frm8 = new Form8();
             frm8.ShowDialog();
             return;
         }
         if (f == 7)
         {
             toolStripProgressBar1.Style = ProgressBarStyle.Blocks;
             toolStripProgressBar1.Value = 0;
             Form frm9 = new Form9();
             frm9.ShowDialog();
             return;
         }
         if (f == 8)
         {
             toolStripProgressBar1.Style = ProgressBarStyle.Blocks;
             toolStripProgressBar1.Value = 0;
             Form frm13 = new Form13();
             frm13.ShowDialog();
             return;
         }
         if (f == 10)
         {
             toolStripProgressBar1.Style = ProgressBarStyle.Blocks;
             toolStripProgressBar1.Value = 0;
             Form frm6 = new Form6();
             frm6.ShowDialog();
             return;
         }
     }
 }