Skip to content

Commit

Permalink
Merge pull request #115 from Nikolai558/development
Browse files Browse the repository at this point in the history
Releasing 2.3.7
  • Loading branch information
Nikolai558 authored Jan 9, 2023
2 parents 6ce3181 + a3b5ea9 commit b5a1248
Show file tree
Hide file tree
Showing 14 changed files with 526 additions and 309 deletions.
22 changes: 22 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
# CHANGELOG

---
- ## Version 2.3.7
- High and Low AWY Geomap default line style changed to Solid.
- Roadmap and Credit buttons link changed to GitHub Development Branch.
- GeoMapObject-GeoJSON feature now includes a log “GeoMapObjects Properties.txt”
that lists all of the default values for the user to more easily manage the update
to the vNAS website.
- Fixed an issue where FE-Buddy GeoJSON outputs from vERAM
conversions included certain properties from the element
“defaults” such as Line Thickess, Filter assignments, etc...
This resulted in the GeoJSON properties overriding what the
user input as the defaults in the vNAS Admin site. Now, the
only time the converter will include the default properties
in the GeoJSON is when the individual element has overriding
properties within the element line from the .xml.
- Note: If you have already done the work to convert your
files, upload, and set the vNAS default properties, you can
use FE-Buddy to do the conversions again and you only need
to ensure the file names match what is already on the vNAS
site and use the “Batch Upload” feature of the vNAS site.
This will ensure you don't have to set the default properties
again in the vNAS site.

- ## Version 2.3.6
- Fixed #105 T and J Airways not in [HIGH AIRWAY].txt file.
- Note for FE's:
Expand Down
479 changes: 243 additions & 236 deletions FeBuddyLibrary/DataAccess/GeoJson.cs

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions FeBuddyLibrary/Helpers/FileHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ public static void CreateAwyGeomapHeadersAndEnding(bool CreateStart)
Logger.LogMessage("DEBUG", "CREATING AWY HI GEOMAP HEADERS");

GlobalConfig.HighAwyGeoMap.AppendLine(" <GeoMapObject Description=\"HI AIRWAYS\" TdmOnly=\"false\">");
GlobalConfig.HighAwyGeoMap.AppendLine(" <LineDefaults Bcg=\"5\" Filters=\"5\" Style=\"ShortDashed\" Thickness=\"1\" />");
GlobalConfig.HighAwyGeoMap.AppendLine(" <LineDefaults Bcg=\"5\" Filters=\"5\" Style=\"Solid\" Thickness=\"1\" />");
GlobalConfig.HighAwyGeoMap.AppendLine(" <Elements>");

Logger.LogMessage("DEBUG", "CREATING AWY LO GEOMAP HEADERS");

GlobalConfig.LowAwyGeoMap.AppendLine(" <GeoMapObject Description=\"LO AIRWAYS\" TdmOnly=\"false\">");
GlobalConfig.LowAwyGeoMap.AppendLine(" <LineDefaults Bcg=\"15\" Filters=\"15\" Style=\"ShortDashed\" Thickness=\"1\" />");
GlobalConfig.LowAwyGeoMap.AppendLine(" <LineDefaults Bcg=\"15\" Filters=\"15\" Style=\"Solid\" Thickness=\"1\" />");
GlobalConfig.LowAwyGeoMap.AppendLine(" <Elements>");
}
else
Expand Down
34 changes: 34 additions & 0 deletions FeBuddyLibrary/Models/GeoJsonModel.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;

Expand Down Expand Up @@ -59,5 +60,38 @@ public class Properties
public int? xOffset { get; set; } = null;
// [Text]
public int? yOffset { get; set; } = null;

public override bool Equals(object obj)
{
var other = obj as Properties;
if (other == null) return false;

if (filters != null && other.filters != null)
{
if (!filters.SequenceEqual(other.filters)) { return false; }
}
else if (filters != null && other.filters == null)
{
return false;
}
else if (filters == null && other.filters != null)
{
return false;
}

if (color != other.color || bcg != other.bcg ||
zIndex != other.zIndex ||
style != other.style || thickness != other.thickness ||
asdex != other.asdex || size != other.size ||
text != other.text || underline != other.underline ||
opaque != other.opaque || xOffset != other.xOffset ||
yOffset != other.yOffset)
{

return false;
}

return true;
}
}
}
169 changes: 148 additions & 21 deletions FeBuddyLibrary/Models/XmlGeoJsonGeoMapsRootModels.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data.SqlTypes;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Linq;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace FeBuddyLibrary.Models
Expand Down Expand Up @@ -84,6 +89,10 @@ public class LineDefaults
[XmlAttribute(AttributeName = "Thickness")]
public int Thickness { get; set; }

public override string ToString()
{
return $"Line Defaults: BCG {Bcg} _ Filters {Filters} _ Style {Style} _ Thickness {Thickness}";
}
}

[XmlRoot(ElementName = "SymbolDefaults", IsNullable = true)]
Expand All @@ -101,6 +110,11 @@ public class SymbolDefaults
[XmlAttribute(AttributeName = "Size")]
public int Size { get; set; }

public override string ToString()
{
return $"Symbol Defaults: BCG {Bcg} _ Filters {Filters} _ Style {Style} _ Size {Size}";
}

}

[XmlRoot(ElementName = "TextDefaults", IsNullable = true)]
Expand All @@ -125,38 +139,151 @@ public class TextDefaults
public int XOffset { get; set; }
[XmlAttribute(AttributeName = "YOffset")]
public int YOffset { get; set; }
public override string ToString()
{
return $"Text Defaults: BCG {Bcg} _ Filters {Filters} _ Size {Size} _ Underline {Underline} _ Opaque {Opaque} _ XOffset {XOffset} _ YOffset {YOffset}";
}
}

[XmlRoot(ElementName = "Element")]
public class Element
public class Element : IXmlSerializable
{
[XmlAttribute(AttributeName = "xsi-type")]
public string XsiType { get; set; }
public string XsiType { get; private set; }
public string Filters { get; private set; } = null;
public double StartLat { get; private set; }
public double StartLon { get; private set; }
public double EndLat { get; private set; }
public double EndLon { get; private set; }
public double Lat { get; private set; }
public double Lon { get; private set; }
public string Lines { get; private set; }
public int? Bcg { get; private set; } = null;
public int? Size { get; private set; } = null;
public bool? Underline { get; private set; } = null;
public bool? Opaque { get; private set; } = null;
public int? XOffset { get; private set; } = null;
public int? YOffset { get; private set; } = null;
public string Style { get; private set; } = null;
public int? Thickness { get; private set; } = null;


public void ReadXml(XmlReader reader)
{
string attr1 = reader.GetAttribute("xsi-type");
string attr2 = reader.GetAttribute("Filters");
string attr3 = reader.GetAttribute("StartLat");
string attr4 = reader.GetAttribute("StartLon");
string attr5 = reader.GetAttribute("EndLat");
string attr6 = reader.GetAttribute("EndLon");
string attr7 = reader.GetAttribute("Lat");
string attr8 = reader.GetAttribute("Lon");
string attr9 = reader.GetAttribute("Lines");
string attr10 = reader.GetAttribute("Bcg");
string attr11 = reader.GetAttribute("Size");
string attr12 = reader.GetAttribute("Underline");
string attr13 = reader.GetAttribute("Opaque");
string attr14 = reader.GetAttribute("XOffset");
string attr15 = reader.GetAttribute("YOffset");
string attr16 = reader.GetAttribute("Style");
string attr17 = reader.GetAttribute("Thickness");
reader.Read();

XsiType = attr1;
Filters = attr2;
if (attr3 != null) { StartLat = double.Parse(attr3); }
if (attr4 != null) { StartLon = double.Parse(attr4); }
if (attr5 != null) { EndLat = double.Parse(attr5); }
if (attr6 != null) { EndLon = double.Parse(attr6); }
if (attr7 != null) { Lat = double.Parse(attr7); }
if (attr8 != null) { Lon = double.Parse(attr8); }
Lines = attr9;
Bcg = ConvertToNullable<int>(attr10);
Size = ConvertToNullable<int>(attr11);
Underline = ConvertToNullable<bool>(attr12);
Opaque = ConvertToNullable<bool>(attr13);
XOffset = ConvertToNullable<int>(attr14);
YOffset = ConvertToNullable<int>(attr15);
Style = attr16;
Thickness = ConvertToNullable<int>(attr17);

}


// Here be dragons....
private static T? ConvertToNullable<T>(string inputValue) where T: struct
{
if (string.IsNullOrEmpty(inputValue) || inputValue.Trim().Length == 0)
{
// Magic Here
return null;
}
try
{
// Magic There.....
TypeConverter conv = TypeDescriptor.GetConverter(typeof(T));
return (T)conv.ConvertFrom(inputValue);
}
catch (NotSupportedException)
{
// MAGIC EVERYWHERE!
return null;
}
}
public XmlSchema GetSchema() { return null; }
public void WriteXml(XmlWriter writer) { throw new NotImplementedException(); }
}

[XmlElement(ElementName = "Filters")]
public object Filters { get; set; }

[XmlAttribute(AttributeName = "StartLat")]
public double StartLat { get; set; }
//[XmlRoot(ElementName = "Element")]
//public class Element
//{
// [XmlAttribute(AttributeName = "xsi-type")]
// public string XsiType { get; set; }

[XmlAttribute(AttributeName = "StartLon")]
public double StartLon { get; set; }
// [XmlAttribute(AttributeName = "Filters")]
// public string Filters { get; set; } = null;

[XmlAttribute(AttributeName = "EndLat")]
public double EndLat { get; set; }
// [XmlAttribute(AttributeName = "StartLat")]
// public double StartLat { get; set; }

[XmlAttribute(AttributeName = "EndLon")]
public double EndLon { get; set; }
// [XmlAttribute(AttributeName = "StartLon")]
// public double StartLon { get; set; }

[XmlAttribute(AttributeName = "Lat")]
public double Lat { get; set; }
// [XmlAttribute(AttributeName = "EndLat")]
// public double EndLat { get; set; }

[XmlAttribute(AttributeName = "Lon")]
public double Lon { get; set; }
// [XmlAttribute(AttributeName = "EndLon")]
// public double EndLon { get; set; }

[XmlAttribute(AttributeName = "Lines")]
public string Lines { get; set; }
}
// [XmlAttribute(AttributeName = "Lat")]
// public double Lat { get; set; }

// [XmlAttribute(AttributeName = "Lon")]
// public double Lon { get; set; }

// [XmlAttribute(AttributeName = "Lines")]
// public string Lines { get; set; }


// [XmlAttribute(AttributeName = "Bcg")]
// public int? Bcg { get; set; } = null;

// [XmlAttribute(AttributeName = "Size")]
// public int? Size { get; set; } = null;

// [XmlAttribute(AttributeName = "Underline")]
// public bool? Underline { get; set; } = null;

// [XmlAttribute(AttributeName = "Opaque")]
// public bool? Opaque { get; set; } = null;

// [XmlAttribute(AttributeName = "XOffset")]
// public int? XOffset { get; set; } = null;
// [XmlAttribute(AttributeName = "YOffset")]
// public int? YOffset { get; set; } = null;

// [XmlAttribute(AttributeName = "Style")]
// public string Style { get; set; } = null;
//}

[XmlRoot(ElementName = "Elements")]
public class Elements
Expand Down
2 changes: 1 addition & 1 deletion FeBuddyWinFormUI/FeBuddyWinFormUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>net6.0-windows</TargetFramework>
<OutputType>WinExe</OutputType>
<AssemblyName>FE-BUDDY</AssemblyName>
<Version>2.3.6</Version>
<Version>2.3.7</Version>
<Copyright>Copyright © 2022 Nikolas Boling, Kyle Sanders</Copyright>
<UseWindowsForms>true</UseWindowsForms>
<ApplicationIcon>FE_BUDDY_icon.ico</ApplicationIcon>
Expand Down
8 changes: 4 additions & 4 deletions FeBuddyWinFormUI/WinForms/AiracDataForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -681,8 +681,8 @@ private void InstructionsMenuItem_Click(object sender, EventArgs e)
private void RoadmapMenuItem_Click(object sender, EventArgs e)
{
Logger.LogMessage("DEBUG", "ROADMAP MENU ITEM CLICKED");
Process.Start(new ProcessStartInfo("https://github.com/Nikolai558/FE-BUDDY/blob/releases/ROADMAP.md") { UseShellExecute = true });
//Process.Start("https://github.com/Nikolai558/FE-BUDDY/blob/releases/ROADMAP.md");
Process.Start(new ProcessStartInfo("https://github.com/Nikolai558/FE-BUDDY/blob/development/ROADMAP.md") { UseShellExecute = true });
//Process.Start("https://github.com/Nikolai558/FE-BUDDY/blob/development/ROADMAP.md");
}

private void FAQMenuItem_Click(object sender, EventArgs e)
Expand All @@ -702,8 +702,8 @@ private void ChangeLogMenuItem_Click(object sender, EventArgs e)
private void CreditsMenuItem_Click(object sender, EventArgs e)
{
Logger.LogMessage("DEBUG", "CREDITS MENU ITEM CLICKED");
Process.Start(new ProcessStartInfo("https://github.com/Nikolai558/FE-BUDDY/blob/releases/Credits.md") { UseShellExecute = true });
//Process.Start("https://github.com/Nikolai558/FE-BUDDY/blob/releases/Credits.md");
Process.Start(new ProcessStartInfo("https://github.com/Nikolai558/FE-BUDDY/blob/development/Credits.md") { UseShellExecute = true });
//Process.Start("https://github.com/Nikolai558/FE-BUDDY/blob/development/Credits.md");
// CreditsForm frm = new CreditsForm();
// frm.ShowDialog();
}
Expand Down
8 changes: 4 additions & 4 deletions FeBuddyWinFormUI/WinForms/DatToSctForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,8 @@ private void InstructionsMenuItem_Click(object sender, EventArgs e)
private void RoadmapMenuItem_Click(object sender, EventArgs e)
{
Logger.LogMessage("DEBUG", "ROADMAP MENU ITEM CLICKED");
Process.Start(new ProcessStartInfo("https://github.com/Nikolai558/FE-BUDDY/blob/releases/ROADMAP.md") { UseShellExecute = true });
//Process.Start("https://github.com/Nikolai558/FE-BUDDY/blob/releases/ROADMAP.md");
Process.Start(new ProcessStartInfo("https://github.com/Nikolai558/FE-BUDDY/blob/development/ROADMAP.md") { UseShellExecute = true });
//Process.Start("https://github.com/Nikolai558/FE-BUDDY/blob/development/ROADMAP.md");
}

private void FAQMenuItem_Click(object sender, EventArgs e)
Expand All @@ -441,8 +441,8 @@ private void ChangeLogMenuItem_Click(object sender, EventArgs e)
private void CreditsMenuItem_Click(object sender, EventArgs e)
{
Logger.LogMessage("DEBUG", "CREDITS MENU ITEM CLICKED");
Process.Start(new ProcessStartInfo("https://github.com/Nikolai558/FE-BUDDY/blob/releases/Credits.md") { UseShellExecute = true });
//Process.Start("https://github.com/Nikolai558/FE-BUDDY/blob/releases/Credits.md");
Process.Start(new ProcessStartInfo("https://github.com/Nikolai558/FE-BUDDY/blob/development/Credits.md") { UseShellExecute = true });
//Process.Start("https://github.com/Nikolai558/FE-BUDDY/blob/development/Credits.md");
// CreditsForm frm = new CreditsForm();
// frm.ShowDialog();
}
Expand Down
8 changes: 4 additions & 4 deletions FeBuddyWinFormUI/WinForms/GeoJsonFrom.cs
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,8 @@ private void InstructionsMenuItem_Click(object sender, EventArgs e)
private void RoadmapMenuItem_Click(object sender, EventArgs e)
{
Logger.LogMessage("DEBUG", "ROADMAP MENU ITEM CLICKED");
Process.Start(new ProcessStartInfo("https://github.com/Nikolai558/FE-BUDDY/blob/releases/ROADMAP.md") { UseShellExecute = true });
//Process.Start("https://github.com/Nikolai558/FE-BUDDY/blob/releases/ROADMAP.md");
Process.Start(new ProcessStartInfo("https://github.com/Nikolai558/FE-BUDDY/blob/development/ROADMAP.md") { UseShellExecute = true });
//Process.Start("https://github.com/Nikolai558/FE-BUDDY/blob/development/ROADMAP.md");
}

private void FAQMenuItem_Click(object sender, EventArgs e)
Expand All @@ -479,8 +479,8 @@ private void ChangeLogMenuItem_Click(object sender, EventArgs e)
private void CreditsMenuItem_Click(object sender, EventArgs e)
{
Logger.LogMessage("DEBUG", "CREDITS MENU ITEM CLICKED");
Process.Start(new ProcessStartInfo("https://github.com/Nikolai558/FE-BUDDY/blob/releases/Credits.md") { UseShellExecute = true });
//Process.Start("https://github.com/Nikolai558/FE-BUDDY/blob/releases/Credits.md");
Process.Start(new ProcessStartInfo("https://github.com/Nikolai558/FE-BUDDY/blob/development/Credits.md") { UseShellExecute = true });
//Process.Start("https://github.com/Nikolai558/FE-BUDDY/blob/development/Credits.md");
// CreditsForm frm = new CreditsForm();
// frm.ShowDialog();
}
Expand Down
8 changes: 4 additions & 4 deletions FeBuddyWinFormUI/WinForms/KmlConversionForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,8 @@ private void InstructionsMenuItem_Click(object sender, EventArgs e)
private void RoadmapMenuItem_Click(object sender, EventArgs e)
{
Logger.LogMessage("DEBUG", "ROADMAP MENU ITEM CLICKED");
Process.Start(new ProcessStartInfo("https://github.com/Nikolai558/FE-BUDDY/blob/releases/ROADMAP.md") { UseShellExecute = true });
//Process.Start("https://github.com/Nikolai558/FE-BUDDY/blob/releases/ROADMAP.md");
Process.Start(new ProcessStartInfo("https://github.com/Nikolai558/FE-BUDDY/blob/development/ROADMAP.md") { UseShellExecute = true });
//Process.Start("https://github.com/Nikolai558/FE-BUDDY/blob/development/ROADMAP.md");
}

private void FAQMenuItem_Click(object sender, EventArgs e)
Expand All @@ -421,8 +421,8 @@ private void ChangeLogMenuItem_Click(object sender, EventArgs e)
private void CreditsMenuItem_Click(object sender, EventArgs e)
{
Logger.LogMessage("DEBUG", "CREDITS MENU ITEM CLICKED");
Process.Start(new ProcessStartInfo("https://github.com/Nikolai558/FE-BUDDY/blob/releases/Credits.md") { UseShellExecute = true });
//Process.Start("https://github.com/Nikolai558/FE-BUDDY/blob/releases/Credits.md");
Process.Start(new ProcessStartInfo("https://github.com/Nikolai558/FE-BUDDY/blob/development/Credits.md") { UseShellExecute = true });
//Process.Start("https://github.com/Nikolai558/FE-BUDDY/blob/development/Credits.md");
// CreditsForm frm = new CreditsForm();
// frm.ShowDialog();
}
Expand Down
Loading

0 comments on commit b5a1248

Please sign in to comment.