/// <summary>
        /// Shows the percentage of work completed when backuping/restoring
        /// </summary>
        /// <returns></returns>
        public void PercentComplete(object sender, PercentCompleteEventArgs e)
        {
            //for (int j = 0; j < 1000; j++)
            //{
            //    if ((CurrentProgress + j) <= 100)//e.Percent
            //    {
            //        CurrentProgress += j;//e.Percent;
            //    }
            //    else
            //        CurrentProgress = ProgressMax;

            //    if (OnProgressUpdate != null)
            //    {
            //        OnProgressUpdate(CurrentProgress);
            //    }
            //}

            //return CurrentProgress;
            //CurrentProgress = e.Percent;

            BkWorker.ReportProgress(e.Percent);
            CurrentProgress = e.Percent;
            Console.WriteLine(e.Percent);
        }
Exemple #2
0
 /// <summary>
 /// Función que lanza la ejecución en segundo plano
 /// </summary>
 /// <param name="bar"></param>
 public virtual void RunBackGround(IBackGroundLauncher shuttle)
 {
     shuttle.Finished = false;
     BkWorker.RunWorkerAsync(shuttle);
 }