Beispiel #1
0
        private void CalcAvgBtn_Click(object sender, EventArgs e)
        {
            if (CalcAvgWorker.IsBusy || tiles.Count == 0)
            {
                return;
            }

            processForm           = new ProcessForm();
            processForm.Canceled += new EventHandler <EventArgs>(CancelTileBtn_Click);
            processForm.Show();
            // Register callback function
            cb -= processForm.CalcAvgRGB;
            cb += processForm.CalcAvgRGB;
            processForm.stringCB -= SavingFileName;
            processForm.stringCB += SavingFileName;
            stopWatch.Start();
            CalcAvgWorker.RunWorkerAsync();
            StateLabel.Text = "Calculating is done!!!";
        }
Beispiel #2
0
 private void QRAndPhotmosaicBtn_Click(object sender, EventArgs e)
 {
     if (CreateWorker.IsBusy || masterBitmap == null)
     {
         return;
     }
     if (processForm == null)
     {
         processForm = new ProcessForm();
     }
     if (CreatingFolderPath != FolderComboBox.SelectedValue.ToString())
     {
         CreatingFolderPath = FolderComboBox.SelectedValue.ToString();
         tiles.Clear();
     }
     blockSize = Convert.ToInt32(BlockcomboBox.SelectedValue);
     version   = Convert.ToInt32(numericUpDown3.Value);
     processForm.Show();
     stopWatch.Stop();
     CreateWorker.RunWorkerAsync();
 }
Beispiel #3
0
        /// <summary>
        /// MainForm tab page 2.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void TileFolderBtn_Click(object sender, EventArgs e)
        {
            if (CalcAvgWorker.IsBusy)
            {
                return;
            }

            FolderBrowserDialog folderBrowser = new FolderBrowserDialog();

            if (folderBrowser.ShowDialog() == DialogResult.OK)
            {
                processForm           = new ProcessForm();
                processForm.Canceled += new EventHandler <EventArgs>(CancelTileBtn_Click);
                CalcAvgFolderPath     = folderBrowser.SelectedPath;
                processForm.Show();
                cb -= processForm.LoadFolder;
                cb += processForm.LoadFolder;
                processForm.stringCB -= Path;
                processForm.stringCB += Path;
                stopWatch.Start();
                CalcAvgWorker.RunWorkerAsync();
                folderBrowser.Dispose();
            }
        }