本文整理汇总了C#中Altaxo.CommitElement方法的典型用法代码示例。如果您正苦于以下问题:C# Altaxo.CommitElement方法的具体用法?C# Altaxo.CommitElement怎么用?C# Altaxo.CommitElement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Altaxo
的用法示例。
在下文中一共展示了Altaxo.CommitElement方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Serialize
public void Serialize(object obj, Altaxo.Serialization.Xml.IXmlSerializationInfo info)
{
AscendingIntegerCollection s = (AscendingIntegerCollection)obj;
int count = s.GetRangeCount();
info.CreateArray("Ranges", count);
int currentpos = 0;
ContiguousIntegerRange range;
while (s.GetNextRangeAscending(ref currentpos, out range))
{
info.CreateElement("e");
info.AddValue("Start", range.Start);
info.AddValue("Count", range.Count);
info.CommitElement();
}
info.CommitArray();
}
示例2: Serialize
public void Serialize(object obj, Altaxo.Serialization.Xml.IXmlSerializationInfo info)
{
var s = (ColorSetBag)obj;
info.CreateArray("ColorSets", s._colorSets.Length);
foreach (var c in s._colorSets)
{
info.CreateElement("e");
info.AddValue("ColorSet", c.Item1);
info.AddValue("IsPlotColorSet", c.Item2);
info.CommitElement();
}
info.CommitArray();
}
示例3: 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();
}
示例4: Serialize
public virtual void Serialize(object obj, Altaxo.Serialization.Xml.IXmlSerializationInfo info)
{
GraphDocument s = (GraphDocument)obj;
// info.AddBaseValueEmbedded(s,typeof(GraphDocument).BaseType);
// now the data of our class
info.AddValue("Name",s._name);
info.AddValue("PageBounds",s._pageBounds);
info.AddValue("PrintableBounds",s._printableBounds);
info.AddValue("Layers",s._layers);
// new in version 1 - Add graph properties
int numberproperties = s._graphProperties==null ? 0 : s._graphProperties.Keys.Count;
info.CreateArray("TableProperties",numberproperties);
if(s._graphProperties!=null)
{
foreach(string propkey in s._graphProperties.Keys)
{
if(propkey.StartsWith("tmp/"))
continue;
info.CreateElement("e");
info.AddValue("Key",propkey);
object val = s._graphProperties[propkey];
info.AddValue("Value",info.IsSerializable(val) ? val : null);
info.CommitElement();
}
}
info.CommitArray();
}
示例5: Serialize
public virtual void Serialize(object obj, Altaxo.Serialization.Xml.IXmlSerializationInfo info)
{
WorksheetLayout s = (WorksheetLayout)obj;
info.AddValue("Guid",System.Xml.XmlConvert.ToString(s.m_Guid));
info.AddValue("Table",Main.DocumentPath.GetAbsolutePath(s.m_DataTable));
info.AddValue("RowHeaderStyle",s.m_RowHeaderStyle);
info.AddValue("ColumnHeaderStyle",s.m_ColumnHeaderStyle);
info.AddValue("PropertyColumnHeaderStyle",s.m_PropertyColumnHeaderStyle);
info.CreateArray("DefaultColumnStyles",s.m_DefaultColumnStyles.Values.Count);
foreach(object style in s.m_DefaultColumnStyles.Values)
info.AddValue("DefaultColumnStyle",style);
info.CommitArray();
info.CreateArray("ColumnStyles",s.m_ColumnStyles.Count);
foreach(System.Collections.DictionaryEntry dictentry in s.m_ColumnStyles)
{
info.CreateElement("e");
Main.IDocumentNode col = (Main.IDocumentNode)dictentry.Key;
info.AddValue("Column", Main.DocumentPath.GetAbsolutePath(col));
info.AddValue("Style",dictentry.Value);
info.CommitElement(); // "e"
}
info.CommitArray();
}
示例6: Serialize
public virtual void Serialize(object obj, Altaxo.Serialization.Xml.IXmlSerializationInfo info)
{
Altaxo.Data.DataTable s = (Altaxo.Data.DataTable)obj;
info.AddValue("Name",s._tableName); // name of the Table
info.AddValue("DataCols",s._dataColumns);
info.AddValue("PropCols", s._propertyColumns); // the property columns of that table
// new in version 1
info.AddValue("TableScript",s._tableScript);
// new in version 2 - Add table properties
int numberproperties = s._tableProperties==null ? 0 : s._tableProperties.Keys.Count;
info.CreateArray("TableProperties",numberproperties);
if(s._tableProperties!=null)
{
foreach(string propkey in s._tableProperties.Keys)
{
if(propkey.StartsWith("tmp/"))
continue;
info.CreateElement("e");
info.AddValue("Key",propkey);
object val = s._tableProperties[propkey];
info.AddValue("Value",info.IsSerializable(val) ? val : null);
info.CommitElement();
}
}
info.CommitArray();
}
示例7: Serialize
public virtual void Serialize(object obj, Altaxo.Serialization.Xml.IXmlSerializationInfo info)
{
WorksheetLayout s = (WorksheetLayout)obj;
info.AddValue("Guid", System.Xml.XmlConvert.ToString(s._guid));
info.AddValue("Table", Main.AbsoluteDocumentPath.GetAbsolutePath(s._dataTable));
info.AddValue("RowHeaderStyle", s._rowHeaderStyle);
info.AddValue("ColumnHeaderStyle", s._columnHeaderStyle);
info.AddValue("PropertyColumnHeaderStyle", s._propertyColumnHeaderStyle);
info.CreateArray("DefaultColumnStyles", s._dataColumnStyles.DefaultColumnStyles.Values.Count);
foreach (object style in s._dataColumnStyles.DefaultColumnStyles.Values)
info.AddValue("DefaultColumnStyle", style);
info.CommitArray();
info.CreateArray("ColumnStyles", s._dataColumnStyles.Count);
foreach (KeyValuePair<DataColumn, ColumnStyle> dictentry in s._dataColumnStyles)
{
info.CreateElement("e");
info.AddValue("Column", Main.AbsoluteDocumentPath.GetAbsolutePath(dictentry.Key));
info.AddValue("Style", dictentry.Value);
info.CommitElement(); // "e"
}
info.CommitArray();
}
示例8: Serialize
public virtual void Serialize(object obj, Altaxo.Serialization.Xml.IXmlSerializationInfo info)
{
var s = (DataTableMultipleColumnProxy)obj;
info.AddValue("Table", s._dataTable);
info.AddValue("Group", s._groupNumber);
info.AddValue("UseAllAvailableDataRows", s._useAllAvailableDataRows);
info.CreateArray("DataColumnsBundles", s._dataColumnBundles.Count);
foreach (var entry in s._dataColumnBundles)
{
info.CreateElement("e");
info.AddValue("Identifier", entry.Key);
info.AddValue("MaximumNumberOfColumns", entry.Value.MaximumNumberOfColumns);
info.CreateArray("DataColumns", entry.Value.DataColumns.Count);
foreach (var proxy in entry.Value.DataColumns)
info.AddValue("e", proxy);
info.CommitArray();
info.CommitElement();
}
info.CommitArray();
if (!s._useAllAvailableDataRows)
{
info.AddValue("DataRows", s._participatingDataRows);
}
}
示例9: Serialize
public void Serialize(object obj, Altaxo.Serialization.Xml.IXmlSerializationInfo info )
{
Altaxo.Data.DataColumnCollection s = (Altaxo.Data.DataColumnCollection)obj;
info.CreateArray("ColumnArray",s.m_ColumnsByNumber.Count);
for(int i=0;i<s.m_ColumnsByNumber.Count;i++)
{
info.CreateElement("Column");
DataColumnInfo colinfo = s.GetColumnInfo(i);
info.AddValue("Name",colinfo.Name);
info.AddValue("Kind",(int)colinfo.Kind);
info.AddValue("Group",colinfo.Group);
info.AddValue("Data",s.m_ColumnsByNumber[i]);
info.CommitElement();
}
info.CommitArray();
// serialize the column scripts
info.CreateArray("ColumnScripts",s.m_ColumnScripts.Count);
foreach(System.Collections.DictionaryEntry entry in s.m_ColumnScripts)
{
info.CreateElement("Script");
info.AddValue("ColName", s.GetColumnName((Altaxo.Data.DataColumn)entry.Key));
info.AddValue("Content",entry.Value);
info.CommitElement();
}
info.CommitArray();
}