Skip to content

Commit

Permalink
renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
DomCR committed Mar 14, 2024
1 parent 287c9a9 commit f5cd32c
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion ACadSharp.Tests/Common/Factory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ private static CadObject createObject(Type type, Type original, bool randomize)
if (type == typeof(XRecord)
|| type == typeof(PlotSettings)
|| type == typeof(Material)
|| type == typeof(MLStyle)
|| type == typeof(MLineStyle)
|| type == typeof(Layout)
|| type == typeof(Group)
|| type == typeof(CadDictionary)
Expand Down
6 changes: 3 additions & 3 deletions ACadSharp/Entities/MLine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public partial class MLine : Entity
/// Do not modify this field without also updating the associated entry in the MLINESTYLE dictionary
/// </remarks>
[DxfCodeValue(DxfReferenceType.Handle | DxfReferenceType.Name, 340)]
public MLStyle MLStyle
public MLineStyle MLStyle
{
get { return _style; }
set
Expand Down Expand Up @@ -83,15 +83,15 @@ public MLStyle MLStyle
[DxfCodeValue(DxfReferenceType.Count, 72)]
public List<Vertex> Vertices { get; set; } = new List<Vertex>();

private MLStyle _style = MLStyle.Default;
private MLineStyle _style = MLineStyle.Default;

public MLine() : base() { }

public override CadObject Clone()
{
MLine clone = (MLine)base.Clone();

clone.MLStyle = (MLStyle)(this.MLStyle?.Clone());
clone.MLStyle = (MLineStyle)(this.MLStyle?.Clone());

clone.Vertices.Clear();
foreach (var item in this.Vertices)
Expand Down
4 changes: 2 additions & 2 deletions ACadSharp/IO/DWG/DwgStreamReaders/DwgObjectReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4599,7 +4599,7 @@ private CadTemplate readGroup()

private CadTemplate readMLStyle()
{
MLStyle mlineStyle = new MLStyle();
MLineStyle mlineStyle = new MLineStyle();
CadMLStyleTemplate template = new CadMLStyleTemplate(mlineStyle);

this.readCommonNonEntityData(template);
Expand Down Expand Up @@ -4651,7 +4651,7 @@ 1024 512
int nlines = this._objectReader.ReadByte();
for (int i = 0; i < nlines; ++i)
{
MLStyle.Element element = new MLStyle.Element();
MLineStyle.Element element = new MLineStyle.Element();
CadMLStyleTemplate.ElementTemplate elementTemplate = new CadMLStyleTemplate.ElementTemplate(element);

//Offset BD Offset of this segment
Expand Down
6 changes: 3 additions & 3 deletions ACadSharp/IO/DWG/DwgStreamWriters/DwgObjectWriter.Objects.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private void writeObject(CadObject obj)
case Layout layout:
this.writeLayout(layout);
break;
case MLStyle style:
case MLineStyle style:
this.writeMLStyle(style);
break;
case PlotSettings plotsettings:
Expand Down Expand Up @@ -223,7 +223,7 @@ private void writeLayout(Layout layout)
}
}

private void writeMLStyle(MLStyle mlineStyle)
private void writeMLStyle(MLineStyle mlineStyle)
{
//Common:
//Name TV Name of this style
Expand Down Expand Up @@ -277,7 +277,7 @@ private void writeMLStyle(MLStyle mlineStyle)

//linesinstyle RC Number of lines in this style
this._writer.WriteByte((byte)mlineStyle.Elements.Count);
foreach (MLStyle.Element element in mlineStyle.Elements)
foreach (MLineStyle.Element element in mlineStyle.Elements)
{
//Offset BD Offset of this segment
this._writer.WriteBitDouble(element.Offset);
Expand Down
8 changes: 4 additions & 4 deletions ACadSharp/IO/DXF/DxfStreamWriter/DxfObjectsSectionWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protected void writeObject<T>(T co)
case Layout layout:
this.writeLayout(layout);
break;
case MLStyle mlStyle:
case MLineStyle mlStyle:
this.writeMLStyle(mlStyle);
break;
case PlotSettings plotSettings:
Expand Down Expand Up @@ -195,9 +195,9 @@ protected void writeLayout(Layout layout)
this._writer.WriteHandle(330, layout.AssociatedBlock.Owner, map);
}

protected void writeMLStyle(MLStyle style)
protected void writeMLStyle(MLineStyle style)
{
DxfClassMap map = DxfClassMap.Create<MLStyle>();
DxfClassMap map = DxfClassMap.Create<MLineStyle>();

this._writer.Write(100, DxfSubclassMarker.MLineStyle);

Expand All @@ -212,7 +212,7 @@ protected void writeMLStyle(MLStyle style)
this._writer.Write(51, style.StartAngle, map);
this._writer.Write(52, style.EndAngle, map);
this._writer.Write(71, (short)style.Elements.Count, map);
foreach (MLStyle.Element element in style.Elements)
foreach (MLineStyle.Element element in style.Elements)
{
this._writer.Write(49, element.Offset, map);
this._writer.Write(62, element.Color.Index, map);
Expand Down
8 changes: 4 additions & 4 deletions ACadSharp/IO/Templates/CadMLStyleTemplate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@

namespace ACadSharp.IO.Templates
{
internal class CadMLStyleTemplate : CadTemplate<MLStyle>
internal class CadMLStyleTemplate : CadTemplate<MLineStyle>
{
public class ElementTemplate : ICadObjectTemplate
{
public ulong? LinetypeHandle { get; set; }
public int? LinetypeIndex { get; set; }

public MLStyle.Element Element { get; set; }
public MLineStyle.Element Element { get; set; }

public ElementTemplate(MLStyle.Element element)
public ElementTemplate(MLineStyle.Element element)
{
this.Element = element;
}
Expand Down Expand Up @@ -54,7 +54,7 @@ public void Build(CadDocumentBuilder builder)

public List<ElementTemplate> ElementTemplates { get; set; } = new List<ElementTemplate>();

public CadMLStyleTemplate(MLStyle mlStyle) : base(mlStyle) { }
public CadMLStyleTemplate(MLineStyle mlStyle) : base(mlStyle) { }

public override void Build(CadDocumentBuilder builder)
{
Expand Down
2 changes: 1 addition & 1 deletion ACadSharp/IO/Templates/CadMLineTemplate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public override void Build(CadDocumentBuilder builder)

MLine mLine = this.CadObject as MLine;

if (builder.TryGetCadObject<MLStyle>(this.MLineStyleHandle, out MLStyle style))
if (builder.TryGetCadObject<MLineStyle>(this.MLineStyleHandle, out MLineStyle style))
{
mLine.MLStyle = style;
}
Expand Down
2 changes: 1 addition & 1 deletion ACadSharp/Objects/MLStyle.Element.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace ACadSharp.Objects
{
public partial class MLStyle
public partial class MLineStyle
{
public class Element
{
Expand Down
12 changes: 6 additions & 6 deletions ACadSharp/Objects/MLStyle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
namespace ACadSharp.Objects
{
/// <summary>
/// Represents a <see cref="MLStyle"/> object
/// Represents a <see cref="MLineStyle"/> object
/// </summary>
/// <remarks>
/// Object name <see cref="DxfFileToken.ObjectMLStyle"/> <br/>
/// Dxf class name <see cref="DxfSubclassMarker.MLineStyle"/>
/// </remarks>
[DxfName(DxfFileToken.ObjectMLStyle)]
[DxfSubClass(DxfSubclassMarker.MLineStyle)]
public partial class MLStyle : CadObject, INamedCadObject
public partial class MLineStyle : CadObject, INamedCadObject
{
/// <summary>
/// Default multiline style name
Expand All @@ -22,7 +22,7 @@ public partial class MLStyle : CadObject, INamedCadObject
/// <summary>
/// Gets the default MLine style
/// </summary>
public static MLStyle Default { get { return new MLStyle(DefaultName); } }
public static MLineStyle Default { get { return new MLineStyle(DefaultName); } }

/// <inheritdoc/>
public override ObjectType ObjectType => ObjectType.MLINESTYLE;
Expand Down Expand Up @@ -76,11 +76,11 @@ public partial class MLStyle : CadObject, INamedCadObject
/// Elements in the style
/// </summary>
[DxfCodeValue(DxfReferenceType.Count, 71)]
public List<MLStyle.Element> Elements { get; } = new List<Element>();
public List<MLineStyle.Element> Elements { get; } = new List<Element>();

internal MLStyle() { }
internal MLineStyle() { }

public MLStyle(string name)
public MLineStyle(string name)
{
this.Name = name;
}
Expand Down

0 comments on commit f5cd32c

Please sign in to comment.