Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
        // ************ 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();
        }
Exemplo n.º 3
0
		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();
		}
Exemplo n.º 4
0
		// ************ 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();
		}