Files
Tiago Conceição 3130ebe0f2 v3.4.0
- **Tools:**
   - (Add) PCB exposure: Converts a gerber file to a pixel perfect image given your printer LCD/resolution to exposure the copper traces.
   - (Improvement) Export settings now indent the XML to be more user friendly to edit
   - (Improvement) Layer import: Allow to have profiles
   - (Improvement) Layer import: Validates if selected files exists before execute
   - (Fix) Lithophane: Disallow having start threshold equal to end threshold
- (Add) Windows explorer: Right-click on files will show "Open with UVtools" on context menu which opens the selected file on UVtools (Windows MSI only)
- (Improvement) Island and overhang detection: Ignore detection on all layers that are in direct contact with the plate (On same first layer position)
- (Improvement) Cmd: Better error messages for convert command when using shared extensions and no extension
2022-05-02 01:02:13 +01:00

79 lines
2.0 KiB
C#

/*
* GNU AFFERO GENERAL PUBLIC LICENSE
* Version 3, 19 November 2007
* Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
* Everyone is permitted to copy and distribute verbatim copies
* of this license document, but changing it is not allowed.
*/
using System;
using System.Text.Json.Serialization;
using System.Xml.Serialization;
namespace UVtools.Core.Objects;
public class ValueDescription : BindableBase, IEquatable<ValueDescription>
{
private object? _value;
private string? _description;
public object? Value
{
get => _value;
set => RaiseAndSetIfChanged(ref _value, value);
}
public string? Description
{
get => _description;
set => RaiseAndSetIfChanged(ref _description, value);
}
[XmlIgnore]
[JsonIgnore]
public string ValueAsString
{
get => Value?.ToString() ?? string.Empty;
set => Value = value;
}
public ValueDescription()
{
}
public ValueDescription(object value, string? description = null)
{
Value = value;
Description = description;
}
public ValueDescription(object value, object? description = null)
{
Value = value;
Description = description?.ToString();
}
public bool Equals(ValueDescription? other)
{
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
return Equals(_value, other._value) && _description == other._description;
}
public override bool Equals(object? obj)
{
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
if (obj.GetType() != this.GetType()) return false;
return Equals((ValueDescription) obj);
}
public override int GetHashCode()
{
return HashCode.Combine(_value, _description);
}
public override string? ToString()
{
return Description;
}
}