|
|
@@ -59,10 +59,6 @@ namespace OTSIncAMeasureApp.SourceGridStringProvider
|
|
|
return value;
|
|
|
}
|
|
|
//xInt operator=(const int value) { AssignValue(value); return *this; }; //c#不可以重载=
|
|
|
- public static implicit operator xInt(int value)
|
|
|
- {
|
|
|
- return new xInt(value);
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
public class xDouble : MemberBase
|
|
|
@@ -77,15 +73,8 @@ namespace OTSIncAMeasureApp.SourceGridStringProvider
|
|
|
return value;
|
|
|
}
|
|
|
//xDouble operator=(const double value) { AssignValue(value); return *this; }; //c#不可以重载=
|
|
|
- public static implicit operator xDouble(double value)
|
|
|
- {
|
|
|
- return new xDouble(value);
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
public class xLong : MemberBase
|
|
|
{
|
|
|
public void AssignValue(long value) { m_sValue = value.ToString(); } //因为c#无=重载,所以修改为public public xLong() { AssignValue(0); }
|
|
|
@@ -98,10 +87,6 @@ namespace OTSIncAMeasureApp.SourceGridStringProvider
|
|
|
return value;
|
|
|
}
|
|
|
//xLong operator=(const long value) { AssignValue(value); return *this; }; //c#不可以重载=
|
|
|
- public static implicit operator xLong(long value)
|
|
|
- {
|
|
|
- return new xLong(value);
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
public class xDWORD : MemberBase
|
|
|
@@ -116,10 +101,6 @@ namespace OTSIncAMeasureApp.SourceGridStringProvider
|
|
|
return value;
|
|
|
}
|
|
|
//xDWORD operator=(const DWORD value) { AssignValue(value); return *this; };
|
|
|
- public static implicit operator xDWORD(uint value)
|
|
|
- {
|
|
|
- return new xDWORD(value);
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
public class xBool : MemberBase
|
|
|
@@ -165,10 +146,6 @@ namespace OTSIncAMeasureApp.SourceGridStringProvider
|
|
|
return Convert.ToDateTime(m_sValue);
|
|
|
}
|
|
|
//xTime_t operator=(const time_t value) { AssignValue(value); return *this; };
|
|
|
- public static implicit operator xTime_t(DateTime value)
|
|
|
- {
|
|
|
- return new xTime_t(value);
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
// class __declspec(dllexport) xOleDateTime : public MemberBase //COleDateTime对应c#类型?统一改为time_t
|
|
|
@@ -202,10 +179,6 @@ namespace OTSIncAMeasureApp.SourceGridStringProvider
|
|
|
}
|
|
|
|
|
|
//xOleDateTimeSpan operator=(const COleDateTimeSpan value) { AssignValue(value); return *this; };
|
|
|
- public static implicit operator xOleDateTimeSpan(TimeSpan value)
|
|
|
- {
|
|
|
- return new xOleDateTimeSpan(value);
|
|
|
- }
|
|
|
};
|
|
|
|
|
|
public class xRect : MemberBase
|
|
|
@@ -333,10 +306,6 @@ namespace OTSIncAMeasureApp.SourceGridStringProvider
|
|
|
return p;
|
|
|
}
|
|
|
//xPoint operator=(const CPoint value) { AssignValue(value); return *this; };
|
|
|
- public static implicit operator xPoint(System.Drawing.Point value)
|
|
|
- {
|
|
|
- return new xPoint(value);
|
|
|
- }
|
|
|
};
|
|
|
|
|
|
|
|
|
@@ -478,18 +447,18 @@ namespace OTSIncAMeasureApp.SourceGridStringProvider
|
|
|
}
|
|
|
|
|
|
|
|
|
- public override void Serialize(bool isStoring, XmlDocument xml, XmlNode rootNode)
|
|
|
+ public override void Serialize(bool isStoring, XmlDocument classDoc, XmlNode rootNode)
|
|
|
{
|
|
|
if (isStoring)
|
|
|
{
|
|
|
- if (xml.DocumentElement != null)
|
|
|
+ if (classDoc.DocumentElement != null)
|
|
|
{
|
|
|
- toXML(xml, rootNode);
|
|
|
+ toXML(classDoc, rootNode);
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- fromXML(xml, rootNode);
|
|
|
+ fromXML(classDoc, rootNode);
|
|
|
}
|
|
|
}
|
|
|
public void toXML(XmlDocument xml, XmlNode rootNode)
|