mirror of
https://github.com/riegera2412/UVtools.git
synced 2026-07-12 11:32:33 +02:00
6cfedea4cc
* **File formats:** * PhotonS: Implement the write/encode method to allow to use this format and fix the thumbnail * VDT: Allow to auto convert the .vdt to the target printer format using the Machine - Notes, using a flag: FILEFORMAT_YourPrinterExtension, for example: FILEFORMAT_CTB * (Fix) Unable to convert files with no thumbnails to other file format that requires thumbnails * **Tools:** * (Add) Re-height: Option to Anti-Aliasing layers * (Fix) Morph and Blur: The combobox was not setting to the selected item when preform a redo operation (Ctrl+Shift+Z) * **GUI:** * (Change) Progress window to be a grid element inside MainWindow, this allow to reuse the graphics and its elements without the need of spawning a Window instance everytime a progress is shown, resulting in better performance and more fluid transaction * (Improvement) Clear issues when generating calibration tests
74 lines
2.1 KiB
C#
74 lines
2.1 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.Collections.Generic;
|
|
|
|
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);
|
|
}
|
|
|
|
public string ValueAsString
|
|
{
|
|
get => Value?.ToString();
|
|
set => Value = value;
|
|
}
|
|
|
|
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;
|
|
}
|
|
}
|
|
}
|