Esempio n. 1
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (imgflag)
     {
         OpenFileDialog imageloader = new OpenFileDialog();
         imageloader.Title  = "請選擇一張圖片";
         imageloader.Filter = "|*.jpg";
         if (imageloader.ShowDialog() == DialogResult.OK)
         {
             data = ReadImageFile(imageloader.FileName);
             WorkerToSend.RunWorkerAsync();
         }
     }
 }
Esempio n. 2
0
 private void 傳送圖片ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (imgflag)
     {
         OpenFileDialog imageloader = new OpenFileDialog();
         imageloader.Title  = "請選擇一張圖片";
         imageloader.Filter = "|*.jpg";
         if (imageloader.ShowDialog() == DialogResult.OK)
         {
             data = ReadImageFile(imageloader.FileName);
             WorkerToSend.RunWorkerAsync();
         }
     }
     else
     {
         MessageBox.Show("尚有圖片傳送中!");
     }
 }