当前位置: 首页>>代码示例>>C#>>正文


C# Altaxo.OpenElement方法代码示例

本文整理汇总了C#中Altaxo.OpenElement方法的典型用法代码示例。如果您正苦于以下问题:C# Altaxo.OpenElement方法的具体用法?C# Altaxo.OpenElement怎么用?C# Altaxo.OpenElement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Altaxo的用法示例。


在下文中一共展示了Altaxo.OpenElement方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Deserialize

			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				var s = null != o ? (WorksheetViewLayout)o : new WorksheetViewLayout();

				XmlSerializationSurrogate0 surr = new XmlSerializationSurrogate0();
				surr._TableController = s;
				if (info.CurrentElementName == "Controller")
				{
					info.OpenElement();
					surr._PathToLayout = (AbsoluteDocumentPath)info.GetValue("Layout", s);
					info.CloseElement();
				}
				else if (info.CurrentElementName == "BaseType")
				{
					info.GetString("BaseType");
					surr._PathToLayout = (AbsoluteDocumentPath)info.GetValue("Layout", s);
				}
				else
				{
					surr._PathToLayout = (AbsoluteDocumentPath)info.GetValue("Layout", s);
				}

				info.DeserializationFinished += new Altaxo.Serialization.Xml.XmlDeserializationCallbackEventHandler(surr.EhDeserializationFinished);

				return s;
			}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:26,代码来源:WorksheetViewLayout.cs

示例2: Deserialize

			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				int count = info.OpenArray("ColorSets");
				var colorSets = new Tuple<IColorSet, bool>[count];
				for (int i = 0; i < count; ++i)
				{
					info.OpenElement(); // e
					colorSets[i] = new Tuple<IColorSet, bool>((IColorSet)info.GetValue("ColorSet", null), info.GetBoolean("IsPlotColorSet"));
					info.CloseElement();
				}

				info.CloseArray(count);

				return new ColorSetBag(colorSets);
			}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:15,代码来源:ColorSetBag.cs

示例3: Deserialize

			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				AscendingIntegerCollection s = null != o ? (AscendingIntegerCollection)o : new AscendingIntegerCollection();

				int count = info.OpenArray();

				for (int i = 0; i < count; i++)
				{
					info.OpenElement();
					int rangestart = info.GetInt32("Start");
					int rangecount = info.GetInt32("Count");
					info.CloseElement();
					s.AddRange(rangestart, rangecount);
				}
				info.CloseArray(count);
				return s;
			}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:17,代码来源:AscendingIntegerCollection.cs

示例4: Deserialize

      public virtual void Deserialize(GraphDocument s, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
      {
        //  info.GetBaseValueEmbedded(s,typeof(GraphDocument).BaseType,parent);
        s._name            =  info.GetString("Name"); 
        s._pageBounds      = (RectangleF)info.GetValue("PageBounds",s);
        s._printableBounds = (RectangleF)info.GetValue("PrintableBounds",s);

        s._layers          = (XYPlotLayerCollection)info.GetValue("LayerList",s);
        s._layers.ParentObject = s;
        s._layers.SetPrintableGraphBounds(s._printableBounds, false);

        // new in version 1 - Add graph properties
        int numberproperties = info.OpenArray(); // "GraphProperties"
        for(int i=0;i<numberproperties;i++)
        {
          info.OpenElement(); // "e"
          string propkey = info.GetString("Key");
          object propval = info.GetValue("Value",parent);
          info.CloseElement(); // "e"
          s.SetGraphProperty(propkey,propval);
        }
        info.CloseArray(numberproperties);
      }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:23,代码来源:GraphDocument.cs

示例5: Deserialize

        protected virtual void Deserialize(WorksheetLayout s, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
        {
        

        XmlSerializationSurrogate0 surr = new XmlSerializationSurrogate0();
        surr.m_ColStyles = new System.Collections.Hashtable();
        surr.m_TableLayout = s;
        info.DeserializationFinished += new Altaxo.Serialization.Xml.XmlDeserializationCallbackEventHandler(surr.EhDeserializationFinished);


        s.m_Guid = System.Xml.XmlConvert.ToGuid(info.GetString("Guid"));
        surr.m_PathToTable = (Main.DocumentPath)info.GetValue("Table",s);
        s.m_RowHeaderStyle = (RowHeaderStyle)info.GetValue("RowHeaderStyle" , s);  
        s.m_ColumnHeaderStyle = (ColumnHeaderStyle)info.GetValue("ColumnHeaderStyle",s);  
        s.m_PropertyColumnHeaderStyle = (ColumnHeaderStyle)info.GetValue("PropertyColumnHeaderStyle",s);  


        int count;
        count = info.OpenArray(); // DefaultColumnStyles
        
        for(int i=0;i<count;i++)
        {
          object defstyle = info.GetValue("DefaultColumnStyle",s);
          s.DefaultColumnStyles.Add(defstyle.GetType(), defstyle);
        }
        info.CloseArray(count);
      

        // deserialize the columnstyles
        // this must be deserialized in a new instance of this surrogate, since we can not resolve it immediately
        count = info.OpenArray();
        if(count>0)
        {
          for(int i=0;i<count;i++)
          {
            info.OpenElement(); // "e"
            Main.DocumentPath key = (Main.DocumentPath)info.GetValue("Column",s);
            object val = info.GetValue("Style",s);
            surr.m_ColStyles.Add(key,val);
            info.CloseElement();
          }
        }
        info.CloseArray(count);
      }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:44,代码来源:WorksheetLayout.cs

示例6: Deserialize

      public virtual void Deserialize(DataTable s, Altaxo.Serialization.Xml.IXmlDeserializationInfo  info, object parent)
      {
        s._tableName = info.GetString("Name");
        s._dataColumns = (DataColumnCollection)info.GetValue("DataCols",s);
        s._dataColumns.ParentObject = s;
        s._propertyColumns = (DataColumnCollection)info.GetValue("PropCols",s);
        s._propertyColumns.ParentObject = s;

        // new in version 1
        s._tableScript = (TableScript)info.GetValue("TableScript",s);

        // new in version 2 - Add table properties
        int numberproperties = info.OpenArray(); // "TableProperties"
        for(int i=0;i<numberproperties;i++)
        {
          info.OpenElement(); // "e"
          string propkey = info.GetString("Key");
          object propval = info.GetValue("Value",parent);
          info.CloseElement(); // "e"
          s.SetTableProperty(propkey,propval);
        }
        info.CloseArray(numberproperties);
      }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:23,代码来源:DataTable.cs

示例7: SDeserialize

			protected virtual DataTableMultipleColumnProxy SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				var s = (o == null ? new DataTableMultipleColumnProxy() : (DataTableMultipleColumnProxy)o);

				s.InternalSetDataTable((DataTableProxy)info.GetValue("Table", s));
				s._groupNumber = info.GetInt32("Group");

				s._useAllAvailableDataRows = info.GetBoolean("UseAllAvailableDataRows");

				int countBundles = info.OpenArray("DataColumnsBundles");
				for (int b = 0; b < countBundles; b++)
				{
					info.OpenElement();
					string identifier = info.GetString("Identifier");
					int? MaximumNumberOfColumns = info.GetNullableInt32("MaximumNumberOfColumns");

					var columnBundleInfo = new ColumnBundleInfo(MaximumNumberOfColumns);

					int countColumns = info.OpenArray();
					for (int i = 0; i < countColumns; i++)
					{
						s.InternalAddDataColumnNoClone(columnBundleInfo, (IReadableColumnProxy)info.GetValue("e", s));
					}
					info.CloseArray(countColumns);

					s._dataColumnBundles.Add(identifier, columnBundleInfo);

					info.CloseElement();
				}
				info.CloseArray(countBundles);

				if (!s._useAllAvailableDataRows)
				{
					s._participatingDataRows = (AscendingIntegerCollection)info.GetValue("DataRows", s);
				}
				else
				{
					s._participatingDataRows = new AscendingIntegerCollection();
				}

				s._isDirty = true;

				s._parent = parent as Main.IDocumentNode;
				return s;
			}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:45,代码来源:DataTableMultipleColumnProxy.cs

示例8: Deserialize

      public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
      {
        Altaxo.Data.DataColumnCollection s = null!=o ? (Altaxo.Data.DataColumnCollection)o : new Altaxo.Data.DataColumnCollection();

        // deserialize the columns
        int count = info.OpenArray();
        for(int i=0;i<count;i++)
        {
          info.OpenElement(); // Column

          string name = info.GetString("Name");
          ColumnKind  kind = (ColumnKind)info.GetInt32("Kind");
          int    group = info.GetInt32("Group");
          object col = info.GetValue(s);
          if(col!=null)
            s.Add((DataColumn)col,new DataColumnInfo(name,kind,group));

          info.CloseElement(); // Column
        }
        info.CloseArray(count);

        // deserialize the scripts
        count = info.OpenArray();
        for(int i=0;i<count;i++)
        {
          info.OpenElement();
          string name =   info.GetString();
          IColumnScriptText script = (IColumnScriptText)info.GetValue(s);
          info.CloseElement();
          s.ColumnScripts.Add(s[name],script);
        }
        info.CloseArray(count); // end script array
        return s;
      }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:34,代码来源:DataColumnCollection.cs


注:本文中的Altaxo.OpenElement方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。