Exemple #1
0
        public bool Save(string filename)
        {
            bool retval = false;

            m_filename = filename;
            m_name     = Path.GetFileNameWithoutExtension(filename);
            XmlHelper xh        = new XmlHelper();
            bool      fileExist = xh.Start(m_filename, "MachineConfig");
            XmlNode   mc        = xh.m_toplevel;

            xh.SetParameter(mc, "PlatformXSize", m_PlatXSize);
            xh.SetParameter(mc, "PlatformYSize", m_PlatYSize);
            xh.SetParameter(mc, "PlatformZSize", m_PlatZSize);
            xh.SetParameter(mc, "MaxXFeedRate", m_XMaxFeedrate);
            xh.SetParameter(mc, "MaxYFeedRate", m_YMaxFeedrate);
            xh.SetParameter(mc, "MaxZFeedRate", m_ZMaxFeedrate);
            xh.SetParameter(mc, "MachineType", m_machinetype);
            if (m_driverconfig.Save(xh, mc))
            {
                retval = true;
            }
            m_monitorconfig.Save(xh, mc);
            xh.Save(FILE_VERSION);
            return(retval);
        }