Files
CutList/CutToLength/UIItem.cs
2018-05-31 23:13:14 -04:00

33 lines
591 B
C#

using Newtonsoft.Json;
using System;
namespace CutToLength
{
public class UIItem
{
public UIItem()
{
}
public string Name { get; set; }
public double Length { get; set; }
[JsonIgnore]
public double TotalLength
{
get { return Math.Round(Length * Quantity, 8); }
}
public int Quantity { get; set; } = 1;
private string GetDefaultName()
{
if (Length == 0)
return "-";
return string.Format("{0}\" LG", Length);
}
}
}