private static void OnExecuteDesignerAction(object sender, EventArgs e) { DesignerVerb verb = sender as DesignerVerb; if (verb != null) { DesignerAction designerAction = verb.Properties[DesignerUserDataKeys.DesignerAction] as DesignerAction; if (designerAction != null) { ActivityDesigner designer = verb.Properties[DesignerUserDataKeys.Designer] as ActivityDesigner; if (designer != null) { designer.OnExecuteDesignerAction(designerAction); } } } }
/// <summary> /// Called when user clicks on configuration errors associated with the designer. /// </summary> /// <param name="designerAction">Designer action associated with configuration error.</param> protected internal virtual void OnExecuteDesignerAction(DesignerAction designerAction) { if (designerAction == null) throw new ArgumentNullException("designerAction"); ISelectionService selectionService = GetService(typeof(ISelectionService)) as ISelectionService; if (selectionService != null) selectionService.SetSelectedComponents(new object[] { Activity }, SelectionTypes.Replace); string propName = designerAction.PropertyName as string; if (propName != null && propName.Length > 0) { IExtendedUIService uiService = GetService(typeof(IExtendedUIService)) as IExtendedUIService; if (uiService != null) uiService.NavigateToProperty(propName); } }
internal PropertyValueUIItemHandler(DesignerAction action) { this.action = action; }
protected override void OnExecuteDesignerAction(DesignerAction designerAction) { if (designerAction.ActionId == 1) MessageBox.Show(designerAction.Text); }