public void Update(webclient element) { if (element.m_me.HasValue == true) { this.me = element.me; } if (element.m_planbackground != null) { this.planbackground = element.planbackground; } if (element.m_port.HasValue == true) { this.port = element.port; } if (element.m_refresh.HasValue == true) { this.refresh = element.refresh; } if (element.m_rulerbackground != null) { this.rulerbackground = element.rulerbackground; } if (element.m_symbolpath != null) { this.symbolpath = element.symbolpath; } if (element.m_symbolsize.HasValue == true) { this.symbolsize = element.symbolsize; } if (element.m_symboltype != null) { this.symboltype = element.symboltype; } if (element.m_webcampath != null) { this.webcampath = element.webcampath; } if (element.m_webcampos != null) { this.webcampos = element.webcampos; } if (element.m_xsize.HasValue == true) { this.xsize = element.xsize; } if (element.m_ysize.HasValue == true) { this.ysize = element.ysize; } this.webcamlist = element.webcamlist; }
public static webclient Parse(System.Xml.Linq.XElement xml, CRocrailClient rocrailClient) { webclient _webclient = new webclient(); _webclient.m_rocrailClient = rocrailClient; _webclient.m_me = (bool?)xml.Attribute("me"); _webclient.m_planbackground = (string)xml.Attribute("planbackground"); _webclient.m_port = (int?)xml.Attribute("port"); _webclient.m_refresh = (int?)xml.Attribute("refresh"); _webclient.m_rulerbackground = (string)xml.Attribute("rulerbackground"); _webclient.m_symbolpath = (string)xml.Attribute("symbolpath"); _webclient.m_symbolsize = (int?)xml.Attribute("symbolsize"); _webclient.m_symboltype = (string)xml.Attribute("symboltype"); _webclient.m_webcampath = (string)xml.Attribute("webcampath"); _webclient.m_webcampos = (string)xml.Attribute("webcampos"); _webclient.m_xsize = (int?)xml.Attribute("xsize"); _webclient.m_ysize = (int?)xml.Attribute("ysize"); Definitions.Tools.ParseList <webcam>(_webclient.m_webcamlist, xml, "webcam", webcam.Parse, rocrailClient); return(_webclient); }