Ejemplo n.º 1
0
 public void CancelBackJob(IBackGroundLauncher shuttle)
 {
     _result          = BGResult.Cancelled;
     shuttle.Result   = BGResult.Cancelled;
     shuttle.Finished = true;
     FillUp();
 }
Ejemplo n.º 2
0
        protected void Start(string trackMessage)
        {
            PGStatus = EStatus.Working;
            _result  = BGResult.Working;

            Show(true);

            Grow(string.Empty, "START RECORDING | " + trackMessage);
        }
Ejemplo n.º 3
0
        public void FillUp(string message, string track_message)
        {
            try
            {
                if (PGStatus != EStatus.Working)
                {
                    return;
                }
#if TRACE
                _timer.Record("ProgressInfoMng::FillUp INI | " + track_message);
#endif
                if (message != string.Empty)
                {
                    Message = message;
                }

                // Barra de progreso de la barra de estado
                if (_pg_bar != null)
                {
                    _pg_bar.Value = _pg_bar.Maximum;
                }

                // Barra de progreso del formulario de progreso
                if (_pg_form != null)
                {
                    _pg_form.ProgressInfo_PB.Value = _pg_form.ProgressInfo_PB.Maximum;
                }

                if (Caller != null)
                {
                    Caller.FillUpProgressBar();
                }

                Refresh();

                _result = BGResult.OK;

                State = BGResult.OK;

                // Cerramos el formulario
                Show(false);
#if TRACE
                _timer.Record("ProgressInfoMng::FillUp END | " + track_message);
                ShowCronos();
#endif
                _caller  = null;
                PGStatus = EStatus.Closed;
            }
            catch
            {
                PGStatus = EStatus.Error;
            }
        }
Ejemplo n.º 4
0
        public void StartBackJob(IBackGroundLauncher shuttle)
        {
            try
            {
                State = BGResult.Working;

                _shuttle = shuttle;
                _bk_grow = true;

                RunBackGround(shuttle);

                shuttle.ForeGroundJob();

                while (!shuttle.Finished)
                {
                    if (_do_grow)
                    {
                        DoGrow();
                    }
                    Refresh();
                    Application.DoEvents();
                }

                _result = shuttle.Result;
            }
            catch (Exception ex)
            {
                _result = BGResult.Error;
                ShowInfoException(ex);
            }
            finally
            {
                _bk_grow = false;
                State    = BGResult.OK;
                _shuttle = null;
            }
        }