예제 #1
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     if (progressBar1.Value == 30)
     {
         this.Visible = false;
         timer1.Stop();
         start_frm frm = new start_frm();
         frm.ShowDialog();
         this.Close();
     }
     else
     {
         progressBar1.Value++;
     }
 }
예제 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            File.Delete(Application.StartupPath + "\\data\\" + label2.Text + ".txt");
            StreamWriter sw = new StreamWriter(Application.StartupPath + "\\data\\" + textBox1.Text + ".txt");

            sw.WriteLine(textBox5.Text);
            sw.WriteLine(textBox1.Text);
            sw.WriteLine(textBox2.Text);
            sw.WriteLine(textBox6.Text);
            sw.WriteLine(textBox4.Text);
            sw.WriteLine(textBox3.Text);
            sw.Close();
            MessageBox.Show("Update successfully");
            this.Visible = false;
            start_frm frm = new start_frm();

            frm.ShowDialog();
        }