using FastReport.Forms;
using FastReport.Utils;

namespace FastReport
{
    partial class ReportSettings
    {
        internal void OnStartLoadingProgress(Report report)
        {
            progress = null;

            if (ShowProgress)
            {
                progress = new ProgressForm(report, false);
                progress.ShowProgressMessage(Res.Get("Messages,LoadingReport"));
                progress.Show();
                progress.Refresh();
            }
        }

        internal void OnFinishLoadingProgress()
        {
            if (ShowProgress)
            {
                if (progress != null)
                {
                    progress.Close();
                    progress.Dispose();
                    progress = null;
                }
            }
        }
    }
}
