mirror of
https://github.com/riegera2412/UVtools.git
synced 2026-07-13 20:07:40 +02:00
c43badb9c1
- (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
50 lines
1.1 KiB
C#
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}}}";
|
|
}
|
|
}
|
|
}
|