Beispiel #1
0
        /// <summary>
        /// Increments the value shown in the progress bar
        /// </summary>
        public void IncrementProgress()
        {
            try
            {
                Invoke(new Action(() =>
                {
                    _progress = Utility.Clamp(_progress + 1,
                                              Progress_Builder.Minimum, Progress_Builder.Maximum);

                    BW_Builder.ReportProgress(_progress);
                }));
            }
            catch { }
        }
Beispiel #2
0
        public ProgressDialog(MosaicData mData)
        {
            InitializeComponent();

            InitBackgroundWorker();

            Utility.SetEnabled(Btn_OK, false);

            _mData = mData ??
                     throw new ArgumentNullException("mData");

            Size newSize = Utility.GetNewImageSize(_mData.LoadedImage.Size,
                                                   _mData.ElementSize);

            _pData = new ProgressData(this, newSize, _mData.ElementSize);

            SetMaxProgress();

            BW_Builder.RunWorkerAsync();
        }
Beispiel #3
0
 private void Btn_Cancel_Click(object sender, EventArgs e)
 {
     BW_Builder.CancelAsync();
     DialogResult = DialogResult.Cancel;
 }