コード例 #1
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     if (progressBar1.Value == 100)
     {
         this.Visible = false;
         timer1.Stop();
         frm_choose frm = new frm_choose();
         frm.ShowDialog();
         this.Close();
     }
     else
     {
         progressBar1.Value++;
         label5.Text = progressBar1.Value.ToString();
         if (progressBar1.Value % 8 == 2)
         {
             label3.Text = "Please Wait .";
         }
         if (progressBar1.Value % 8 == 5)
         {
             label3.Text = "Please Wait ..";
         }
         if (progressBar1.Value % 8 == 7)
         {
             label3.Text = "Please Wait ...";
         }
     }
 }
コード例 #2
0
        private void button33_Click(object sender, EventArgs e)
        {
            SqlConnection con = new SqlConnection(Properties.Settings.Default.resort);

            con.Open();
            SqlCommand cmd = new SqlCommand();

            cmd.Connection  = con;
            cmd.CommandText = "insert into room(room_num,id_tour) values(" + 32 + "," + int.Parse(textBox1.Text) + ")";
            cmd.ExecuteNonQuery();
            con.Close();
            this.Visible = false;
            frm_choose frm = new frm_choose();

            frm.ShowDialog();
        }
コード例 #3
0
        private void button5_Click(object sender, EventArgs e)
        {
            if (!Directory.Exists("img"))
            {
                Directory.CreateDirectory("img");
            }
            pictureBox1.Image.Save("img/" + textBox1.Text + label1.Text + ".jpg");
            if (!Directory.Exists("img"))
            {
                Directory.CreateDirectory("img");
            }
            pictureBox2.Image.Save("img/" + textBox1.Text + label2.Text + ".jpg");
            if (!Directory.Exists("img"))
            {
                Directory.CreateDirectory("img");
            }
            pictureBox3.Image.Save("img/" + textBox1.Text + label3.Text + ".jpg");
            if (!Directory.Exists("img"))
            {
                Directory.CreateDirectory("img");
            }
            pictureBox4.Image.Save("img/" + textBox1.Text + label4.Text + ".jpg");
            this.Visible = false;
            frm_choose frm = new frm_choose();

            frm.ShowDialog();
            //MemoryStream ms1 = new MemoryStream();
            //pictureBox1.Image.Save(ms1, pictureBox1.Image.RawFormat);
            //byte[] byteimage1 = ms1.ToArray();
            //MemoryStream ms2 = new MemoryStream();
            //pictureBox2.Image.Save(ms2, pictureBox1.Image.RawFormat);
            //byte[] byteimage2 = ms2.ToArray();
            //MemoryStream ms3 = new MemoryStream();
            //pictureBox3.Image.Save(ms3, pictureBox1.Image.RawFormat);
            //byte[] byteimage3 = ms3.ToArray();
            //MemoryStream ms4 = new MemoryStream();
            //pictureBox4.Image.Save(ms4, pictureBox1.Image.RawFormat);
            //byte[] byteimage4 = ms4.ToArray();
        }