Exemple #1
0
		internal void deleteGroup(Group group)
		{
			groups.Remove(group);
			group.onDelete();
			group = null;
		}
Exemple #2
0
		/// <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;
			}
		}