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

namespace FCOMMON
{
    public partial class fProgress : fBase
    {
        public fProgress()
        {
            InitializeComponent();
        }

        private void fProgress_Load(object sender, EventArgs e)
        {
            EnsureVisibleAndUsableSize();
        }
      
        private string _title = string.Empty;
        public string Title
        {
            get
            {
                return _title;
            }
            set
            {
                _title = value;
                label1.Text = _title;
                label1.Invalidate();
            }
        }
        
        public void IncProgress()
        {
            if(  this.progressBar1.Value < this.progressBar1.Maximum)
                this.progressBar1.Value += 1;
            this.progressBar1.Invalidate();
        }
        public void SetProgress(int min,int max)
        {
            this.progressBar1.Minimum = min;
            this.progressBar1.Value = min;
            this.progressBar1.Maximum = max;
            this.progressBar1.Invalidate();
        }
    }
}
