public void Change(ChartObject obj) { clear(); if (obj == null || obj.notInteractive()) { if (flowChart.ActiveObject != null) { flowChart.fireDeactivationEvent(); } flowChart.ActiveObject = null; } else { // change the selection addObjToSelection(obj); if (flowChart.ActiveObject != null) { flowChart.fireDeactivationEvent(); } flowChart.ActiveObject = obj; flowChart.fireActivationEvent(); } flowChart.fireSelectionChanged(); recalcRect(); }
// ************ selected objects ************ public void Toggle(ChartObject obj) { if (obj == null) { return; } // remove the object if it's already selected if (ObjectInSelection(obj)) { bool activeObjChanged = obj == flowChart.ActiveObject; removeObject(obj); if (activeObjChanged && selectedItems.Count > 0) { if (flowChart.ActiveObject != null) { flowChart.fireDeactivationEvent(); } flowChart.ActiveObject = selectedItems[0]; flowChart.fireActivationEvent(); } if (activeObjChanged && selectedItems.Count == 0) { if (flowChart.ActiveObject != null) { flowChart.fireDeactivationEvent(); } flowChart.ActiveObject = null; } recalcRect(); } // add to selection else if (!obj.notInteractive()) { if (!allowMultiSel) { clear(); } addObjToSelection(obj); if (flowChart.ActiveObject != null) { flowChart.fireDeactivationEvent(); } flowChart.ActiveObject = obj; flowChart.fireActivationEvent(); } flowChart.fireSelectionChanged(); }
public void Change(ChartObject obj) { clear(); if (obj == null || obj.notInteractive()) { if (flowChart.ActiveObject != null) flowChart.fireDeactivationEvent(); flowChart.ActiveObject = null; } else { // change the selection addObjToSelection(obj); if (flowChart.ActiveObject != null) flowChart.fireDeactivationEvent(); flowChart.ActiveObject = obj; flowChart.fireActivationEvent(); } flowChart.fireSelectionChanged(); recalcRect(); }
// ************ selected objects ************ public void Toggle(ChartObject obj) { if (obj == null) return; // remove the object if it's already selected if (ObjectInSelection(obj)) { bool activeObjChanged = obj == flowChart.ActiveObject; removeObject(obj); if (activeObjChanged && selectedItems.Count > 0) { if (flowChart.ActiveObject != null) flowChart.fireDeactivationEvent(); flowChart.ActiveObject = selectedItems[0]; flowChart.fireActivationEvent(); } if (activeObjChanged && selectedItems.Count == 0) { if (flowChart.ActiveObject != null) flowChart.fireDeactivationEvent(); flowChart.ActiveObject = null; } recalcRect(); } // add to selection else if (!obj.notInteractive()) { if (!allowMultiSel) clear(); addObjToSelection(obj); if (flowChart.ActiveObject != null) flowChart.fireDeactivationEvent(); flowChart.ActiveObject = obj; flowChart.fireActivationEvent(); } flowChart.fireSelectionChanged(); }