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

namespace ChaKi.GUICommon
{
    public partial class ProgressDialog : Form
    {
        public event EventHandler Cancelled;

        public ProgressDialog()
        {
            InitializeComponent();
        }

        public int ProgressMax
        {
            set
            {
                this.progressBar1.Maximum = value;
            }
        }

        public int ProgressCount
        {
            set
            {
                this.progressBar1.Value = value;
            }
        }

        public void ProgressReset()
        {
            this.progressBar1.Value = 0;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (this.Cancelled != null) this.Cancelled(this, null);
        }
    }
}
