Move 38 files from root directory into organized subfolders: - Enums/ (7 files): StatusType, ApplicationType, DrawingType, etc. - Geometry/ (5 files): Vector, Box, Size, Spacing, Node - Models/ (15 files): Nest, Plate, Part, Program, Report, etc. - Utilities/ (7 files): MathHelper, Tolerance, ZipHelper, etc. - Extensions/ (2 files): PartListExtensions, PlateListExtensions - Interfaces/ (1 file): IMovable Update namespaces to follow folder hierarchy (e.g., PepLib.Models). Add GlobalUsings.cs for internal backward compatibility. Update Codes/ and IO/ files with new using statements. Update PepApi.Core consumers to reference new namespaces. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
99 lines
2.2 KiB
C#
99 lines
2.2 KiB
C#
using PepLib.Enums;
|
|
using PepLib.IO;
|
|
|
|
namespace PepLib.Models
|
|
{
|
|
public class NestInfo
|
|
{
|
|
public string Name { get; set; }
|
|
|
|
public DateTime DateCreated { get; set; }
|
|
|
|
public DateTime DateLastModified { get; set; }
|
|
|
|
public StatusType Status { get; set; }
|
|
|
|
public int LoopCount { get; set; }
|
|
|
|
public int ProgramCount { get; set; }
|
|
|
|
public int PlateCount { get; set; }
|
|
|
|
public string Comments { get; set; }
|
|
|
|
public string Customer { get; set; }
|
|
|
|
public string ProgrammedBy { get; set; }
|
|
|
|
public int MaterialNumber { get; set; }
|
|
|
|
public string MaterialGrade { get; set; }
|
|
|
|
public string Notes { get; set; }
|
|
|
|
public string DefaultPlateSize { get; set; }
|
|
|
|
public string Kerf { get; set; }
|
|
|
|
public string PostedAs { get; set; }
|
|
|
|
public string Errors { get; set; }
|
|
|
|
public string UserDefined1 { get; set; }
|
|
|
|
public string UserDefined2 { get; set; }
|
|
|
|
public string UserDefined3 { get; set; }
|
|
|
|
public string UserDefined4 { get; set; }
|
|
|
|
public string UserDefined5 { get; set; }
|
|
|
|
public string UserDefined6 { get; set; }
|
|
|
|
public static NestInfo Load(string nestFile)
|
|
{
|
|
var reader = new NestInfoReader();
|
|
reader.Read(nestFile);
|
|
return reader.Info;
|
|
}
|
|
|
|
public static NestInfo Load(Stream stream)
|
|
{
|
|
var reader = new NestInfoReader();
|
|
reader.Read(stream);
|
|
return reader.Info;
|
|
}
|
|
|
|
public static bool TryLoad(string nestFile, out NestInfo nestInfo)
|
|
{
|
|
try
|
|
{
|
|
nestInfo = Load(nestFile);
|
|
}
|
|
catch (Exception)
|
|
{
|
|
nestInfo = null;
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
public static bool TryLoad(Stream stream, out NestInfo nestInfo)
|
|
{
|
|
try
|
|
{
|
|
nestInfo = Load(stream);
|
|
}
|
|
catch (Exception)
|
|
{
|
|
nestInfo = null;
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
}
|
|
}
|