public virtual void RefreshNode() { System.Workflow.ComponentModel.Activity activity = this.Activity; if (activity != null) { base.ForeColor = (!activity.Enabled || ActivityDesigner.IsCommentedActivity(activity)) ? WorkflowTheme.CurrentTheme.AmbientTheme.CommentIndicatorColor : SystemColors.WindowText; base.Text = activity.Name; } }
//gets called to update node properties (like color, text) public virtual void RefreshNode() { Activity activity = this.Activity; if (activity == null) { return; } //Update the enabled color this.ForeColor = (!activity.Enabled || ActivityDesigner.IsCommentedActivity(activity)) ? WorkflowTheme.CurrentTheme.AmbientTheme.CommentIndicatorColor : SystemColors.WindowText; this.Text = activity.Name; }