// If any elements were drawn, add them to the drawnItem and add the drawnItem to the Schets.DrawnItems.
 public virtual void Finalize(SchetsControl s)
 {
     if (this.drawnItem != null && this.drawnItem.elements != null && this.drawnItem.elements.Count > 0)
     {
         s.Schets.drawnItems.Add(this.drawnItem);
     }
     drawnItem = new DrawnItem();
 }
Пример #2
0
 /// <summary>
 /// Voert een ongedane actie opnieuw uit
 /// </summary>
 internal void Redo()
 {
     if (schets.undoStack.Count > 0)
     {
         DrawnItem item = schets.undoStack.Pop();
         schets.drawnItems.Add(item);
         this.RebuildBitmap(this, new EventArgs());
     }
 }
Пример #3
0
        public override void MuisLos(SchetsControl s, Point p)
        {
            // Reset the selected item (because the user made a new click)
            this.selectedItem = null;

            // Get the object that was clicked
            var clickedObjects = s.Schets.drawnItems.Where(o => o.elements.Any(e => e.WasClicked(p)));

            if (clickedObjects != null && clickedObjects.Count() > 0)
            {
                selectedItem = clickedObjects.Last();
            }
        }