diff --git a/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/DataFormats/VersatileContainer/VersatileContainerSectionType.cs b/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/DataFormats/VersatileContainer/VersatileContainerSectionType.cs index 07c26956..b301ed4c 100644 --- a/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/DataFormats/VersatileContainer/VersatileContainerSectionType.cs +++ b/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/DataFormats/VersatileContainer/VersatileContainerSectionType.cs @@ -7,7 +7,7 @@ namespace UniversalEditor.DataFormats.VersatileContainer { public enum VersatileContainerSectionType : uint { - None = 0, + None = 0, /// /// A section that contains data stored within the Versatile Container. /// Multiple named Sections can point to the same data location. @@ -18,10 +18,10 @@ namespace UniversalEditor.DataFormats.VersatileContainer /// nested within one another. /// Directory = 2, - /// - /// A section that doesn't contain any data, but points to the data - /// contained within another indexed Section. - /// - Reference = 3 + /// + /// A section that doesn't contain any data, but points to the data + /// contained within another indexed Section. + /// + Reference = 3 } } diff --git a/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/DataFormats/VersatileContainer/VersatileContainerV1DataFormat.cs b/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/DataFormats/VersatileContainer/VersatileContainerV1DataFormat.cs index f62ac0d4..c71b7425 100644 --- a/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/DataFormats/VersatileContainer/VersatileContainerV1DataFormat.cs +++ b/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/DataFormats/VersatileContainer/VersatileContainerV1DataFormat.cs @@ -41,7 +41,7 @@ namespace UniversalEditor.DataFormats.VersatileContainer string signature = br.ReadFixedLengthString(30); if (signature != "Versatile Container file 0001\0") { - throw new InvalidDataFormatException(); + throw new InvalidDataFormatException(); } mvarFormatVersion = br.ReadVersion(); @@ -296,12 +296,12 @@ namespace UniversalEditor.DataFormats.VersatileContainer foreach (File section in fsom.Files) { byte[] data = section.GetDataAsByteArray(); - /* + /* if (section is File) { data = Compression.CompressionStream.Compress((section as File).CompressionMethod, data); } - */ + */ ulong sectionVirtualSize = (ulong)data.Length; realDatas[fsom.Files.IndexOf(section)] = data; @@ -319,16 +319,16 @@ namespace UniversalEditor.DataFormats.VersatileContainer WriteUnum(bw, sectionVirtualSize); WriteUnum(bw, sectionPhysicalSize); - /* + /* if (section is File) { bw.WriteInt32((int)((section as File).CompressionMethod)); } else { - */ + */ bw.WriteInt32((int)Compression.CompressionMethod.None); - // } + // } sectionOffset += sectionPhysicalSize; } diff --git a/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/DataFormats/VersatileContainer/VersatileContainerV2DataFormat.cs b/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/DataFormats/VersatileContainer/VersatileContainerV2DataFormat.cs index d48101f6..3a4f0620 100644 --- a/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/DataFormats/VersatileContainer/VersatileContainerV2DataFormat.cs +++ b/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/DataFormats/VersatileContainer/VersatileContainerV2DataFormat.cs @@ -8,196 +8,196 @@ using UniversalEditor.ObjectModels.VersatileContainer.Sections; namespace UniversalEditor.DataFormats.VersatileContainer { - public class VersatileContainerV2DataFormat : DataFormat - { - private Version mvarFormatVersion = new Version(2, 0); - public Version FormatVersion { get { return mvarFormatVersion; } set { mvarFormatVersion = value; } } + public class VersatileContainerV2DataFormat : DataFormat + { + private Version mvarFormatVersion = new Version(2, 0); + public Version FormatVersion { get { return mvarFormatVersion; } set { mvarFormatVersion = value; } } - private static DataFormatReference _dfr = null; - public override DataFormatReference MakeReference() - { - if (_dfr == null) - { - _dfr = base.MakeReference(); - _dfr.Capabilities.Add(typeof(VersatileContainerObjectModel), DataFormatCapabilities.All); - _dfr.Filters.Add("Versatile Container object file", new byte?[][] { new byte?[] { (byte)'V', (byte)'e', (byte)'r', (byte)'s', (byte)'a', (byte)'t', (byte)'i', (byte)'l', (byte)'e', (byte)' ', (byte)'C', (byte)'o', (byte)'n', (byte)'t', (byte)'a', (byte)'i', (byte)'n', (byte)'e', (byte)'r', (byte)' ', (byte)'f', (byte)'i', (byte)'l', (byte)'e', (byte)' ', (byte)'0', (byte)'0', (byte)'0', (byte)'2' } }, new string[] { "*.vco" }); - } - return _dfr; - } + private static DataFormatReference _dfr = null; + public override DataFormatReference MakeReference() + { + if (_dfr == null) + { + _dfr = base.MakeReference(); + _dfr.Capabilities.Add(typeof(VersatileContainerObjectModel), DataFormatCapabilities.All); + _dfr.Filters.Add("Versatile Container object file", new byte?[][] { new byte?[] { (byte)'V', (byte)'e', (byte)'r', (byte)'s', (byte)'a', (byte)'t', (byte)'i', (byte)'l', (byte)'e', (byte)' ', (byte)'C', (byte)'o', (byte)'n', (byte)'t', (byte)'a', (byte)'i', (byte)'n', (byte)'e', (byte)'r', (byte)' ', (byte)'f', (byte)'i', (byte)'l', (byte)'e', (byte)' ', (byte)'0', (byte)'0', (byte)'0', (byte)'2' } }, new string[] { "*.vco" }); + } + return _dfr; + } - protected override void LoadInternal(ref ObjectModel objectModel) - { - VersatileContainerObjectModel vcom = (objectModel as VersatileContainerObjectModel); - if (vcom == null) return; + protected override void LoadInternal(ref ObjectModel objectModel) + { + VersatileContainerObjectModel vcom = (objectModel as VersatileContainerObjectModel); + if (vcom == null) return; - IO.Reader br = base.Accessor.Reader; - string signature = br.ReadFixedLengthString(30); // Versatile Container file 0002 - signature = signature.TrimNull(); - if (signature != "Versatile Container file 0002") throw new InvalidDataFormatException(); + IO.Reader br = base.Accessor.Reader; + string signature = br.ReadFixedLengthString(30); // Versatile Container file 0002 + signature = signature.TrimNull(); + if (signature != "Versatile Container file 0002") throw new InvalidDataFormatException(); - mvarFormatVersion = br.ReadVersion(); - vcom.Title = br.ReadNullTerminatedString(); + mvarFormatVersion = br.ReadVersion(); + vcom.Title = br.ReadNullTerminatedString(); - uint propertyCount = br.ReadUInt32(); - uint sectionClassCount = br.ReadUInt32(); - uint sectionCount = br.ReadUInt32(); + uint propertyCount = br.ReadUInt32(); + uint sectionClassCount = br.ReadUInt32(); + uint sectionCount = br.ReadUInt32(); - List sectionClassNames = new List(); + List sectionClassNames = new List(); - #region Section Class Entries - for (uint i = 0; i < sectionClassCount; i++) - { - string sectionClassName = br.ReadNullTerminatedString(); - sectionClassNames.Add(sectionClassName); - } - #endregion - #region Section Entries - List sectionDataSizes = new List(); - for (uint i = 0; i < sectionCount; i++) - { - VersatileContainerSectionType sectionType = (VersatileContainerSectionType)br.ReadUInt32(); - string sectionName = br.ReadNullTerminatedString(); + #region Section Class Entries + for (uint i = 0; i < sectionClassCount; i++) + { + string sectionClassName = br.ReadNullTerminatedString(); + sectionClassNames.Add(sectionClassName); + } + #endregion + #region Section Entries + List sectionDataSizes = new List(); + for (uint i = 0; i < sectionCount; i++) + { + VersatileContainerSectionType sectionType = (VersatileContainerSectionType)br.ReadUInt32(); + string sectionName = br.ReadNullTerminatedString(); - switch (sectionType) - { - case VersatileContainerSectionType.None: - { - sectionDataSizes.Add(0); + switch (sectionType) + { + case VersatileContainerSectionType.None: + { + sectionDataSizes.Add(0); - VersatileContainerBlankSection sect = new VersatileContainerBlankSection(); - vcom.Sections.Add(sect); - break; - } - case VersatileContainerSectionType.Section: - { - uint sectionDataSize = br.ReadUInt32(); - sectionDataSizes.Add(sectionDataSize); + VersatileContainerBlankSection sect = new VersatileContainerBlankSection(); + vcom.Sections.Add(sect); + break; + } + case VersatileContainerSectionType.Section: + { + uint sectionDataSize = br.ReadUInt32(); + sectionDataSizes.Add(sectionDataSize); - uint sectionClassIndex = br.ReadUInt32(); + uint sectionClassIndex = br.ReadUInt32(); - VersatileContainerContentSection sect = new VersatileContainerContentSection(); - sect.Name = sectionName; - if (sectionClassIndex != 0xFFFFFFFF) - { - sect.ClassName = sectionClassNames[(int)sectionClassIndex]; - } - else - { - sect.ClassName = null; - } - vcom.Sections.Add(sect); - break; - } - case VersatileContainerSectionType.Directory: - { - sectionDataSizes.Add(0); + VersatileContainerContentSection sect = new VersatileContainerContentSection(); + sect.Name = sectionName; + if (sectionClassIndex != 0xFFFFFFFF) + { + sect.ClassName = sectionClassNames[(int)sectionClassIndex]; + } + else + { + sect.ClassName = null; + } + vcom.Sections.Add(sect); + break; + } + case VersatileContainerSectionType.Directory: + { + sectionDataSizes.Add(0); - VersatileContainerDirectorySection sect = new VersatileContainerDirectorySection(); - vcom.Sections.Add(sect); - break; - } - case VersatileContainerSectionType.Reference: - { - sectionDataSizes.Add(0); - uint sectionIndex = br.ReadUInt32(); - - VersatileContainerReferenceSection sect = new VersatileContainerReferenceSection(); - sect.Target = vcom.Sections[(int)sectionIndex]; - vcom.Sections.Add(sect); - break; - } - } - } - #endregion - for (uint i = 0; i < sectionCount; i++) - { - VersatileContainerSection section = vcom.Sections[(int)i]; - if (section is VersatileContainerContentSection) - { - VersatileContainerContentSection sect = (section as VersatileContainerContentSection); - byte[] data = br.ReadBytes(sectionDataSizes[(int)i]); - if (sect == null) continue; - sect.Data = data; - } - } - } + VersatileContainerDirectorySection sect = new VersatileContainerDirectorySection(); + vcom.Sections.Add(sect); + break; + } + case VersatileContainerSectionType.Reference: + { + sectionDataSizes.Add(0); + uint sectionIndex = br.ReadUInt32(); + + VersatileContainerReferenceSection sect = new VersatileContainerReferenceSection(); + sect.Target = vcom.Sections[(int)sectionIndex]; + vcom.Sections.Add(sect); + break; + } + } + } + #endregion + for (uint i = 0; i < sectionCount; i++) + { + VersatileContainerSection section = vcom.Sections[(int)i]; + if (section is VersatileContainerContentSection) + { + VersatileContainerContentSection sect = (section as VersatileContainerContentSection); + byte[] data = br.ReadBytes(sectionDataSizes[(int)i]); + if (sect == null) continue; + sect.Data = data; + } + } + } - protected override void SaveInternal(ObjectModel objectModel) - { - VersatileContainerObjectModel vcom = (objectModel as VersatileContainerObjectModel); - if (vcom == null) return; + protected override void SaveInternal(ObjectModel objectModel) + { + VersatileContainerObjectModel vcom = (objectModel as VersatileContainerObjectModel); + if (vcom == null) return; - IO.Writer bw = base.Accessor.Writer; - bw.WriteNullTerminatedString("Versatile Container file 0002"); - bw.WriteVersion(mvarFormatVersion); - bw.WriteNullTerminatedString(vcom.Title); + IO.Writer bw = base.Accessor.Writer; + bw.WriteNullTerminatedString("Versatile Container file 0002"); + bw.WriteVersion(mvarFormatVersion); + bw.WriteNullTerminatedString(vcom.Title); - bw.WriteUInt32((uint)vcom.Properties.Count); + bw.WriteUInt32((uint)vcom.Properties.Count); - // get a list of section class names - List sectionClassNames = new List(); - foreach (VersatileContainerSection section in vcom.Sections) - { - if (section is VersatileContainerContentSection) - { - VersatileContainerContentSection sect = (section as VersatileContainerContentSection); - if (!sectionClassNames.Contains(sect.ClassName)) sectionClassNames.Add(sect.ClassName); - } - } - bw.WriteUInt32((uint)sectionClassNames.Count); + // get a list of section class names + List sectionClassNames = new List(); + foreach (VersatileContainerSection section in vcom.Sections) + { + if (section is VersatileContainerContentSection) + { + VersatileContainerContentSection sect = (section as VersatileContainerContentSection); + if (!sectionClassNames.Contains(sect.ClassName)) sectionClassNames.Add(sect.ClassName); + } + } + bw.WriteUInt32((uint)sectionClassNames.Count); - bw.WriteUInt32((uint)vcom.Sections.Count); + bw.WriteUInt32((uint)vcom.Sections.Count); - #region Section Class Entries - foreach (string sectionClassName in sectionClassNames) - { - bw.WriteNullTerminatedString(sectionClassName); - } - #endregion - #region Section Entries - List sectionTypes = new List(); - List sectionDataSizes = new List(); - foreach (VersatileContainerSection section in vcom.Sections) - { - VersatileContainerSectionType sectionType = VersatileContainerSectionType.Section; // (VersatileContainerSectionType)br.ReadUInt32(); - bw.WriteUInt32((uint)sectionType); + #region Section Class Entries + foreach (string sectionClassName in sectionClassNames) + { + bw.WriteNullTerminatedString(sectionClassName); + } + #endregion + #region Section Entries + List sectionTypes = new List(); + List sectionDataSizes = new List(); + foreach (VersatileContainerSection section in vcom.Sections) + { + VersatileContainerSectionType sectionType = VersatileContainerSectionType.Section; // (VersatileContainerSectionType)br.ReadUInt32(); + bw.WriteUInt32((uint)sectionType); - bw.WriteNullTerminatedString(section.Name); - if (section is VersatileContainerBlankSection) - { - } - else if (section is VersatileContainerContentSection) - { - VersatileContainerContentSection sect = (section as VersatileContainerContentSection); - bw.WriteUInt32((uint)sect.Data.LongLength); - if (!String.IsNullOrEmpty(sect.ClassName)) - { - bw.WriteUInt32((uint)sectionClassNames.IndexOf(sect.ClassName)); - } - else - { - bw.WriteUInt32((uint)0xFFFFFFFF); - } - } - else if (section is VersatileContainerDirectorySection) - { - VersatileContainerDirectorySection sect = (section as VersatileContainerDirectorySection); - } - else if (section is VersatileContainerReferenceSection) - { - VersatileContainerReferenceSection sect = (section as VersatileContainerReferenceSection); - bw.WriteUInt32((uint)vcom.Sections.IndexOf(sect.Target)); - } - } - #endregion - foreach (VersatileContainerSection section in vcom.Sections) - { - if (section is VersatileContainerContentSection) - { - VersatileContainerContentSection sect = (section as VersatileContainerContentSection); - bw.WriteBytes(sect.Data); - } - } - } - } + bw.WriteNullTerminatedString(section.Name); + if (section is VersatileContainerBlankSection) + { + } + else if (section is VersatileContainerContentSection) + { + VersatileContainerContentSection sect = (section as VersatileContainerContentSection); + bw.WriteUInt32((uint)sect.Data.LongLength); + if (!String.IsNullOrEmpty(sect.ClassName)) + { + bw.WriteUInt32((uint)sectionClassNames.IndexOf(sect.ClassName)); + } + else + { + bw.WriteUInt32((uint)0xFFFFFFFF); + } + } + else if (section is VersatileContainerDirectorySection) + { + VersatileContainerDirectorySection sect = (section as VersatileContainerDirectorySection); + } + else if (section is VersatileContainerReferenceSection) + { + VersatileContainerReferenceSection sect = (section as VersatileContainerReferenceSection); + bw.WriteUInt32((uint)vcom.Sections.IndexOf(sect.Target)); + } + } + #endregion + foreach (VersatileContainerSection section in vcom.Sections) + { + if (section is VersatileContainerContentSection) + { + VersatileContainerContentSection sect = (section as VersatileContainerContentSection); + bw.WriteBytes(sect.Data); + } + } + } + } } \ No newline at end of file diff --git a/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/ObjectModels/VersatileContainer/Sections/VersatileContainerBlankSection.cs b/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/ObjectModels/VersatileContainer/Sections/VersatileContainerBlankSection.cs index 6a07f07d..1967d730 100644 --- a/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/ObjectModels/VersatileContainer/Sections/VersatileContainerBlankSection.cs +++ b/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/ObjectModels/VersatileContainer/Sections/VersatileContainerBlankSection.cs @@ -5,12 +5,12 @@ using System.Text; namespace UniversalEditor.ObjectModels.VersatileContainer.Sections { - public class VersatileContainerBlankSection : VersatileContainerSection - { - public override object Clone() - { - VersatileContainerBlankSection clone = new VersatileContainerBlankSection(); - return clone; - } - } + public class VersatileContainerBlankSection : VersatileContainerSection + { + public override object Clone() + { + VersatileContainerBlankSection clone = new VersatileContainerBlankSection(); + return clone; + } + } } diff --git a/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/ObjectModels/VersatileContainer/Sections/VersatileContainerContentSection.cs b/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/ObjectModels/VersatileContainer/Sections/VersatileContainerContentSection.cs index a7a85b7e..daa15155 100644 --- a/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/ObjectModels/VersatileContainer/Sections/VersatileContainerContentSection.cs +++ b/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/ObjectModels/VersatileContainer/Sections/VersatileContainerContentSection.cs @@ -6,34 +6,34 @@ using System.Text; namespace UniversalEditor.ObjectModels.VersatileContainer.Sections { public class VersatileContainerContentSection : VersatileContainerSection - { - private string mvarClassName = String.Empty; - public string ClassName { get { return mvarClassName; } set { mvarClassName = value; } } + { + private string mvarClassName = String.Empty; + public string ClassName { get { return mvarClassName; } set { mvarClassName = value; } } - private byte[] mvarData = new byte[0]; - public byte[] Data { get { return mvarData; } set { mvarData = value; } } + private byte[] mvarData = new byte[0]; + public byte[] Data { get { return mvarData; } set { mvarData = value; } } - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("\"" + this.Name + "\""); - if (!String.IsNullOrEmpty(mvarClassName)) - { - sb.Append(" : "); - sb.Append(mvarClassName); - } - return sb.ToString(); - } - public override object Clone() - { - VersatileContainerContentSection clone = new VersatileContainerContentSection(); - clone.Name = (this.Name.Clone() as string); - clone.ClassName = (mvarClassName.Clone() as string); - clone.Data = (mvarData.Clone() as byte[]); - return clone; - } + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("\"" + this.Name + "\""); + if (!String.IsNullOrEmpty(mvarClassName)) + { + sb.Append(" : "); + sb.Append(mvarClassName); + } + return sb.ToString(); + } + public override object Clone() + { + VersatileContainerContentSection clone = new VersatileContainerContentSection(); + clone.Name = (this.Name.Clone() as string); + clone.ClassName = (mvarClassName.Clone() as string); + clone.Data = (mvarData.Clone() as byte[]); + return clone; + } - private Compression.CompressionMethod mvarCompressionMethod = Compression.CompressionMethod.None; - public Compression.CompressionMethod CompressionMethod { get { return mvarCompressionMethod; } set { mvarCompressionMethod = value; } } - } + private Compression.CompressionMethod mvarCompressionMethod = Compression.CompressionMethod.None; + public Compression.CompressionMethod CompressionMethod { get { return mvarCompressionMethod; } set { mvarCompressionMethod = value; } } + } } diff --git a/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/ObjectModels/VersatileContainer/Sections/VersatileContainerDirectorySection.cs b/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/ObjectModels/VersatileContainer/Sections/VersatileContainerDirectorySection.cs index d4d6bac4..c4c1f5de 100644 --- a/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/ObjectModels/VersatileContainer/Sections/VersatileContainerDirectorySection.cs +++ b/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/ObjectModels/VersatileContainer/Sections/VersatileContainerDirectorySection.cs @@ -5,12 +5,12 @@ using System.Text; namespace UniversalEditor.ObjectModels.VersatileContainer.Sections { - public class VersatileContainerDirectorySection : VersatileContainerSection - { - public override object Clone() - { - VersatileContainerDirectorySection clone = new VersatileContainerDirectorySection(); - return clone; - } - } + public class VersatileContainerDirectorySection : VersatileContainerSection + { + public override object Clone() + { + VersatileContainerDirectorySection clone = new VersatileContainerDirectorySection(); + return clone; + } + } } diff --git a/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/ObjectModels/VersatileContainer/Sections/VersatileContainerReferenceSection.cs b/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/ObjectModels/VersatileContainer/Sections/VersatileContainerReferenceSection.cs index 3e32dd5a..6ff1add7 100644 --- a/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/ObjectModels/VersatileContainer/Sections/VersatileContainerReferenceSection.cs +++ b/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/ObjectModels/VersatileContainer/Sections/VersatileContainerReferenceSection.cs @@ -5,16 +5,16 @@ using System.Text; namespace UniversalEditor.ObjectModels.VersatileContainer.Sections { - public class VersatileContainerReferenceSection : VersatileContainerSection - { - private VersatileContainerSection mvarTarget = null; - public VersatileContainerSection Target { get { return mvarTarget; } set { mvarTarget = value; } } + public class VersatileContainerReferenceSection : VersatileContainerSection + { + private VersatileContainerSection mvarTarget = null; + public VersatileContainerSection Target { get { return mvarTarget; } set { mvarTarget = value; } } - public override object Clone() - { - VersatileContainerReferenceSection clone = new VersatileContainerReferenceSection(); - clone.Target = mvarTarget; - return clone; - } - } + public override object Clone() + { + VersatileContainerReferenceSection clone = new VersatileContainerReferenceSection(); + clone.Target = mvarTarget; + return clone; + } + } } diff --git a/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/ObjectModels/VersatileContainer/VersatileContainerObjectModel.cs b/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/ObjectModels/VersatileContainer/VersatileContainerObjectModel.cs index cff28bc4..26c5efe6 100644 --- a/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/ObjectModels/VersatileContainer/VersatileContainerObjectModel.cs +++ b/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/ObjectModels/VersatileContainer/VersatileContainerObjectModel.cs @@ -18,10 +18,10 @@ namespace UniversalEditor.ObjectModels.VersatileContainer } private VersatileContainerSection.VersatileContainerSectionCollection mvarSections = new VersatileContainerSection.VersatileContainerSectionCollection(); - public VersatileContainerSection.VersatileContainerSectionCollection Sections { get { return mvarSections; } } + public VersatileContainerSection.VersatileContainerSectionCollection Sections { get { return mvarSections; } } - private VersatileContainerProperty.VersatileContainerPropertyCollection mvarProperties = new VersatileContainerProperty.VersatileContainerPropertyCollection(); - public VersatileContainerProperty.VersatileContainerPropertyCollection Properties { get { return mvarProperties; } } + private VersatileContainerProperty.VersatileContainerPropertyCollection mvarProperties = new VersatileContainerProperty.VersatileContainerPropertyCollection(); + public VersatileContainerProperty.VersatileContainerPropertyCollection Properties { get { return mvarProperties; } } public override void Clear() { diff --git a/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/ObjectModels/VersatileContainer/VersatileContainerSection.cs b/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/ObjectModels/VersatileContainer/VersatileContainerSection.cs index 7861b99a..3072153b 100644 --- a/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/ObjectModels/VersatileContainer/VersatileContainerSection.cs +++ b/CSharp/Plugins/UniversalEditor.Plugins.VersatileContainer/ObjectModels/VersatileContainer/VersatileContainerSection.cs @@ -26,12 +26,12 @@ namespace UniversalEditor.ObjectModels.VersatileContainer protected override void InsertItem(int index, VersatileContainerSection item) { - if (!String.IsNullOrEmpty(item.Name)) sectionsByName.Add(item.Name, item); + if (!String.IsNullOrEmpty(item.Name)) sectionsByName.Add(item.Name, item); base.InsertItem(index, item); } protected override void RemoveItem(int index) { - if (!String.IsNullOrEmpty(this[index].Name)) sectionsByName.Remove(this[index].Name); + if (!String.IsNullOrEmpty(this[index].Name)) sectionsByName.Remove(this[index].Name); base.RemoveItem(index); } @@ -40,20 +40,20 @@ namespace UniversalEditor.ObjectModels.VersatileContainer { return Add(Name, String.Empty, Data); } - public VersatileContainerContentSection Add(string Name, string ClassName, byte[] Data) - { - VersatileContainerContentSection content = new VersatileContainerContentSection(); - content.Name = Name; - content.ClassName = ClassName; - content.Data = Data; - Add(content); - return content; - } - } + public VersatileContainerContentSection Add(string Name, string ClassName, byte[] Data) + { + VersatileContainerContentSection content = new VersatileContainerContentSection(); + content.Name = Name; + content.ClassName = ClassName; + content.Data = Data; + Add(content); + return content; + } + } private string mvarName = String.Empty; public string Name { get { return mvarName; } set { mvarName = value; } } - public abstract object Clone(); + public abstract object Clone(); } }