Exemplo n.º 1
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;
            }
        }