public bool Save(XmlHelper xh, XmlNode parent) // use new xml system -SHS { bool retval = false; XmlNode mdc = xh.FindSection(parent, "MotorsDriverConfig"); xh.SetParameter(mdc, "DriverType", m_drivertype); if (m_connection.Save(xh, mdc)) { retval = true; } return(retval); }
public bool Save(XmlHelper xh, XmlNode parent) // use new xml system -SHS { XmlNode mdc = xh.FindSection(parent, "MonitorDriverConfig"); xh.SetParameter(mdc, "DLP_X_Res", m_XDLPRes); xh.SetParameter(mdc, "DLP_Y_Res", m_YDLPRes); // m_Xpixpermm and m_Ypixpermm are calculated dinamically, no need to save/load //xh.SetParameter(mdc, "PixPermmX", m_Xpixpermm); //xh.SetParameter(mdc, "PixPermmY", m_Ypixpermm); xh.SetParameter(mdc, "MonitorID", m_monitorid); xh.SetParameter(mdc, "DisplayCommEnabled", m_displayconnectionenabled); m_displayconnection.Save(xh, mdc); return(true); }
public bool Save(XmlHelper xh, XmlNode parent) // use new xml system -SHS { // XmlNode mdc = xh.FindSection(parent, "MonitorDriverConfig"); XmlNode mdc = xh.AddSection(parent, "MonitorDriverConfig"); xh.SetParameter(mdc, "DLP_X_Res", m_XDLPRes); // gotta make this auto.. xh.SetParameter(mdc, "DLP_Y_Res", m_YDLPRes); xh.SetParameter(mdc, "MonitorID", m_monitorid); xh.SetParameter(mdc, "DisplayCommEnabled", m_displayconnectionenabled); m_displayconnection.Save(xh, mdc); xh.SetParameter(mdc, "MonitorTop", m_monitorrect.top); xh.SetParameter(mdc, "MonitorLeft", m_monitorrect.left); xh.SetParameter(mdc, "MonitorRight", m_monitorrect.right); xh.SetParameter(mdc, "MonitorBottom", m_monitorrect.bottom); return(true); }
public bool Save(XmlWriter xw) { try { bool retval = false; xw.WriteStartElement("DriverConfig"); xw.WriteElementString("DriverType", m_drivertype.ToString()); if (m_connection.Save(xw)) { retval = true; } xw.WriteEndElement(); return(retval); } catch (Exception ex) { DebugLogger.Instance().LogRecord(ex.Message); return(false); } }