Esempio n. 1
0
 protected virtual void OnStatusChanged(SetStatusMainEventArgs e)
 {
     if (this.StatusChanged != null)                // nothing subscribed to this event
     {
         this.StatusChanged(this, e);
     }
 }
Esempio n. 2
0
		protected virtual void OnStatusChanged(SetStatusMainEventArgs e)
		{
			if(this.StatusChanged != null)
			{
				this.StatusChanged(this, e);
			}
		}
Esempio n. 3
0
        //--------------------------  events  ------------------------------------//


        private void HandleStatus(object sender, SetStatusMainEventArgs e)
        // called by: SetStatusText
        {
            int    sVal  = e.statusVal;
            string sText = e.statusText;

            //Debug.WriteLine(String.Format("Status msg: {0}, {1} ", sVal, sText));
            switch (sVal)
            {
            case 0:                       // no img
                this.statusLabel1.Text = sText;
                // no picLabel1, flicker effect
                break;

            case -1:                       // dash progress
                _step++;
                if (_step <= _maxStep)
                {
                    progress1.Value = _step;
                }
                else
                {
                    progress1.Value = 0;
                }
                break;

            case -2: // directory / seach / hist   suspended message
                _statusText = sText;
                //this.picLabel1.Text = sText;
                break;

            case -3: // pic load, size perc        complete message
                this.statusLabel1.Text = _statusText + sText;
                //this.picLabel1.Text = sText;
                break;

            case -9:                       // dash complete
                progress1.Value = 0;
                _maxStep        = 0;
                break;

            default:                      // > 0 = start progress
                statusLabel1.Text = T._("Scan");
                _maxStep          = sVal;
                progress1.Maximum = _maxStep;
                _step             = 0;
                break;
            }
        }