public static GCodeFile Load(string path) { GCodeParser.Reset(); GCodeParser.ParseFile(path); return(new GCodeFile(GCodeParser.Commands) { FileName = path.Substring(path.LastIndexOf('\\') + 1) }); }
public static GCodeFile Load(string path) { GCodeParser.Reset(); GCodeParser.ParseFile(path); GCodeFile gcodeFile = new GCodeFile(GCodeParser.Commands) { FileName = path.Substring(path.LastIndexOf('\\') + 1) }; gcodeFile.Warnings.InsertRange(0, GCodeParser.Warnings); return(gcodeFile); }