Exemplo n.º 1
0
        //EventLog myLog = new EventLog();
        public FrmProgress()
        {
            InitializeComponent();

            _setProgressText = SetProgressBarText;
            _setProgressValue = SetProgressBarValue;

            //myLog.Source = "ForLABLog";
        }
Exemplo n.º 2
0
        public FrmProgress(MorbidityForecast forecast, InventoryAssumption invAssumption)
        {
            //this._morbidityForm = morbidityForm;
            this._forecast = forecast;
            this._invAssumption = invAssumption;

            InitializeComponent();

            _setProgressText = new SetTextCallBack(SetProgressBarText);
            _setProgressValue = new SetProgressBarCallBack(SetProgressBarValue);
        }
Exemplo n.º 3
0
 private void SetProgressBar(int percentage)
 {
     try
     {
         if (ProgressBar1.InvokeRequired)
         {
             SetProgressBarCallBack c = SetProgressBar;
             Invoke(c, percentage);
         }
         else
         {
             ProgressBar1.Value = percentage;
         }
     }
     catch
     {
     }
 }
Exemplo n.º 4
0
 private void SetProgress(int value)
 {
     // InvokeRequired required compares the thread ID of the
     // calling thread to the thread ID of the creating thread.
     // If these threads are different, it returns true.
     if (this.progressBar.InvokeRequired)
     {
         SetProgressBarCallBack d = new SetProgressBarCallBack(SetProgress);
         this.Invoke(d, new object[] { value });
     }
     else
     {
         this.progressBar.Maximum = value;
     }
 }
Exemplo n.º 5
0
 private void SetProgressBar(int max, int current)
 {
     if ( this.progressBar1.InvokeRequired)
     {
         SetProgressBarCallBack s = new SetProgressBarCallBack(SetProgressBar);
         this.Invoke(s, new object[] { max, current });
     } else
     {
         this.progressBar1.Maximum = max;
         this.progressBar1.Step = 1;
         this.progressBar1.PerformStep();
     }
 }