Пример #1
0
        public double ProgressUpdate()
        {
            if (progressObject != null)
            {
                return(currentProgress + 1.0 / maxProgress * progressObject.ProgressUpdate());
            }

            return(currentProgress);
        }
        public double ProgressUpdate()
        {
            if (progressInfo == null)
            {
                return(progress);
            }

            double res = progress + progressInfo.ProgressUpdate();

            return(res);
        }
Пример #3
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (progress == null)
            {
                return;
            }
            Exception ex = progress.GetException();

            if (progress.GetException() != null)
            {
                show.ShowException(ex);
                this.Close();
            }
            progressBar1.Value = (int)(progress.ProgressUpdate() * 100);
            if (progressBar1.Value == progressBar1.Maximum)
            {
                if (show != null)
                {
                    show.Show(progress.GetResults());
                }
                Close();
            }
        }
Пример #4
0
        public double ProgressUpdate()
        {
            double sum = 0;

            if (profilesProgress == null)
            {
                return(0);
            }

            foreach (var item in profilesProgress)
            {
                sum += item;
            }

            sum /= profilesNum * 2;

            if (progressObject != null)
            {
                sum = sum + progressObject.ProgressUpdate() / 2;
            }


            return(sum);
        }