public NcMachine(ControllerType controllerType, MachineGeometry machineGeometry) { ControllerType = controllerType; MachineGeometry = machineGeometry; HomePosition = new MachinePosition(); ProgStartPosition = new MachinePosition(); MachineCode = new CNCMachineCode(); commandDictionary = new CommandDictionary(); FeedrateUnits = FeedrateUnits.InPerMin; InverseFeedrateUnits = FeedrateUnits.InverseMins; }
public static CNCMachineCode Open() { if (xmlFileName != null && xmlFileName != "" && System.IO.File.Exists(xmlFileName)) { var xmls = new FileIOLib.XmlSerializer <CNCMachineCode>(); CNCMachineCode mc = xmls.OpenXML(xmlFileName); if (mc == null) { return(new CNCMachineCode()); } else { return(mc); } } return(new CNCMachineCode()); }
public static void Save(CNCMachineCode obj) { var xmls = new FileIOLib.XmlSerializer <CNCMachineCode>(); xmls.SaveXML(obj, xmlFileName); }