/// <summary>
        /// Constructor
        /// </summary>
        /// <param name="reason"></param>
        /// <param name="work"></param>
        public ProgressDialog(string reason, ProgressHandler work)
        {
            InitializeComponent();

            Work = work;
            Text = reason;
            label1.Text = reason;
            backgroundWorker1.DoWork += new DoWorkEventHandler(ManageCancel);
        }
        /// <summary>
        ///     Constructor
        /// </summary>
        /// <param name="reason"></param>
        /// <param name="work"></param>
        /// <param name="allowCancel"></param>
        public ProgressDialog(string reason, ProgressHandler work, bool allowCancel = true)
        {
            InitializeComponent();

            btnCancel.Enabled = allowCancel;
            KeyUp += ProgressDialog_KeyUp;

            Canceled = false;
            Work = work;
            Text = reason;
            label1.Text = reason;
            backgroundWorker1.DoWork += ManageCancel;
        }