Beispiel #1
0
 /// <summary>
 /// Creates a empty GraphDocument with no layers and a standard size of A4 landscape.
 /// </summary>
 protected GraphDocumentBase()
 {
     _creationTime = _lastChangeTime = DateTime.UtcNow;
     _notes        = new TextBackedConsole()
     {
         ParentObject = this
     };
 }
Beispiel #2
0
		/// <summary>
		/// Constructor for internal use only. Takes the two DataColumnCollections as Data and Properties. These collections are used directly (not by cloning them).
		/// </summary>
		/// <param name="datacoll">The data columns.</param>
		/// <param name="propcoll">The property columns.</param>
		protected DataTable(DataColumnCollection datacoll, DataColumnCollection propcoll)
		{
			_dataColumns = datacoll;
			_dataColumns.ParentObject = this;
			_dataColumns.ColumnScripts.ParentObject = this;

			_propertyColumns = propcoll;
			_propertyColumns.ParentObject = this; // set the parent of the cloned PropertyColumns
			_propertyColumns.ColumnScripts.ParentObject = this;

			_creationTime = _lastChangeTime = DateTime.UtcNow;
			_notes = new Main.TextBackedConsole() { ParentObject = this };
		}
Beispiel #3
0
		/// <summary>
		/// Initializes a new instance of the <see cref="DataTable"/> class for deserialization purposes only.
		/// </summary>
		/// <param name="info">The information.</param>
		protected DataTable(Altaxo.Serialization.Xml.IXmlDeserializationInfo info)
		{
			_notes = new Main.TextBackedConsole() { ParentObject = this };
		}
Beispiel #4
0
		protected override IEnumerable<Main.DocumentNodeAndName> GetDocumentNodeChildrenWithName()
		{
			if (null != _dataColumns)
				yield return new Main.DocumentNodeAndName(_dataColumns, () => _dataColumns = null, "DataCols");

			if (null != _propertyColumns)
				yield return new Main.DocumentNodeAndName(_propertyColumns, () => _propertyColumns = null, "PropCols");

			if (null != DataSource)
				yield return new Main.DocumentNodeAndName(_tableDataSource, () => _tableDataSource = null, "DataSource");

			if (null != PropertyBag)
				yield return new Main.DocumentNodeAndName(_tableProperties, () => _tableProperties = null, "PropertyBag");

			if (null != _tableScript)
				yield return new Main.DocumentNodeAndName(_tableScript, () => _tableScript = null, "TableScript");

			if (null != _notes)
				yield return new Main.DocumentNodeAndName(_notes, () => _notes = null, "Notes");

			if (null != _dataColumns && null != _dataColumns.ColumnScripts)
				yield return new Main.DocumentNodeAndName(_dataColumns.ColumnScripts, "DataColumnScripts");

			if (null != _propertyColumns && null != _propertyColumns.ColumnScripts)
				yield return new Main.DocumentNodeAndName(_propertyColumns.ColumnScripts, "PropertyColumnScripts");
		}