Skip to content

Commit

Permalink
Now it actually converts properly
Browse files Browse the repository at this point in the history
  • Loading branch information
justinshannon committed Jan 12, 2023
1 parent b604043 commit 1db8a76
Show file tree
Hide file tree
Showing 16 changed files with 310 additions and 316 deletions.
3 changes: 3 additions & 0 deletions GeoRam/ConsoleCommand/MapFilterButton.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Xml.Serialization;

namespace GeoMapConverter.GeoRam.ConsoleCommand
Expand All @@ -17,6 +18,8 @@ public class MapFilterButton

[XmlIgnore]
public string FilterButtonName => $"{LabelLine1} {LabelLine2}";

public override string ToString() => FilterButtonName;
}

public class MapFilterGroup
Expand Down
4 changes: 2 additions & 2 deletions GeoRam/GeoMap/DefaultLineProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ public class DefaultLineProperties
public int Thickness { get; set; }

[XmlElement("GeoLineFilters")]
public FilterGroup GeoLineFilters { get; set; }
public List<FilterGroup> GeoLineFilters { get; set; }

public DefaultLineProperties()
{
GeoLineFilters = new FilterGroup();
GeoLineFilters = new List<FilterGroup>();
}
}

Expand Down
4 changes: 2 additions & 2 deletions GeoRam/GeoMap/DefaultSymbolProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ public class DefaultSymbolProperties
public int FontSize { get; set; }

[XmlElement("GeoSymbolFilters")]
public GeoSymbolFilter GeoSymbolFilters { get; set; }
public List<GeoSymbolFilter> GeoSymbolFilters { get; set; }

public DefaultSymbolProperties()
{
GeoSymbolFilters = new GeoSymbolFilter();
GeoSymbolFilters = new List<GeoSymbolFilter>();
}
}
}
3 changes: 2 additions & 1 deletion GeoRam/GeoMap/Enums/ObjectTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public enum ObjectTypes
SupplementalLine,
SupplementalSymbol,
AAV,
TAV
TAV,
DME
}
}
6 changes: 6 additions & 0 deletions GeoRam/GeoMap/GeoMapObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,11 @@ public class GeoMapObject

[XmlElement("GeoMapText")]
public List<GeoMapText> GeoMapTextList { get; set; }

[XmlIgnore]
public bool HasFilterGroup =>
(DefaultLineProperties != null && DefaultLineProperties.GeoLineFilters.Count > 0 ||
DefaultSymbolProperties != null && DefaultSymbolProperties.GeoSymbolFilters.Count > 0 ||
TextDefaultProperties != null && TextDefaultProperties.GeoTextFilters.Count > 0);
}
}
4 changes: 2 additions & 2 deletions GeoRam/GeoMap/TextDefaultProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ public class TextDefaultProperties
public int YPixelOffset { get; set; }

[XmlElement("GeoTextFilters")]
public GeoTextFilter GeoTextFilters { get; set; }
public List<GeoTextFilter> GeoTextFilters { get; set; }

public TextDefaultProperties()
{
GeoTextFilters = new GeoTextFilter();
GeoTextFilters = new List<GeoTextFilter>();
}
}

Expand Down
48 changes: 39 additions & 9 deletions MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1db8a76

Please sign in to comment.