Beispiel #1
0
        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 MachineSettings Open(string fileName)
 {
     if (fileName != null && fileName != "" && System.IO.File.Exists(fileName))
     {
         var             xmls = new FileIOLib.XmlSerializer <MachineSettings>();
         MachineSettings ms   = xmls.OpenXML(fileName);
         if (ms == null)
         {
             return(new MachineSettings());
         }
         else
         {
             return(ms);
         }
     }
     else
     {
         return(new MachineSettings());
     }
 }