1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using FileManager;
- using System.Xml;
- namespace MeasureData
- {
- public class MeasureConfigParam :ISlo
- {
- #region 内容
- //测量电压
- private double voltage;
- public double Voltage
- {
- get { return this.voltage; }
- set { this.voltage = value; }
- }
- //放大位数
- private double magnification;
- public double Magnification
- {
- get { return this.magnification; }
- set { this.magnification = value; }
- }
- //像素
- private double pixel_Size;
- public double Pixel_Size
- {
- get { return this.pixel_Size; }
- set { this.pixel_Size = value; }
- }
- #endregion
- public override void Serialize(bool isStoring, XmlDocument xml, XmlNode rootNode)
- {
- Slo sFile = new Slo();
- Slo sParam = new Slo();
- xDouble _voltage = new xDouble();
- xDouble _magnification = new xDouble();
- xDouble _pixelsize = new xDouble();
- _voltage.AssignValue(this.voltage);
- _magnification.AssignValue(this.magnification);
- _pixelsize.AssignValue(this.pixel_Size);
- sFile.Register("Voltage", _voltage);
- sFile.Register("Magnification", _magnification);
- sFile.Register("PixelSize", _pixelsize);
- if (isStoring)
- {
- sFile.Serialize(true, xml, rootNode);
- }
- else
- {
- sFile.Serialize(false, xml, rootNode);
- this.voltage = _voltage.value();
- this.magnification = _magnification.value();
- this.pixel_Size = _pixelsize.value();
- }
- }
- }
- }
|