コード例 #1
0
ファイル: FlowChart.cs プロジェクト: ChrisMoreton/Test3
		internal void deleteGroup(Group group)
		{
			groups.Remove(group);
			group.onDelete();
			group = null;
		}
コード例 #2
0
ファイル: FlowChart.cs プロジェクト: ChrisMoreton/Test3
		/// <summary>
		/// Creates a new hierarchical group.
		/// </summary>
		/// <param name="mainObj">The group master item; the subordinated items will follow the
		/// master one when it is moved around.</param>
		/// <returns>A new Group instance.</returns>
		public Group CreateGroup(ChartObject mainObj)
		{
			if (mainObj == null) return null;

			Group group = new Group(this);
			if (group.setMainObject(mainObj))
			{
				AddGroupCmd cmd= new AddGroupCmd(mainObj, group);
				undoManager.executeCommand(cmd);
				return group;
			}
			else
			{
				group.onDelete();
				group = null;
				return null;
			}
		}