Files
Shrlalgo.RvKits/ShrlAlgoToolkit.RevitAddins/Mep/InsulationItem.cs
2026-02-22 20:03:42 +08:00

52 lines
1.3 KiB
C#

using System.ComponentModel.DataAnnotations;
using Autodesk.Revit.DB.Mechanical;
using Autodesk.Revit.DB.Plumbing;
using CommunityToolkit.Mvvm.ComponentModel;
namespace ShrlAlgoToolkit.RevitAddins.RvMEP;
public partial class InsulationItem : ObservableValidator
{
[Common.Attributes.GreaterThan(nameof(MinDiameter))]
[Range(15, 1000)]
public double MaxDiameter
{
get => maxDiameter;
set
{
SetProperty(ref maxDiameter, value, true);
}
}
private double maxDiameter;
[Range(0, 1000)]
public double MinDiameter
{
get => minDiameter;
set
{
SetProperty(ref minDiameter, value, true);
ValidateProperty(MaxDiameter, nameof(MaxDiameter));
}
}
private double minDiameter;
[Required]
[Range(10, 1000)]
[NotifyDataErrorInfo]
[ObservableProperty]
public partial double Thickness { get; set; }
//{
// get => thickness;
// set => SetProperty(ref thickness, value, true);
//}
//private double thickness;
[ObservableProperty]
public partial PipeInsulationType PipeInsulationType { get; set; }
[ObservableProperty]
public partial DuctInsulationType DuctInsulationType { get; set; }
}