private void AddTreeNodeAction(NodeAction action) { TreeNode treeNodeAttribute = treeNodeRootActions.Nodes.Add(action.GetTreeText()); treeNodeAttribute.ContextMenuStrip = menuAttributes; treeNodeAttribute.Tag = action; EditorHelper.SetNodeIcon(treeNodeAttribute, ENodeIcon.ListItemAction); treeNodeRootActions.ExpandAll(); }
private void OnPropertyGridAttributesChanged(object s, PropertyValueChangedEventArgs e) { NodeCondition condition = selectedTreeNode.Tag as NodeCondition; NodeAction action = selectedTreeNode.Tag as NodeAction; NodeFlag flag = selectedTreeNode.Tag as NodeFlag; //Refresh node text if (condition != null) { selectedTreeNode.Text = condition.GetTreeText(); } if (action != null) { selectedTreeNode.Text = action.GetTreeText(); } if (flag != null) { selectedTreeNode.Text = flag.GetTreeText(); } document.RefreshTreeNode(treeNode); document.SetDirty(); }