/// <summary> /// Updates the view. /// </summary> public void RefreshView() { if (this.InvokeRequired) { RefreshViewDelegate d = new RefreshViewDelegate(this.RefreshView); this.Invoke(d); return; } // set... IOperationItem item = this.CurrentItem; if (item != null) { // get the bar to display status information in... FloatingOperationDialogBar bar = this.GetBarForItem(item); if (bar != null) { bar.RefreshView(); } } else { if (this.IsDefaultBarVisible) { this.DefaultBar.Status = this.Caption; } } }
private void timerSample_Tick(object sender, System.EventArgs e) { try { if (this.CurrentItem != null) { FloatingOperationDialogBar bar = this.GetBarForItem(this.CurrentItem); if (bar != null) { bar.RefreshView(); } } } catch (Exception ex) { this.timerSample.Enabled = false; Alert.ShowWarning(this, "Failed to update operation bar.", ex); } }