예제 #1
0
        //EventLog myLog = new EventLog();
        public FrmProgress()
        {
            InitializeComponent();

            _setProgressText = SetProgressBarText;
            _setProgressValue = SetProgressBarValue;

            //myLog.Source = "ForLABLog";
        }
예제 #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);
        }
예제 #3
0
 private void SetProgressBar(int percentage)
 {
     try
     {
         if (ProgressBar1.InvokeRequired)
         {
             SetProgressBarCallBack c = SetProgressBar;
             Invoke(c, percentage);
         }
         else
         {
             ProgressBar1.Value = percentage;
         }
     }
     catch
     {
     }
 }
예제 #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;
     }
 }
예제 #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();
     }
 }