Ejemplo n.º 1
0
        /// <summary>
        /// Updates status bar message (thread safe)
        /// </summary>
        private void updateStatusBar(string statusMsg)
        {
            // Make sure we're on the right thread
            if (this.InvokeRequired)
            {
                // Update asynchronously
                updateStatusBarDelegate dlgt = new updateStatusBarDelegate(updateStatusBar);
                this.BeginInvoke(dlgt, new object[] { statusMsg });
                return;
            }

            this.statusBar.Text = statusMsg;
        }
Ejemplo n.º 2
0
		/// <summary>
		/// Updates status bar message (thread safe)
		/// </summary>
		private void updateStatusBar(string statusMsg) 
		{
			// Make sure we're on the right thread
			if( this.InvokeRequired ) 
			{
				// Update asynchronously
				updateStatusBarDelegate dlgt = new updateStatusBarDelegate(updateStatusBar);
				this.BeginInvoke(dlgt, new object[] { statusMsg });
				return;
			}

			this.statusBar.Text = statusMsg;
		}
Ejemplo n.º 3
0
		/// <summary>
		/// Displays a message in the status bar (thread safe)
		/// </summary>
		private void updateStatusBar( string statusMsg ) 
		{
			// Make sure we're on the right thread
			if( InvokeRequired ) 
			{
				// run asynchronously
				updateStatusBarDelegate updateDelegate =
					new updateStatusBarDelegate(updateStatusBar);
				this.BeginInvoke(updateDelegate, new object[] { statusMsg });
				return;
			}

			this.labelStatusBar.Text = statusMsg;
		}
Ejemplo n.º 4
0
        /// <summary>
        /// Updates the status bar progress bar and label
        /// </summary>
        /// <param name="message"></param>
        /// <param name="progress"></param>
        private void updateStatusBar(string message = "", int progPercent = -1)
        {
            if (this.InvokeRequired)
            {
                updateStatusBarDelegate del = new updateStatusBarDelegate(updateStatusBar);
                this.Invoke(del, new object[] { message, progPercent });
            }
            else
            {
                this.lblStatus.Text = message.ToString();

                // only update the progress if its >= 0 so we can update the status text without having to change the progress bar
                if (progPercent >= 0)
                {
                    statusProgressBar.Value = (int)progPercent;
                }
            }
        }