SelectionEventArgs.cs 1.1 KB

123456789101112131415161718192021222324252627
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace SOTF_Savegame_Editor.PictureZBoxEventArgs {
  7. public class SelectionEventArgs {
  8. private Rectangle _selection;
  9. public SelectionEventArgs(Rectangle selection) {
  10. this._selection = selection;
  11. }
  12. public Rectangle Selection { get => _selection; }
  13. public int X { get => _selection.X; set => _selection.X = value; }
  14. public int Y { get => _selection.Y; set => _selection.Y = value; }
  15. public int Width { get => _selection.Width; set => _selection.Width = value; }
  16. public int Height { get => _selection.Height; set => _selection.Height = value; }
  17. public Point Location {
  18. get { return new Point(this._selection.X, this._selection.Y); }
  19. set { this._selection.X = value.X; this._selection.Y = value.Y; }
  20. }
  21. public Size Size {
  22. get { return new Size(this._selection.Width, this._selection.Width); }
  23. set { this._selection.Width = value.Width; this._selection.Height = value.Height; }
  24. }
  25. }
  26. }