本文整理汇总了C#中Altaxo.GetStringAttribute方法的典型用法代码示例。如果您正苦于以下问题:C# Altaxo.GetStringAttribute方法的具体用法?C# Altaxo.GetStringAttribute怎么用?C# Altaxo.GetStringAttribute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Altaxo
的用法示例。
在下文中一共展示了Altaxo.GetStringAttribute方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Deserialize
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
{
string colorSetName = info.GetString("Name");
var colorSetLevel = (Altaxo.Main.ItemDefinitionLevel)info.GetEnum("Level", typeof(Altaxo.Main.ItemDefinitionLevel));
var creationDate = info.GetDateTime("CreationDate");
var isPlotColorSet = info.GetBoolean("IsPlotColorSet");
int count = info.OpenArray("Colors");
var colors = new NamedColor[count];
for (int i = 0; i < count; ++i)
{
string name = info.GetStringAttribute("Name");
string cvalue = info.GetString("e");
colors[i] = new NamedColor(AxoColor.FromInvariantString(cvalue), name);
}
info.CloseArray(count);
return new ColorSet(colorSetName, colors);
}
示例2: ColorSet
private ColorSet(Altaxo.Serialization.Xml.IXmlDeserializationInfo info)
{
_name = info.GetString("Name");
int count = info.OpenArray("Colors");
_innerList = new NamedColor[count];
for (int i = 0; i < count; ++i)
{
string name = info.GetStringAttribute("Name");
string cvalue = info.GetString("e");
_innerList[i] = new NamedColor(AxoColor.FromInvariantString(cvalue), name, this);
}
info.CloseArray(count);
InitLazyVariables();
}