public ScrollTableCmd(Table table) : base("Scroll table") { this.table = table; oldRow = table.CurrScrollRow; ArrowCollection ac = table.GetAllArrows(); foreach (Arrow arrow in ac) { AddSubCmd(new ModifyItemCmd(arrow)); } }
public ExpandHeaderRowCmd(Table table, int rowIndex) : base("Expand header row") { this.table = table; this.rowIndex = rowIndex; this.oldExpanded = table.Rows[rowIndex].Expanded; newExpanded = false; ArrowCollection ac = table.GetAllArrows(); foreach (Arrow arrow in ac) { AddSubCmd(new ModifyItemCmd(arrow)); } }
private void frmFlowChart_fcFlowChart_SelectionChanged() { if (!frmFlowChart.State.creatingNode) { graphicPropertyGrid.Clear(); frmFlowChart.FlowChart.SelectionChanged -= new SelectionEvent(this.frmFlowChart_fcFlowChart_SelectionChanged); if (!frmFlowChart.State.SelectItems) { if (frmFlowChart.FlowChart.Selection.Boxes.Count > 1) { BoxCollection boxCollection = frmFlowChart.FlowChart.Selection.Boxes.Clone(); foreach (Box box in boxCollection) { box.Selected = false; } } } if (!frmFlowChart.State.SelectLinks) { if (frmFlowChart.FlowChart.Selection.Arrows.Count > 1) { ArrowCollection arrowCollection = frmFlowChart.FlowChart.Selection.Arrows.Clone(); foreach (Arrow arrow in arrowCollection) { arrow.Selected = false; } } } foreach (EditorNode item in frmFlowChart.State.Nodes) { if (item.GraphicBox.Selected) { item.Selected = true; } item.UpdateVisibility(); } if (frmFlowChart.FlowChart.ActiveObject is Arrow) { Arrow activeArrow = frmFlowChart.FlowChart.ActiveObject as Arrow; GraphicLink graphicLink = frmFlowChart.State.GraphicLink(activeArrow); if (graphicLink != null) { ModelLink modelLink; if (frmFlowChart.State.ClientProtocol.model.Links.TryGetValue(graphicLink.ModelGuid, out modelLink)) { graphicPropertyGrid.SetSelectedObject(graphicLink, modelLink, frmFlowChart.State); } else { frmFlowChart.State.ClientProtocol.LogMessage(out requestId, "ModelLink missing for GraphcLink (Tag: " + graphicLink.Tag + ", Guid: " + graphicLink.Guid + ")", SysCAD.Log.MessageType.Error); } } } if (frmFlowChart.FlowChart.ActiveObject is Box) { Box activeBox = frmFlowChart.FlowChart.ActiveObject as Box; GraphicNode graphicNode = frmFlowChart.State.GraphicNode(activeBox); ModelNode modelNode = frmFlowChart.State.ModelNode(activeBox); if ((graphicNode != null) && (modelNode != null)) { graphicPropertyGrid.SetSelectedObject(graphicNode, modelNode, frmFlowChart.State); modelPropertiesGrid.SetSelectedObject(modelNode, frmFlowChart.State); Int64 requestId; frmFlowChart.State.PropertyList(out requestId, graphicNode.Guid, graphicNode.Tag, graphicNode.Path); } } frmFlowChart.FlowChart.SelectionChanged += new SelectionEvent(this.frmFlowChart_fcFlowChart_SelectionChanged); } }