Esempio n. 1
0
		internal void restoreState(SelectionState state)
		{
			foreach (ChartObject obj in selectedItems)
				if (!state.SelectedItems.Contains(obj))
					obj.setSelected(false);

			selectedItems = state.SelectedItems.Clone();
			selectedBoxes = state.SelectedBoxes.Clone();
			selectedTables = state.SelectedTables.Clone();
			selectedArrows = state.SelectedArrows.Clone();
			selectedHosts = state.SelectedHosts.Clone();
			flowChart.ActiveObject = state.ActiveItem;

			foreach (ChartObject obj in selectedItems)
				obj.setSelected(true);
		}
Esempio n. 2
0
		internal SelectionState saveState()
		{
			SelectionState state = new SelectionState();

			state.SelectedItems = Objects.Clone();
			state.SelectedBoxes = Boxes.Clone();
			state.SelectedTables = Tables.Clone();
			state.SelectedArrows = Arrows.Clone();
			state.SelectedHosts = ControlHosts.Clone();
			state.ActiveItem = flowChart.ActiveObject;

			return state;
		}