/// <summary> /// Set the status bar text for the encoding name. (Thread Safe) /// </summary> /// <param name="encodingName">Encoding display name</param> /// <history> /// [Curtis_Beard] 03/03/2015 Created /// </history> private void SetStatusBarEncoding(string encodingName) { if (stbStatus.InvokeRequired) { UpdateStatusMessageCallBack _delegate = new UpdateStatusMessageCallBack(SetStatusBarEncoding); stbStatus.Invoke(_delegate, new object[1] { encodingName }); return; } sbEncodingPanel.Text = encodingName; // setup borders depending on value if (string.IsNullOrEmpty(encodingName)) { sbEncodingPanel.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Right; } else { sbEncodingPanel.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right))); } }
/// <summary> /// Updates the status bar text with the message (thread safe) /// </summary> /// <param name="message">Message to be displayed</param> /// <history> /// [Curtis_Beard] 07/10/2006 Created /// </history> private void UpdateStatusBar(string message) { if (stbStatus.InvokeRequired) { UpdateStatusMessageCallBack _delegate = new UpdateStatusMessageCallBack(UpdateStatusBar); stbStatus.Invoke(_delegate, new object[1] {message}); return; } stbStatus.Text = message; }