本文整理汇总了C#中Altaxo.SetProperty方法的典型用法代码示例。如果您正苦于以下问题:C# Altaxo.SetProperty方法的具体用法?C# Altaxo.SetProperty怎么用?C# Altaxo.SetProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Altaxo
的用法示例。
在下文中一共展示了Altaxo.SetProperty方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Serialize
public void Serialize(object obj, Altaxo.Serialization.Xml.IXmlSerializationInfo info)
{
var s = (ColorSet)obj;
info.SetProperty(GetSerializationRegistrationKey(s), "True"); // Register a property to note that this color set is already serialized.
info.AddValue("Name", s._name);
info.CreateArray("Colors", s._innerList.Length);
foreach (NamedColor c in s)
{
info.CreateElement("e");
info.AddAttributeValue("Name", c.Name);
info.SetNodeContent(c.Color.ToInvariantString());
info.CommitElement();
}
info.CommitArray();
}
示例2: Serialize
public virtual void Serialize(object obj, Altaxo.Serialization.Xml.IXmlSerializationInfo info)
{
Altaxo.Data.DataTable s = (Altaxo.Data.DataTable)obj;
info.AddValue("Name", s._name); // name of the Table
string originalSaveAsTemplateOption = null;
bool saveDataAsTemplateRequired = null != s._tableDataSource && s._tableDataSource.ImportOptions.DoNotSaveCachedTableData;
if (saveDataAsTemplateRequired)
{
originalSaveAsTemplateOption = info.GetProperty("Altaxo.Data.DataColumn.SaveAsTemplate");
info.SetProperty("Altaxo.Data.DataColumn.SaveAsTemplate", "true");
}
info.AddValue("DataCols", s._dataColumns);
if (saveDataAsTemplateRequired)
{
info.SetProperty("Altaxo.Data.DataColumn.SaveAsTemplate", originalSaveAsTemplateOption);
}
info.AddValue("PropCols", s._propertyColumns); // the property columns of that table
info.AddValue("TableScript", s._tableScript);
info.AddValue("Properties", s._tableProperties);
info.AddValue("Notes", s._notes.Text);
info.AddValue("CreationTime", s._creationTime.ToLocalTime());
info.AddValue("LastChangeTime", s._lastChangeTime.ToLocalTime());
if (null != s._tableDataSource)
info.AddValue("TableDataSource", s._tableDataSource);
}