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;

namespace Jdas_Mbic
{
    public partial class Download_bar : Form
    {
        public Download_bar()
        {
            InitializeComponent();
        }
        public void Progressbar(String val)
        {
            Update_label.Text = val;
        }
        public void Progressbar_gauge_zero()
        {
            Firm_Progressbar.Value = 0;
        }
        public new void FormClosed(object form)
        {
            Download_bar download_Bar = (Download_bar)form;
            CheckForIllegalCrossThreadCalls = false;
            download_Bar.Close();
        }
        public void PerformStepup(object form)
        {
            Download_bar download_Bar = (Download_bar)form;
            CheckForIllegalCrossThreadCalls = false;
            Firm_Progressbar.PerformStep();
        }
        public void PerformStepinc(int val)
        {
            //Download_bar download_Bar = (Download_bar)form;
            CheckForIllegalCrossThreadCalls = false;
            Firm_Progressbar.Increment(val);
        }
        public void Update_Percent(String val)
        {
            CheckForIllegalCrossThreadCalls = false;
            //Firm_Progressbar.PerformStep();
            try
            {
                Update_label.Text = val + "%";
            }
            catch { }
        }
        public int Update_get()
        {
            return Firm_Progressbar.Value;
        }

    }
}
