using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Threading;

namespace BulkPrinting
{
    public partial class ProgressDialog : Form
    {
        public ProgressDialog()
        {
            InitializeComponent();
        }

        public void UpdateProgressBar(int Percentage)
        {
            if (this.InvokeRequired)
            {
                this.Invoke((Action<int>)UpdateProgressBar, Percentage);
            }
            else
            {
                pbrProgress.Value = Percentage;
                pbrProgress.Refresh();
            }
        }

        public void UpdateProgressText(string ProgressText) {
            if (this.InvokeRequired)
            {
                this.Invoke((Action<string>)UpdateProgressText, ProgressText);
            }
            else
            {
                lblProgressText.Text = ProgressText;
                lblProgressText.Refresh();
            }
        }

        private void ProgressDialog_Load(object sender, EventArgs e)
        {

        }
    }
}
