public static ArrayList GetSelectedComponentNames(DesignerReport report) { ArrayList names = new ArrayList(); foreach (Control component in report.GetSelectedComponents()) { names.Add(component); } return(names); }
void TransactionOpened(object sender, EventArgs e) { IsSelectComponents = true; if (!report.TransactionScription.StartsWith("创建") && report.TransactionScription != "一方报表" && report.GetSelectedComponents().Count == 0) { IsSelectComponents = false; return; } if (transactionLevel == 0) { undoOperations = 0; selectComponentsUndoAction = new SelectComponentsUndoAction(report, GetSelectedComponentNames(report)); undoStack.Push(selectComponentsUndoAction); } ++transactionLevel; }