Esempio n. 1
0
 private void kryptonButtonOpenGoogleDownloaderFile_Click(object sender, EventArgs e)
 {
     // 이미지 검색 파일 열기
     openFileDialog        = new OpenFileDialog();
     openFileDialog.Filter = "JPEG (*.JPG,*.JPEG,*.JPE)|*.jpg;*.jpeg;*.jpe|PNG (*.PNG)|*.png";
     if (openFileDialog.ShowDialog() == DialogResult.OK)
     {
         //textBoxGoogleDownloader.Text = openFileDialog.FileName;
         try
         {
             progressFormGoogleDownloaderFileUpload = new ProgressFormGoogleDownloaderFileUpload(this, openFileDialog.FileName);
             progressFormGoogleDownloaderFileUpload.ShowDialog();
             progressFormGoogleDownloaderFileUpload.Dispose();
         }
         catch (Exception ex)
         {
             log.Debug(ex.ToString());
         }
     }
 }
Esempio n. 2
0
        private void kryptonTextBoxGoogleDownloaderURL_DragDrop(object sender, DragEventArgs e)
        {
            log.Debug("DragDrop");
            if (e.Data.GetDataPresent(DataFormats.FileDrop))
            {
                try
                {
                    string[] file = (string[])e.Data.GetData(DataFormats.FileDrop);

                    if (!imageFileCheck(file[0]))
                    {
                        MessageBox.Show(this, "no image file!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        return;
                    }
                    else
                    {
                        kryptonTextBoxGoogleDownloaderURL.Text = file[0];
                        progressFormGoogleDownloaderFileUpload = new ProgressFormGoogleDownloaderFileUpload(this, kryptonTextBoxGoogleDownloaderURL.Text);
                        //progressFormGoogleDownloaderFileUpload.Parent = this;
                        //progressFormGoogleDownloaderFileUpload.StartPosition = FormStartPosition.Manual;

                        progressFormGoogleDownloaderFileUpload.Size = new Size(521, 73);

                        progressFormGoogleDownloaderFileUpload.StartPosition = FormStartPosition.Manual;
                        progressFormGoogleDownloaderFileUpload.Location      = new Point(
                            this.Location.X + (this.Width - progressFormGoogleDownloaderFileUpload.Width) / 2,
                            this.Location.Y + (this.Height - progressFormGoogleDownloaderFileUpload.Height) / 2
                            );

                        progressFormGoogleDownloaderFileUpload.ShowDialog();
                        progressFormGoogleDownloaderFileUpload.Dispose();
                    }
                }
                catch (Exception ex)
                {
                    log.Debug(ex.ToString());
                }
            }
        }