/// <summary> /// Geeft een schetscontrol nieuwe afmetingen /// </summary> private void veranderAfmeting(object o, EventArgs ea) { schetscontrol.Size = new Size(this.ClientSize.Width - 70 , this.ClientSize.Height - 50); paneel.Location = new Point(64, this.ClientSize.Height - 30); schetscontrol.Schets.VeranderAfmeting(schetscontrol.Size); schetscontrol.RebuildBitmap(this, new EventArgs()); }
public override void MuisLos(SchetsControl s, Point p) { base.MuisLos(s, p); if (this.selectedItem != null) { // remove it and rebuild the bitmap. s.Schets.drawnItems.Remove(selectedItem); s.RebuildBitmap(this, new EventArgs()); } }
public override void MuisLos(SchetsControl s, Point p) { base.MuisLos(s, p); if (this.selectedItem != null) { int currentIndex = s.Schets.drawnItems.IndexOf(this.selectedItem); int newIndex = directionUp // Only move up if it is not already the element with the highest index ? currentIndex == s.Schets.drawnItems.Count - 1 ? currentIndex : currentIndex + 1 // Only move down if index is not 0 : currentIndex == 0 ? 0 : currentIndex - 1; // Remove and insert in new position. s.Schets.drawnItems.Remove(this.selectedItem); s.Schets.drawnItems.Insert(newIndex, this.selectedItem); s.RebuildBitmap(this, new EventArgs()); } }