Select() public method

public Select ( Document document ) : void
document Document
return void
Esempio n. 1
0
 private void document_ElementSelection(object sender, ElementSelectionEventArgs e)
 {
     OnElementSelection(e);
     if (resizeAction != null)
     {
         resizeAction.Select(document);
     }
 }
Esempio n. 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();
            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);
        }
Esempio n. 3
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);
		}