/// <override></override>
        public override void SaveInnerObjects(string propertyName, IRepositoryWriter writer, int version)
        {
            base.SaveInnerObjects(propertyName, writer, version);
            Debug.Assert(propertyName == "ValueRanges");
            writer.BeginWriteInnerObjects();
            switch (mappingType)
            {
            case MappingType.IntegerStyle:
                foreach (KeyValuePair <int, IStyle> range in intRanges)
                {
                    writer.BeginWriteInnerObject();
                    writer.WriteFloat(range.Key);
                    WriteStyle(writer, range.Value);
                    writer.EndWriteInnerObject();
                }
                break;

            case MappingType.FloatStyle:
                foreach (KeyValuePair <float, IStyle> range in floatRanges)
                {
                    writer.BeginWriteInnerObject();
                    writer.WriteFloat(range.Key);
                    WriteStyle(writer, range.Value);
                    writer.EndWriteInnerObject();
                }
                break;

            default: throw new NShapeUnsupportedValueException(mappingType);
            }
            writer.EndWriteInnerObjects();
        }
Exemple #2
0
 void IEntity.SaveInnerObjects(string propertyName, IRepositoryWriter writer, int version)
 {
     Project.AssertSupportedVersion(true, version);
     writer.BeginWriteInnerObjects();
     foreach (LibraryData ld in libraries)
     {
         writer.BeginWriteInnerObject();
         writer.WriteString(ld.Name);
         writer.WriteString(ld.AssemblyName);
         writer.WriteInt32(ld.RepositoryVersion);
         writer.EndWriteInnerObject();
     }
     writer.EndWriteInnerObjects();
 }
 /// <ToBeCompleted></ToBeCompleted>
 public void SaveInnerObjects(string propertyName, IRepositoryWriter writer, int version)
 {
     if (propertyName == null)
     {
         throw new ArgumentNullException("propertyName");
     }
     if (writer == null)
     {
         throw new ArgumentNullException("writer");
     }
     if (propertyName == "ConnectionPointMappings")
     {
         // Save ConnectionPoint mappings
         writer.BeginWriteInnerObjects();
         foreach (KeyValuePair <ControlPointId, TerminalId> item in connectionPointMappings)
         {
             writer.BeginWriteInnerObject();
             writer.WriteInt32((int)item.Key);
             writer.WriteInt32((int)item.Value);
             writer.EndWriteInnerObject();
         }
         writer.EndWriteInnerObjects();
     }
 }
 /// <override></override>
 public override void SaveInnerObjects(string propertyName, IRepositoryWriter writer, int version)
 {
     base.SaveInnerObjects(propertyName, writer, version);
     Debug.Assert(propertyName == "ValueRanges");
     writer.BeginWriteInnerObjects();
     switch (mappingType) {
         case MappingType.IntegerStyle:
             foreach (KeyValuePair<int, IStyle> range in intRanges) {
                 writer.BeginWriteInnerObject();
                 writer.WriteFloat(range.Key);
                 WriteStyle(writer, range.Value);
                 writer.EndWriteInnerObject();
             }
             break;
         case MappingType.FloatStyle:
             foreach (KeyValuePair<float, IStyle> range in floatRanges) {
                 writer.BeginWriteInnerObject();
                 writer.WriteFloat(range.Key);
                 WriteStyle(writer, range.Value);
                 writer.EndWriteInnerObject();
             }
             break;
         default: throw new NShapeUnsupportedValueException(mappingType);
     }
     writer.EndWriteInnerObjects();
 }
 /// <override></override>
 protected override void SaveInnerObjectsCore(string propertyName, IRepositoryWriter writer, int version)
 {
     if (propertyName == attrNameColumns) {
         writer.BeginWriteInnerObjects();
         int cnt = CaptionCount;
         for (int i = 1; i < cnt; ++i) {	// Skip first caption (title)
             writer.BeginWriteInnerObject();
             writer.WriteInt32(i - 1);
             writer.WriteString(GetCaptionText(i));
             writer.EndWriteInnerObject();
         }
         writer.EndWriteInnerObjects();
     } else base.SaveInnerObjectsCore(propertyName, writer, version);
 }
Exemple #6
0
		/// <ToBeCompleted></ToBeCompleted>
		public void SaveInnerObjects(string propertyName, IRepositoryWriter writer, int version) {
			if (propertyName == null) throw new ArgumentNullException("propertyName");
			if (writer == null) throw new ArgumentNullException("writer");
			if (propertyName == "ConnectionPointMappings") {
				// Save ConnectionPoint mappings
				writer.BeginWriteInnerObjects();
				foreach (ControlPointId pointId in Shape.GetControlPointIds(ControlPointCapabilities.Connect)) {
					TerminalId terminalId = GetMappedTerminalId(pointId);
					writer.BeginWriteInnerObject();
					writer.WriteInt32(pointId);
					writer.WriteInt32((int)terminalId);
					writer.EndWriteInnerObject();
				}
				writer.EndWriteInnerObjects();
			}
		}
Exemple #7
0
 /// <ToBeCompleted></ToBeCompleted>
 public void SaveInnerObjects(string propertyName, IRepositoryWriter writer, int version)
 {
     if (propertyName == null) throw new ArgumentNullException("propertyName");
     if (writer == null) throw new ArgumentNullException("writer");
     if (propertyName == "ConnectionPointMappings") {
         // Save ConnectionPoint mappings
         writer.BeginWriteInnerObjects();
         foreach (KeyValuePair<ControlPointId, TerminalId> item in connectionPointMappings) {
             writer.BeginWriteInnerObject();
             writer.WriteInt32((int)item.Key);
             writer.WriteInt32((int)item.Value);
             writer.EndWriteInnerObject();
         }
         writer.EndWriteInnerObjects();
     }
 }
Exemple #8
0
 void IEntity.SaveInnerObjects(string propertyName, IRepositoryWriter writer, int version)
 {
     Debug.Assert(propertyName == "Layers");
     writer.BeginWriteInnerObjects();
     foreach (Layer l in layers) {
         writer.BeginWriteInnerObject();
         writer.WriteInt32((int)l.Id);
         writer.WriteString(l.Name);
         writer.WriteString(l.Title);
         writer.WriteInt32(l.LowerZoomThreshold);
         writer.WriteInt32(l.UpperZoomThreshold);
         writer.EndWriteInnerObject();
     }
     writer.EndWriteInnerObjects();
 }