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>
107 lines
2.4 KiB
C#
107 lines
2.4 KiB
C#
using PepLib.Enums;
|
|
using PepLib.IO;
|
|
|
|
namespace PepLib.Models
|
|
{
|
|
public class DrawingInfo
|
|
{
|
|
public string Name { get; set; }
|
|
|
|
public string Revision { get; set; }
|
|
|
|
public string Customer { get; set; }
|
|
|
|
public string Description { get; set; }
|
|
|
|
public string Comment { get; set; }
|
|
|
|
public string Notes { get; set; }
|
|
|
|
public string Source { get; set; }
|
|
|
|
public DateTime CreationDate { get; set; }
|
|
|
|
public DateTime LastModifiedDate { get; set; }
|
|
|
|
public DateTime LastReferenceDate { get; set; }
|
|
|
|
public int MachineNumber { get; set; }
|
|
|
|
public ApplicationType Application { get; set; }
|
|
|
|
public int MaterialNumber { get; set; }
|
|
|
|
public string MaterialGrade { get; set; }
|
|
|
|
public string Specification { get; set; }
|
|
|
|
public string Hardness { get; set; }
|
|
|
|
public GrainType Grain { get; set; }
|
|
|
|
public string ProgrammedBy { get; set; }
|
|
|
|
public string CreatedBy { get; set; }
|
|
|
|
public string Errors { get; set; }
|
|
|
|
public DrawingType Type { 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 DrawingInfo Load(string nestFile)
|
|
{
|
|
var reader = new DrawingInfoReader();
|
|
reader.Read(nestFile);
|
|
return reader.Info;
|
|
}
|
|
|
|
public static DrawingInfo Load(Stream stream)
|
|
{
|
|
var reader = new DrawingInfoReader();
|
|
reader.Read(stream);
|
|
return reader.Info;
|
|
}
|
|
|
|
public static bool TryLoad(string nestfile, out DrawingInfo drawingInfo)
|
|
{
|
|
try
|
|
{
|
|
drawingInfo = Load(nestfile);
|
|
}
|
|
catch (Exception)
|
|
{
|
|
drawingInfo = null;
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
public static bool TryLoad(Stream stream, out DrawingInfo drawingInfo)
|
|
{
|
|
try
|
|
{
|
|
drawingInfo = Load(stream);
|
|
}
|
|
catch (Exception)
|
|
{
|
|
drawingInfo = null;
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
}
|
|
}
|