Start() 공개 메소드

public Start ( Point mousePoint, Document document, OnElementMovingDelegate onElementMovingDelegate ) : void
mousePoint Point
document Document
onElementMovingDelegate OnElementMovingDelegate
리턴 void
예제 #1
0
        private void StartSelectElements(BaseElement selectedElement, Point mousePoint)
        {
            // Vefiry if element is in selection
            if (!document.SelectedElements.Contains(selectedElement))
            {
                //Clear selection and add new element to selection
                document.ClearSelection();
                document.SelectElement(selectedElement);
            }

            changed = false;


            moveAction = new MoveAction();
            OnElementMovingDelegate onElementMovingDelegate = new OnElementMovingDelegate(OnElementMoving);

            moveAction.Start(mousePoint, document, onElementMovingDelegate);


            // Get Controllers
            controllers = new IController[document.SelectedElements.Count];
            for (int i = document.SelectedElements.Count - 1; i >= 0; i--)
            {
                if (document.SelectedElements[i] is IControllable)
                {
                    // Get General Controller
                    controllers[i] = ((IControllable)document.SelectedElements[i]).GetController();
                }
                else
                {
                    controllers[i] = null;
                }
            }

            resizeAction = new ResizeAction();
            resizeAction.Select(document);
        }
예제 #2
0
		private void StartSelectElements(BaseElement selectedElement, Point mousePoint)
		{
			// Vefiry if element is in selection
			if (!document.SelectedElements.Contains(selectedElement))
			{
				//Clear selection and add new element to selection
				document.ClearSelection();
				document.SelectElement(selectedElement);
			}

			changed = false;
			

			moveAction = new MoveAction();
			MoveAction.OnElementMovingDelegate onElementMovingDelegate = new Dalssoft.DiagramNet.MoveAction.OnElementMovingDelegate(OnElementMoving);
			moveAction.Start(mousePoint, document, onElementMovingDelegate);


			// Get Controllers
			controllers = new IController[document.SelectedElements.Count];
			for(int i = document.SelectedElements.Count - 1; i >= 0; i--)
			{
				if (document.SelectedElements[i] is IControllable)
				{
					// Get General Controller
					controllers[i] = ((IControllable) document.SelectedElements[i]).GetController();
				}
				else
				{
					controllers[i] = null;
				}
			}

			resizeAction = new ResizeAction();
			resizeAction.Select(document);
		}