Files
UVtools/UVtools.WPF/Structures/PixelPicker.cs
T
Tiago Conceição c43badb9c1 v2.12.1
- (Upgrade) AvaloniaUI from 0.10.4 to 0.10.5
- (Improvement) VDT: Implement a new key for better auto convert files between with latest version of Tango
- (Change) Exposure time finder: Bar fence offset from 2px to 4px
2021-05-19 21:42:07 +01:00

50 lines
1.1 KiB
C#

using System.Drawing;
using UVtools.Core.Objects;
namespace UVtools.WPF.Structures
{
public class PixelPicker : BindableBase
{
private bool _isSet;
private Point _location = new(0,0);
private byte _brightness;
public bool IsSet
{
get => _isSet;
private set => RaiseAndSetIfChanged(ref _isSet, value);
}
public Point Location
{
get => _location;
set => RaiseAndSetIfChanged(ref _location, value);
}
public byte Brightness
{
get => _brightness;
private set => RaiseAndSetIfChanged(ref _brightness, value);
}
public void Set(Point location, byte brightness)
{
Location = location;
Brightness = brightness;
IsSet = true;
}
public void Reset()
{
Location = Point.Empty;
Brightness = 0;
IsSet = false;
}
public override string ToString()
{
return $"{{X={_location.X}, Y={_location.Y}, B={_brightness}}}";
}
}
}