private void DiagrammerEnvironment_ProgressChanged(object sender, ProgressEventArgs e) { try { // Exit if Invalid if (e == null) { return; } // Display Status Message if (string.IsNullOrEmpty(e.Message)) { // If message is empty then display "Ready" this.statusBarItemMain.Text = Resources.TEXT_READY; } else { // Display Progress Message this.statusBarItemMain.Text = e.Message; } // Call all queued windows events Application.DoEvents(); } catch (Exception ex) { ExceptionDialog.HandleException(ex); } }
// // PUBLIC METHODS // public virtual void OnProgressChanged(ProgressEventArgs e) { EventHandler<ProgressEventArgs> handler = ProgressChanged; if (handler != null) { handler(this, e); } }