pull/3/head
dl2alf 2020-04-10 17:36:18 +02:00
rodzic 51cbeabd7b
commit b5c4265ebe
170 zmienionych plików z 5854 dodań i 1510 usunięć

Wyświetl plik

@ -93,8 +93,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
<HintPath>..\..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data.SQLite, Version=1.0.112.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">

Wyświetl plik

@ -399,7 +399,13 @@ namespace Vanara.Interop.DesktopWindowManager
{
lock (_lock)
{
try { ((EventHandler)eventHandlerList[keys[idx]]).Invoke(null, EventArgs.Empty); }
try
{
if (((EventHandler)eventHandlerList[keys[idx]]) != null)
{
((EventHandler)eventHandlerList[keys[idx]]).Invoke(null, EventArgs.Empty);
}
}
catch { };
}
}

Wyświetl plik

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="net40" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net40" />
<package id="System.Data.SQLite.Core" version="1.0.112.0" targetFramework="net40" />
</packages>

Wyświetl plik

@ -33,8 +33,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />

Wyświetl plik

@ -132,9 +132,9 @@ namespace AirScout.AircraftPositions
}
while (!this.CancellationPending);
if (this.CancellationPending)
this.ReportProgress(0, "Cancelled.");
this.ReportProgress(0, StartOptions.Name + "cancelled.");
else
this.ReportProgress(0, "Finished.");
this.ReportProgress(0, StartOptions.Name + " finished.");
}
#endregion

Wyświetl plik

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="net40" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net40" />
<package id="System.Data.SQLite.Core" version="1.0.112.0" targetFramework="net40" />
</packages>

Wyświetl plik

@ -33,8 +33,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />

Wyświetl plik

@ -359,9 +359,9 @@ namespace AirScout.Aircrafts
}
while (!this.CancellationPending && (StartOptions.Options == BACKGROUNDUPDATERSTARTOPTIONS.RUNPERIODICALLY));
if (this.CancellationPending)
this.ReportProgress(0, "Cancelled.");
this.ReportProgress(0, StartOptions.Name + " cancelled.");
else
this.ReportProgress(0, "Finished.");
this.ReportProgress(0, StartOptions.Name + " finished.");
}
#endregion

Wyświetl plik

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="net40" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net40" />
<package id="System.Data.SQLite.Core" version="1.0.112.0" targetFramework="net40" />
</packages>

Wyświetl plik

@ -32,6 +32,9 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data.SQLite, Version=1.0.112.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">

Wyświetl plik

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net40" />
<package id="System.Data.SQLite.Core" version="1.0.112.0" targetFramework="net40" />
</packages>

Wyświetl plik

@ -34,6 +34,9 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Core" />

Wyświetl plik

@ -2,4 +2,5 @@
<packages>
<package id="ILMerge" version="3.0.29" targetFramework="net40" />
<package id="ILMerge.MSBuild.Task" version="1.0.7" targetFramework="net40" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net40" />
</packages>

Wyświetl plik

@ -34,6 +34,12 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="BouncyCastle.Crypto, Version=1.8.5.0, Culture=neutral, PublicKeyToken=0e99375e54769942">
<HintPath>..\packages\BouncyCastle.1.8.5\lib\BouncyCastle.Crypto.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Core" />
@ -52,6 +58,7 @@
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
<Compile Include="TLS.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AirScout.PlaneFeeds.Plugin\AirScout.PlaneFeeds.Plugin.csproj">

Wyświetl plik

@ -14,6 +14,7 @@ using System.Web.Script.Serialization;
using System.Xml.Linq;
using System.Xml.Serialization;
using System.Collections;
using Newtonsoft.Json;
//TODO: Rename namespace to a name of your choice
namespace AirScout.PlaneFeeds.Plugin.OpenSky
@ -54,7 +55,7 @@ namespace AirScout.PlaneFeeds.Plugin.OpenSky
[Browsable(true)]
[CategoryAttribute("Web Feed")]
[DescriptionAttribute("Base URL for website.")]
[DefaultValue("http://opensky-network.org/api/states/all?lamin=%MINLAT%&lomin=%MINLON%&lamax=%MAXLAT%&lomax=%MAXLON%")]
[DefaultValue("https://opensky-network.org/api/states/all?lamin=%MINLAT%&lomin=%MINLON%&lamax=%MAXLAT%&lomax=%MAXLON%")]
public string URL { get; set; }
[Browsable(true)]
@ -236,7 +237,7 @@ namespace AirScout.PlaneFeeds.Plugin.OpenSky
"For details see https://opensky-network.org.\n\n" +
"As this is a community network, please consider to run a personal ADSB-receiver and to contribute your data to this network.\n\n" +
"This webfeed forces TLS1.2 transport layer security. Though this plugin is compiled for .NET4.0 it needs .NET4.5 or higher installed on this machine to work.\n\n" +
"This webfeed will probably not work on early Windows XP and Linux/Mono systems";
"This webfeed will probably not work on Windows XP and Linux/Mono systems";
}
}
public bool HasSettings
@ -341,18 +342,19 @@ namespace AirScout.PlaneFeeds.Plugin.OpenSky
String url = VC.ReplaceAllVars(Settings.URL);
Console.WriteLine("[" + this.GetType().Name + "]: Creating web request: " + url);
// this will only run on .NET 4.0 if you have installed .NET 4.5 or later frameworks on your machine!
ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;
HttpWebRequest webrequest = (HttpWebRequest)HttpWebRequest.Create(url);
webrequest.Timeout = Settings.Timeout * 1000;
webrequest.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0";
webrequest.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8";
Console.WriteLine("[" + this.GetType().Name + "]: Getting web response");
HttpWebResponse webresponse = (HttpWebResponse)webrequest.GetResponse();
Console.WriteLine("[" + this.GetType().Name + "]: Reading stream");
using (StreamReader sr = new StreamReader(webresponse.GetResponseStream()))
{
json = sr.ReadToEnd();
}
// ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;
// HttpWebRequest webrequest = (HttpWebRequest)HttpWebRequest.Create(url);
// webrequest.Timeout = Settings.Timeout * 1000;
// webrequest.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0";
// webrequest.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8";
// Console.WriteLine("[" + this.GetType().Name + "]: Getting web response");
// HttpWebResponse webresponse = (HttpWebResponse)webrequest.GetResponse();
// Console.WriteLine("[" + this.GetType().Name + "]: Reading stream");
// using (StreamReader sr = new StreamReader(webresponse.GetResponseStream()))
// {
// json = sr.ReadToEnd();
// }
json = OSNTlsClient.DownloadFile(url, Settings.Timeout * 1000);
// save raw data to file if enabled
if (Settings.SaveToFile)
{
@ -362,8 +364,9 @@ namespace AirScout.PlaneFeeds.Plugin.OpenSky
}
}
Console.WriteLine("[" + this.GetType().Name + "]: Analyzing data");
JavaScriptSerializer js = new JavaScriptSerializer();
dynamic root = js.Deserialize<dynamic>(json);
// JavaScriptSerializer js = new JavaScriptSerializer();
// dynamic root = js.Deserialize<dynamic>(json);
dynamic root = JsonConvert.DeserializeObject(json);
try
{
// analyze json string for planes data
@ -376,14 +379,7 @@ namespace AirScout.PlaneFeeds.Plugin.OpenSky
// different handling of reading JSON between Windows (Array) & Linux (ArrayList)
// access to data values itself is the same
int len = 0;
if (ac.GetType() == typeof(ArrayList))
{
len = ac.Count;
}
else if (ac.GetType() == typeof(Object[]))
{
len = ac.Length;
}
len = ac.Count;
// skip if too few fields in record
if (len < 17)
continue;
@ -428,7 +424,7 @@ namespace AirScout.PlaneFeeds.Plugin.OpenSky
}
catch (Exception ex)
{
// do nothing if property is not found
Console.WriteLine("[" + System.Reflection.MethodBase.GetCurrentMethod().Name + "]" + ex.Message);
}
Console.WriteLine("[" + this.GetType().Name + "]: Returning " + planes.Count + " planes");
return planes;

Wyświetl plik

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.3.0.0")]
[assembly: AssemblyFileVersion("1.3.0.0")]
[assembly: AssemblyVersion("1.3.3.0")]
[assembly: AssemblyFileVersion("1.3.3.0")]

Wyświetl plik

@ -0,0 +1,155 @@
using Org.BouncyCastle.Crypto.Tls;
using Org.BouncyCastle.Security;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net.Sockets;
using System.Text;
using System.Text.RegularExpressions;
namespace System.Net
{
class OSNTlsClient : DefaultTlsClient
{
string HostName;
public OSNTlsClient(string hostname)
{
HostName = hostname;
}
public override TlsAuthentication GetAuthentication()
{
TlsAuthentication auth = new MyTlsAuthentication();
return auth;
}
public override void NotifyNewSessionTicket(NewSessionTicket newSessionTicket)
{
base.NotifyNewSessionTicket(newSessionTicket);
}
public override IDictionary GetClientExtensions()
{
var clientExtensions = base.GetClientExtensions();
/*
List<ServerName> servers = new List<ServerName>();
servers.Add(new ServerName(NameType.host_name, HostName));
TlsExtensionsUtilities.AddServerNameExtension(clientExtensions, new ServerNameList(servers));
*/
return clientExtensions;
}
public static string DownloadFile (string url, int timeout)
{
string response = "";
Uri uri = null;
// try to pasre url
try
{
uri = new Uri(url);
}
catch (Exception ex)
{
return ex.Message;
}
// create new TCP-Client
using (var client = new TcpClient(uri.Host, uri.Port))
{
var sr = new SecureRandom();
var cl = new OSNTlsClient(uri.Host);
var protocol = new TlsClientProtocol(client.GetStream(), sr);
protocol.Connect(cl);
using (var stream = protocol.Stream)
{
var hdr = new StringBuilder();
hdr.AppendLine("GET " + uri.PathAndQuery + " HTTP/1.1");
hdr.AppendLine("Host: " + uri.Host);
hdr.AppendLine("Content-Type: text/json; charset=utf-8");
hdr.AppendLine("Connection: close");
hdr.AppendLine();
var dataToSend = Encoding.ASCII.GetBytes(hdr.ToString());
stream.Write(dataToSend, 0, dataToSend.Length);
// set stop watch as timout
Stopwatch st = new Stopwatch();
st.Start();
//read header bytewise
string header = "";
int totalRead = 0;
byte[] buff = new byte[1];
do
{
totalRead = stream.Read(buff, 0, buff.Length);
header += Encoding.ASCII.GetString(buff);
if (st.ElapsedMilliseconds > timeout)
throw new TimeoutException("Connection to " + url + " timed out.");
}
while (!header.Contains("\r\n\r\n"));
int contentlength = 0;
if (header.Contains("Transfer-Encoding: chunked"))
{
// chunked transfer, first line should contain content length
string strcontentlength = "";
do
{
totalRead = stream.Read(buff, 0, buff.Length);
strcontentlength += Encoding.ASCII.GetString(buff, 0, buff.Length);
if (st.ElapsedMilliseconds > timeout)
throw new TimeoutException("Connection to " + url + " timed out.");
}
while (!strcontentlength.Contains("\r\n"));
strcontentlength = strcontentlength.Replace("\r\n", "");
contentlength = int.Parse(strcontentlength, System.Globalization.NumberStyles.HexNumber);
}
else
{
// get content length from header
Regex strcontentlength = new Regex("(?<=Content-Length:\\s)\\d+", RegexOptions.IgnoreCase);
contentlength = int.Parse(strcontentlength.Match(header).Value);
}
// re-assign buffer
// read response
buff = new byte[1000];
totalRead = 0;
do
{
int bytesRead = stream.Read(buff, 0, buff.Length);
string part = Encoding.UTF8.GetString(buff, 0, bytesRead);
Console.WriteLine(part);
response += part;
totalRead += bytesRead;
if (st.ElapsedMilliseconds > timeout)
throw new TimeoutException("Connection to " + url + " timed out.");
}
while (totalRead < contentlength);
// cut response at the end
if (response.Contains("\r\n"))
{
response = response.Substring(0, response.IndexOf("\r\n"));
}
st.Stop();
}
}
return response;
}
}
class MyTlsAuthentication : TlsAuthentication
{
public TlsCredentials GetClientCredentials(CertificateRequest certificateRequest)
{
return null;
}
public void NotifyServerCertificate(Certificate serverCertificate)
{
}
}
}

Wyświetl plik

@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="BouncyCastle" version="1.8.5" targetFramework="net40" />
<package id="ILMerge" version="3.0.29" targetFramework="net40" />
<package id="ILMerge.MSBuild.Task" version="1.0.7" targetFramework="net40" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net40" />
</packages>

Wyświetl plik

@ -34,6 +34,9 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Core" />

Wyświetl plik

@ -14,6 +14,7 @@ using System.Web.Script.Serialization;
using System.Collections;
using System.Xml.Serialization;
using System.Xml.Linq;
using Newtonsoft.Json;
namespace AirScout.PlaneFeeds.Plugin.PlaneFinder
{
@ -329,13 +330,19 @@ namespace AirScout.PlaneFeeds.Plugin.PlaneFinder
}
}
Console.WriteLine("[" + this.GetType().Name + "]: Analyzing data");
JavaScriptSerializer js = new JavaScriptSerializer();
dynamic root = js.Deserialize<dynamic>(json);
try
{
Console.WriteLine("[" + this.GetType().Name + "]: Deserializing data from JSON");
// JavaScriptSerializer js = new JavaScriptSerializer();
// dynamic root = js.Deserialize<dynamic>(json);
dynamic root = JsonConvert.DeserializeObject(json);
Console.WriteLine("[" + this.GetType().Name + "]: Created object from JSON is " + root.GetType().ToString());
// analyze json string for planes data
// get the planes position list
Console.WriteLine("[" + this.GetType().Name + "]: Getting root of planes list");
var aclist = root["planes"];
Console.WriteLine("[" + this.GetType().Name + "]: Created root object is " + aclist.GetType().ToString());
foreach (var ac in aclist)
{
try
@ -343,20 +350,13 @@ namespace AirScout.PlaneFeeds.Plugin.PlaneFinder
// different handling of reading JSON between Windows (Array) & Linux (ArrayList)
// access to data values itself is the same
int len = 0;
if ( ac.Value.GetType() == typeof(ArrayList))
{
len = ac.Value.Count;
}
else if (ac.Value.GetType() == typeof(Object[]))
{
len = ac.Value.Length;
}
len = ac.Value.Count;
// skip if too few fields in record
if (len < 13)
continue;
PlaneFeedPluginPlaneInfo plane = new PlaneFeedPluginPlaneInfo();
// get hex first
plane.Hex = ac.Key.ToString().Trim().Replace("\"","");
plane.Hex = ac.Name.Trim().Replace("\"","");
// get position
plane.Lat = ReadPropertyDouble(ac, 4);
plane.Lon = ReadPropertyDouble(ac, 5);
@ -389,13 +389,28 @@ namespace AirScout.PlaneFeeds.Plugin.PlaneFinder
}
catch (Exception ex)
{
Console.WriteLine("[" + System.Reflection.MethodBase.GetCurrentMethod().Name + "]" + ex.Message);
Console.WriteLine("[" + this.GetType().Name + "]: " + ex.Message);
}
}
}
catch (Exception ex)
{
// do nothing if property is not found
string filename = args.TmpDirectory + Path.DirectorySeparatorChar + this.GetType().Name + "_" + DateTime.UtcNow.ToString("yyyy-MM-dd HH_mm_ss") + ".json";
Console.WriteLine("[" + this.GetType().Name + "]: " + ex.Message + "\n\nJSON response saved as: " + filename);
// save the JSON file
try
{
using (StreamWriter sw = new StreamWriter(filename))
{
sw.WriteLine(json);
}
}
catch
{
// do nothing if saving fails
}
// forward exception to parent thread
throw new Exception(ex.Message, ex.InnerException);
}
Console.WriteLine("[" + this.GetType().Name + "]: Returning " + planes.Count + " planes");
return planes;

Wyświetl plik

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.3.1.1")]
[assembly: AssemblyFileVersion("1.3.1.1")]
[assembly: AssemblyVersion("1.3.2.0")]
[assembly: AssemblyFileVersion("1.3.2.0")]

Wyświetl plik

@ -2,4 +2,5 @@
<packages>
<package id="ILMerge" version="3.0.29" targetFramework="net40" />
<package id="ILMerge.MSBuild.Task" version="1.0.7" targetFramework="net40" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net40" />
</packages>

Wyświetl plik

@ -34,6 +34,9 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Core" />

Wyświetl plik

@ -2,4 +2,5 @@
<packages>
<package id="ILMerge" version="3.0.29" targetFramework="net40" />
<package id="ILMerge.MSBuild.Task" version="1.0.7" targetFramework="net40" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net40" />
</packages>

Wyświetl plik

@ -34,6 +34,9 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Core" />

Wyświetl plik

@ -2,4 +2,5 @@
<packages>
<package id="ILMerge" version="3.0.29" targetFramework="net40" />
<package id="ILMerge.MSBuild.Task" version="1.0.7" targetFramework="net40" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net40" />
</packages>

Wyświetl plik

@ -34,6 +34,9 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Core" />

Wyświetl plik

@ -2,4 +2,5 @@
<packages>
<package id="ILMerge" version="3.0.29" targetFramework="net40" />
<package id="ILMerge.MSBuild.Task" version="1.0.7" targetFramework="net40" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net40" />
</packages>

Wyświetl plik

@ -34,6 +34,12 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="BouncyCastle.Crypto, Version=1.8.5.0, Culture=neutral, PublicKeyToken=0e99375e54769942">
<HintPath>..\packages\BouncyCastle.1.8.5\lib\BouncyCastle.Crypto.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Core" />
@ -50,6 +56,7 @@
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
<Compile Include="TLS.cs" />
<Compile Include="VirtualRadarServer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>

Wyświetl plik

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.3.0.0")]
[assembly: AssemblyFileVersion("1.3.0.0")]
[assembly: AssemblyVersion("1.3.3.0")]
[assembly: AssemblyFileVersion("1.3.3.0")]

Wyświetl plik

@ -0,0 +1,154 @@
using Org.BouncyCastle.Crypto.Tls;
using Org.BouncyCastle.Security;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net.Sockets;
using System.Text;
using System.Text.RegularExpressions;
namespace System.Net
{
class VRSTlsClient : DefaultTlsClient
{
string HostName;
public VRSTlsClient(string hostname)
{
HostName = hostname;
}
public override TlsAuthentication GetAuthentication()
{
TlsAuthentication auth = new MyTlsAuthentication();
return auth;
}
public override void NotifyNewSessionTicket(NewSessionTicket newSessionTicket)
{
base.NotifyNewSessionTicket(newSessionTicket);
}
public override IDictionary GetClientExtensions()
{
var clientExtensions = base.GetClientExtensions();
List<ServerName> servers = new List<ServerName>();
servers.Add(new ServerName(NameType.host_name, HostName));
TlsExtensionsUtilities.AddServerNameExtension(clientExtensions, new ServerNameList(servers));
return clientExtensions;
}
public static string DownloadFile (string url, int timeout, string apikey)
{
string response = "";
Uri uri = null;
// try to pasre url
try
{
uri = new Uri(url);
}
catch (Exception ex)
{
return ex.Message;
}
// create new TCP-Client
using (var client = new TcpClient(uri.Host, uri.Port))
{
var sr = new SecureRandom();
var cl = new VRSTlsClient(uri.Host);
var protocol = new TlsClientProtocol(client.GetStream(), sr);
protocol.Connect(cl);
using (var stream = protocol.Stream)
{
var hdr = new StringBuilder();
hdr.AppendLine("GET " + uri.PathAndQuery + " HTTP/1.1");
hdr.AppendLine("Host: " + uri.Host);
hdr.AppendLine("Content-Type: text/json; charset=utf-8");
hdr.AppendLine("api-auth:" + apikey);
hdr.AppendLine("Connection: close");
hdr.AppendLine();
var dataToSend = Encoding.ASCII.GetBytes(hdr.ToString());
stream.Write(dataToSend, 0, dataToSend.Length);
// set stop watch as timout
Stopwatch st = new Stopwatch();
st.Start();
//read header bytewise
string header = "";
int totalRead = 0;
byte[] buff = new byte[1];
do
{
totalRead = stream.Read(buff, 0, buff.Length);
header += Encoding.ASCII.GetString(buff);
if (st.ElapsedMilliseconds > timeout)
throw new TimeoutException("Connection to " + url + " timed out.");
}
while (!header.Contains("\r\n\r\n"));
int contentlength = 0;
if (header.Contains("Transfer-Encoding: chunked"))
{
// chunked transfer, first line should contain content length
string strcontentlength = "";
do
{
totalRead = stream.Read(buff, 0, buff.Length);
strcontentlength += Encoding.ASCII.GetString(buff, 0, buff.Length);
if (st.ElapsedMilliseconds > timeout)
throw new TimeoutException("Connection to " + url + " timed out.");
}
while (!strcontentlength.Contains("\r\n"));
strcontentlength = strcontentlength.Replace("\r\n", "");
contentlength = int.Parse(strcontentlength, System.Globalization.NumberStyles.HexNumber);
}
else
{
// get content length from header
Regex strcontentlength = new Regex("(?<=Content-Length:\\s)\\d+", RegexOptions.IgnoreCase);
contentlength = int.Parse(strcontentlength.Match(header).Value);
}
// re-assign buffer
// read response
buff = new byte[1000];
totalRead = 0;
do
{
int bytesRead = stream.Read(buff, 0, buff.Length);
string part = Encoding.UTF8.GetString(buff, 0, bytesRead);
Console.WriteLine(part);
response += part;
totalRead += bytesRead;
if (st.ElapsedMilliseconds > timeout)
throw new TimeoutException("Connection to " + url + " timed out.");
}
while (totalRead < contentlength);
// cut response at the end
if (response.Contains("\r\n"))
{
response = response.Substring(0, response.IndexOf("\r\n"));
}
st.Stop();
}
}
return response;
}
}
class MyTlsAuthentication : TlsAuthentication
{
public TlsCredentials GetClientCredentials(CertificateRequest certificateRequest)
{
return null;
}
public void NotifyServerCertificate(Certificate serverCertificate)
{
}
}
}

Wyświetl plik

@ -14,6 +14,7 @@ using System.Web.Script.Serialization;
using System.Security.Cryptography;
using System.Xml.Serialization;
using System.Xml.Linq;
using Newtonsoft.Json;
namespace AirScout.PlaneFeeds.Plugin.VirtualRadarServer
{
@ -200,7 +201,9 @@ namespace AirScout.PlaneFeeds.Plugin.VirtualRadarServer
return "Web feed from Virtual Radar Server\n\n" +
"(c) AirScout(www.airscout.eu)\n\n" +
"This feed requires an API-key, either personal or AirScout internal.\n" +
"See https://www.adsbexchange.com/ for details.\n";
"See https://www.adsbexchange.com/ for details.\n\n" +
"This webfeed forces TLS1.2 transport layer security. Though this plugin is compiled for .NET4.0 it needs .NET4.5 or higher installed on this machine to work.\n\n" +
"This webfeed will probably not work on Windows XP and Linux/Mono systems";
}
}
@ -337,20 +340,23 @@ namespace AirScout.PlaneFeeds.Plugin.VirtualRadarServer
// calculate url and get json
String url = VC.ReplaceAllVars(Settings.URL);
Console.WriteLine("[" + this.GetType().Name + "]: Creating web request: " + url);
HttpWebRequest webrequest = (HttpWebRequest)HttpWebRequest.Create(url);
webrequest.Referer = "http://www.vrs-world.com/";
webrequest.Timeout = Settings.Timeout * 1000;
webrequest.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0";
webrequest.Accept = "application/json, text/javascript, */*;q=0.01";
webrequest.AutomaticDecompression = System.Net.DecompressionMethods.Deflate | System.Net.DecompressionMethods.GZip;
webrequest.Headers.Add("api-auth:" + APIKey);
Console.WriteLine("[" + this.GetType().Name + "]: Getting web response");
HttpWebResponse webresponse = (HttpWebResponse)webrequest.GetResponse();
Console.WriteLine("[" + this.GetType().Name + "]: Reading stream");
using (StreamReader sr = new StreamReader(webresponse.GetResponseStream()))
{
json = sr.ReadToEnd();
}
// HttpWebRequest webrequest = (HttpWebRequest)HttpWebRequest.Create(url);
// webrequest.Referer = "http://www.vrs-world.com/";
// webrequest.Timeout = Settings.Timeout * 1000;
// webrequest.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0";
// webrequest.Accept = "application/json, text/javascript, */*;q=0.01";
// webrequest.AutomaticDecompression = System.Net.DecompressionMethods.Deflate | System.Net.DecompressionMethods.GZip;
// webrequest.Headers.Add("api-auth:" + APIKey);
// Console.WriteLine("[" + this.GetType().Name + "]: Getting web response");
// HttpWebResponse webresponse = (HttpWebResponse)webrequest.GetResponse();
// Console.WriteLine("[" + this.GetType().Name + "]: Reading stream");
//
// using (StreamReader sr = new StreamReader(webresponse.GetResponseStream()))
// {
// json = sr.ReadToEnd();
// }
// */
json = VRSTlsClient.DownloadFile(url, Settings.Timeout * 1000, APIKey);
// save raw data to file if enabled
if (Settings.SaveToFile)
{
@ -360,8 +366,9 @@ namespace AirScout.PlaneFeeds.Plugin.VirtualRadarServer
}
}
Console.WriteLine("[" + this.GetType().Name + "]: Analyzing data");
JavaScriptSerializer js = new JavaScriptSerializer();
dynamic root = js.Deserialize<dynamic>(json);
// JavaScriptSerializer js = new JavaScriptSerializer();
// dynamic root = js.Deserialize<dynamic>(json);
dynamic root = JsonConvert.DeserializeObject(json);
// 2017-07-23: workaround for "jumping planes" due to incorrect time stamps
// try to get the server time to adjust the time stamps in plane positions
// --> compare server time with local time and calculate offset

Wyświetl plik

@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="BouncyCastle" version="1.8.5" targetFramework="net40" />
<package id="ILMerge" version="3.0.29" targetFramework="net40" />
<package id="ILMerge.MSBuild.Task" version="1.0.7" targetFramework="net40" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net40" />
</packages>

Wyświetl plik

@ -31,6 +31,9 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Core" />
@ -47,6 +50,9 @@
<Compile Include="PlaneFeedPluginPlaneInfo.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>

Wyświetl plik

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net40" />
</packages>

Wyświetl plik

@ -54,8 +54,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
@ -72,9 +71,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="PlaneFeed.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="PlaneFeed.cs" />
<Compile Include="PlaneFeedWorkEventArgs.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Settings.Designer.cs">

Wyświetl plik

@ -38,6 +38,7 @@ namespace AirScout.PlaneFeeds
OK = 0
}
[System.ComponentModel.DesignerCategory("")]
[DefaultPropertyAttribute("Name")]
public class PlaneFeed : BackgroundWorker
{
@ -416,6 +417,7 @@ namespace AirScout.PlaneFeeds
Status = STATUS.ERROR;
this.ReportProgress((int)PROGRESS.ERROR, "Plane Feed Execption: " + ex.Message);
Log.WriteMessage(ex.ToString(), LogLevel.Error);
Console.WriteLine("Plane Feed Execption: " + ex.ToString(), LogLevel.Error);
}
}
while (!this.CancellationPending);

Wyświetl plik

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="net40" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net40" />
<package id="System.Data.SQLite.Core" version="1.0.112.0" targetFramework="net40" />
</packages>

Wyświetl plik

@ -33,8 +33,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />

Wyświetl plik

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="net40" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net40" />
<package id="System.Data.SQLite.Core" version="1.0.112.0" targetFramework="net40" />
</packages>

Wyświetl plik

@ -85,6 +85,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirScout.PlaneFeeds.Plugin.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirScout.PlaneFeeds.Plugin.PlaneFinder", "AirScout.PlaneFeeds.Plugin.PlaneFinder\AirScout.PlaneFeeds.Plugin.PlaneFinder.csproj", "{DB85E98A-E209-49D0-B6CF-6CDD5B8E20E3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ScoutBase.Maps", "ScoutBase\ScoutBase.Maps\ScoutBase.Maps.csproj", "{B3B005A5-CC05-430B-B966-20BE5E5985BF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MapTileGenerator", "MapTileGenerator\MapTileGenerator.csproj", "{3D5AADC3-E4CA-4C12-8939-8DC778F6018E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -559,6 +563,30 @@ Global
{DB85E98A-E209-49D0-B6CF-6CDD5B8E20E3}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{DB85E98A-E209-49D0-B6CF-6CDD5B8E20E3}.Release|x86.ActiveCfg = Release|Any CPU
{DB85E98A-E209-49D0-B6CF-6CDD5B8E20E3}.Release|x86.Build.0 = Release|Any CPU
{B3B005A5-CC05-430B-B966-20BE5E5985BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B3B005A5-CC05-430B-B966-20BE5E5985BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B3B005A5-CC05-430B-B966-20BE5E5985BF}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{B3B005A5-CC05-430B-B966-20BE5E5985BF}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{B3B005A5-CC05-430B-B966-20BE5E5985BF}.Debug|x86.ActiveCfg = Debug|Any CPU
{B3B005A5-CC05-430B-B966-20BE5E5985BF}.Debug|x86.Build.0 = Debug|Any CPU
{B3B005A5-CC05-430B-B966-20BE5E5985BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B3B005A5-CC05-430B-B966-20BE5E5985BF}.Release|Any CPU.Build.0 = Release|Any CPU
{B3B005A5-CC05-430B-B966-20BE5E5985BF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{B3B005A5-CC05-430B-B966-20BE5E5985BF}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{B3B005A5-CC05-430B-B966-20BE5E5985BF}.Release|x86.ActiveCfg = Release|Any CPU
{B3B005A5-CC05-430B-B966-20BE5E5985BF}.Release|x86.Build.0 = Release|Any CPU
{3D5AADC3-E4CA-4C12-8939-8DC778F6018E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3D5AADC3-E4CA-4C12-8939-8DC778F6018E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3D5AADC3-E4CA-4C12-8939-8DC778F6018E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{3D5AADC3-E4CA-4C12-8939-8DC778F6018E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{3D5AADC3-E4CA-4C12-8939-8DC778F6018E}.Debug|x86.ActiveCfg = Debug|Any CPU
{3D5AADC3-E4CA-4C12-8939-8DC778F6018E}.Debug|x86.Build.0 = Debug|Any CPU
{3D5AADC3-E4CA-4C12-8939-8DC778F6018E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3D5AADC3-E4CA-4C12-8939-8DC778F6018E}.Release|Any CPU.Build.0 = Release|Any CPU
{3D5AADC3-E4CA-4C12-8939-8DC778F6018E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{3D5AADC3-E4CA-4C12-8939-8DC778F6018E}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{3D5AADC3-E4CA-4C12-8939-8DC778F6018E}.Release|x86.ActiveCfg = Release|Any CPU
{3D5AADC3-E4CA-4C12-8939-8DC778F6018E}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

Wyświetl plik

@ -110,8 +110,7 @@
<HintPath>..\packages\DeviceId.4.5.0\lib\net40\DeviceId.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
@ -137,6 +136,9 @@
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="MapPreloader.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="CleanupDlg.cs">
<SubType>Form</SubType>
</Compile>
@ -230,7 +232,6 @@
<Compile Include="PlaneFeedSettingsDlg.Designer.cs">
<DependentUpon>PlaneFeedSettingsDlg.cs</DependentUpon>
</Compile>
<Compile Include="Planefinder.cs" />
<Compile Include="OptionsDlg.cs">
<SubType>Form</SubType>
</Compile>
@ -309,6 +310,10 @@
<None Include="TERMSANDCONDITIONS">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Resources\AirScout_Multi.png" />
<None Include="Resources\AirScout_Marker.png" />
<None Include="Resources\AirScout_Watchlist.png" />
<None Include="Resources\Settings.png" />
<Content Include="VersionHistory.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
@ -484,6 +489,10 @@
<Project>{009cabfd-726d-481f-972d-0a218e0ad9b9}</Project>
<Name>ScoutBase.Elevation</Name>
</ProjectReference>
<ProjectReference Include="..\ScoutBase\ScoutBase.Maps\ScoutBase.Maps.csproj">
<Project>{b3b005a5-cc05-430b-b966-20be5e5985bf}</Project>
<Name>ScoutBase.Maps</Name>
</ProjectReference>
<ProjectReference Include="..\ScoutBase\ScoutBase.Propagation\ScoutBase.Propagation.csproj">
<Project>{610db007-5f74-4b5d-8b71-5e2c163a99b3}</Project>
<Name>ScoutBase.Propagation</Name>

Wyświetl plik

@ -170,7 +170,7 @@
this.ud_Analysis_AmbiguousGap.Name = "ud_Analysis_AmbiguousGap";
this.ud_Analysis_AmbiguousGap.Size = new System.Drawing.Size(60, 20);
this.ud_Analysis_AmbiguousGap.TabIndex = 4;
this.ud_Analysis_AmbiguousGap.Value = global::AirScout.Properties.Settings.Default.Analysis_CrossingHistory_AmbiguousGap;
this.ud_Analysis_AmbiguousGap.Value = global::AirScout.Properties.Settings.Default.Analysis_CrossingHistory_AmbigousGap;
//
// label1
//

Wyświetl plik

@ -287,7 +287,7 @@ namespace AirScout
PlaneInfo pl = null;
if (!p.TryGetValue(Crossings[i].Hex, out pl))
p.Add(Crossings[i].Hex, Crossings[i]);
if (((Crossings[i].Time - Crossings[i - 1].Time).TotalSeconds > (double)Properties.Settings.Default.Analysis_CrossingHistory_AmbiguousGap) || (i >= Crossings.Count - 1))
if (((Crossings[i].Time - Crossings[i - 1].Time).TotalSeconds > (double)Properties.Settings.Default.Analysis_CrossingHistory_AmbigousGap) || (i >= Crossings.Count - 1))
{
// gap detected
if (p.Count > 1)

Wyświetl plik

@ -2733,9 +2733,34 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
********************************************************************************
Licence Information for BouncyCastle
(included in several planefeed plugins)
********************************************************************************
Copyright (c) 2000 - 2020 The Legion of the Bouncy Castle Inc.
(https://www.bouncycastle.org)
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
* * *
2020-01-20
2020-04-06

36
AirScout/MapDlg.Designer.cs wygenerowano
Wyświetl plik

@ -174,6 +174,7 @@
this.bw_Analysis_FileSaver = new System.ComponentModel.BackgroundWorker();
this.bw_Analysis_FileLoader = new System.ComponentModel.BackgroundWorker();
this.bw_AirportMapper = new System.ComponentModel.BackgroundWorker();
this.gm_Cache = new GMap.NET.WindowsForms.GMapControl();
((System.ComponentModel.ISupportInitialize)(this.sc_Map)).BeginInit();
this.sc_Map.Panel1.SuspendLayout();
this.sc_Map.Panel2.SuspendLayout();
@ -267,6 +268,7 @@
this.tp_Map.Controls.Add(this.ag_Azimuth);
this.tp_Map.Controls.Add(this.ag_Elevation);
this.tp_Map.Controls.Add(this.gm_Main);
this.tp_Map.Controls.Add(this.gm_Cache);
this.tp_Map.Location = new System.Drawing.Point(4, 22);
this.tp_Map.Name = "tp_Map";
this.tp_Map.Padding = new System.Windows.Forms.Padding(3);
@ -324,7 +326,7 @@
this.gm_Main.EmptyTileColor = System.Drawing.Color.Navy;
this.gm_Main.GrayScaleMode = false;
this.gm_Main.HelperLineOption = GMap.NET.WindowsForms.HelperLineOptions.DontShow;
this.gm_Main.LevelsKeepInMemmory = 5;
this.gm_Main.LevelsKeepInMemmory = 10;
this.gm_Main.Location = new System.Drawing.Point(3, 3);
this.gm_Main.MarkersEnabled = true;
this.gm_Main.MaxZoom = 2;
@ -1707,7 +1709,7 @@
this.tp_Control_Multi.Location = new System.Drawing.Point(4, 22);
this.tp_Control_Multi.Name = "tp_Control_Multi";
this.tp_Control_Multi.Padding = new System.Windows.Forms.Padding(3);
this.tp_Control_Multi.Size = new System.Drawing.Size(144, 378);
this.tp_Control_Multi.Size = new System.Drawing.Size(143, 378);
this.tp_Control_Multi.TabIndex = 1;
this.tp_Control_Multi.Text = "Multi";
this.tp_Control_Multi.Enter += new System.EventHandler(this.tp_Control_Multi_Enter);
@ -1726,7 +1728,7 @@
this.lv_Control_Watchlist.Location = new System.Drawing.Point(3, 3);
this.lv_Control_Watchlist.Name = "lv_Control_Watchlist";
this.lv_Control_Watchlist.OwnerDraw = true;
this.lv_Control_Watchlist.Size = new System.Drawing.Size(138, 349);
this.lv_Control_Watchlist.Size = new System.Drawing.Size(137, 349);
this.lv_Control_Watchlist.TabIndex = 1;
this.tt_Control_Watchlist.SetToolTip(this.lv_Control_Watchlist, "Watchlist");
this.lv_Control_Watchlist.UseCompatibleStateImageBehavior = false;
@ -1758,7 +1760,7 @@
this.btn_Control_Manage_Watchlist.Dock = System.Windows.Forms.DockStyle.Bottom;
this.btn_Control_Manage_Watchlist.Location = new System.Drawing.Point(3, 352);
this.btn_Control_Manage_Watchlist.Name = "btn_Control_Manage_Watchlist";
this.btn_Control_Manage_Watchlist.Size = new System.Drawing.Size(138, 23);
this.btn_Control_Manage_Watchlist.Size = new System.Drawing.Size(137, 23);
this.btn_Control_Manage_Watchlist.TabIndex = 0;
this.btn_Control_Manage_Watchlist.Text = "Manage Watchlist";
this.btn_Control_Manage_Watchlist.UseVisualStyleBackColor = true;
@ -1937,6 +1939,31 @@
this.bw_AirportMapper.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.bw_AirportMapper_ProgressChanged);
this.bw_AirportMapper.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.bw_AirportMapper_RunWorkerCompleted);
//
// gm_Cache
//
this.gm_Cache.Bearing = 0F;
this.gm_Cache.CanDragMap = true;
this.gm_Cache.Dock = System.Windows.Forms.DockStyle.Fill;
this.gm_Cache.EmptyTileColor = System.Drawing.Color.Navy;
this.gm_Cache.GrayScaleMode = false;
this.gm_Cache.HelperLineOption = GMap.NET.WindowsForms.HelperLineOptions.DontShow;
this.gm_Cache.LevelsKeepInMemmory = 5;
this.gm_Cache.Location = new System.Drawing.Point(3, 3);
this.gm_Cache.MarkersEnabled = true;
this.gm_Cache.MaxZoom = 2;
this.gm_Cache.MinZoom = 2;
this.gm_Cache.MouseWheelZoomType = GMap.NET.MouseWheelZoomType.MousePositionAndCenter;
this.gm_Cache.Name = "gm_Cache";
this.gm_Cache.NegativeMode = false;
this.gm_Cache.PolygonsEnabled = true;
this.gm_Cache.RetryLoadTile = 0;
this.gm_Cache.RoutesEnabled = true;
this.gm_Cache.SelectedAreaFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(65)))), ((int)(((byte)(105)))), ((int)(((byte)(225)))));
this.gm_Cache.ShowTileGridLines = false;
this.gm_Cache.Size = new System.Drawing.Size(838, 309);
this.gm_Cache.TabIndex = 29;
this.gm_Cache.Zoom = 0D;
//
// MapDlg
//
this.AcceptButton = this.btn_Map_PlayPause;
@ -2150,6 +2177,7 @@
private AquaControls.AquaGauge ag_Elevation;
private GMap.NET.WindowsForms.GMapControl gm_Main;
private System.Windows.Forms.TabPage tp_News;
private GMap.NET.WindowsForms.GMapControl gm_Cache;
}
}

Wyświetl plik

@ -55,6 +55,7 @@ using ScoutBase.Database;
using ScoutBase.Elevation;
using ScoutBase.Stations;
using ScoutBase.Propagation;
using ScoutBase.Maps;
using SerializableGenerics;
using Ionic.Zip;
using Newtonsoft.Json;
@ -381,7 +382,7 @@ namespace AirScout
private bool FirstRun = true;
private bool CleanRun = false;
private Splash SplashDlg = new Splash();
private Splash SplashDlg;
// Background workers
public ElevationDatabaseUpdater bw_GLOBEUpdater = new ElevationDatabaseUpdater();
@ -397,6 +398,8 @@ namespace AirScout
public PathCalculator bw_SRTM3PathCalculator = new PathCalculator(ELEVATIONMODEL.SRTM3);
public PathCalculator bw_SRTM1PathCalculator = new PathCalculator(ELEVATIONMODEL.SRTM1);
public MapPreloader bw_MapPreloader = new MapPreloader();
// Operating modes
AIRSCOUTPATHMODE PathMode = AIRSCOUTPATHMODE.NONE;
AIRSCOUTLIFEMODE LifeMode = AIRSCOUTLIFEMODE.NONE;
@ -502,7 +505,12 @@ namespace AirScout
if (result == DialogResult.Abort)
System.Environment.Exit(-1);
if (result == DialogResult.OK)
{
// re-initialize settings as they can be lost during clean-up
InitializeSettings();
// set a clean run flag
CleanRun = true;
}
}
}
// set elevation database update event handler
@ -527,6 +535,9 @@ namespace AirScout
bw_SRTM3PathCalculator.ProgressChanged += new ProgressChangedEventHandler(bw_ElevationPathCalculator_ProgressChanged);
bw_SRTM1PathCalculator.ProgressChanged += new ProgressChangedEventHandler(bw_ElevationPathCalculator_ProgressChanged);
// set map preloader event handler
bw_MapPreloader.ProgressChanged += new ProgressChangedEventHandler(bw_MapPreloader_ProgressChanged);
// save FirstRun property before trying to upgrade user settings
FirstRun = Properties.Settings.Default.FirstRun;
}
@ -900,6 +911,20 @@ namespace AirScout
}
if (Properties.Settings.Default.MyCalls.Count == 0)
Properties.Settings.Default.MyCalls.Add("DL2ALF");
// checking window size & location
Rectangle bounds = Screen.FromControl(this).Bounds;
if ((Properties.Settings.Default.General_WindowLocation.X < bounds.Left) ||
(Properties.Settings.Default.General_WindowLocation.Y < bounds.Top) ||
(Properties.Settings.Default.General_WindowLocation.X > bounds.Right) ||
(Properties.Settings.Default.General_WindowLocation.Y > bounds.Bottom))
{
Properties.Settings.Default.General_WindowLocation = new System.Drawing.Point(bounds.Left, bounds.Top);
}
if ((Properties.Settings.Default.General_WindowSize.Width > bounds.Width) ||
(Properties.Settings.Default.General_WindowSize.Height > bounds.Height))
{
Properties.Settings.Default.General_WindowSize = new System.Drawing.Size(bounds.Width, bounds.Height);
}
// list all properties in log
foreach (SettingsPropertyValue p in Properties.Settings.Default.PropertyValues)
{
@ -920,6 +945,40 @@ namespace AirScout
if (!Properties.Settings.Default.StationDatabase_Update_URL.EndsWith("/"))
Properties.Settings.Default.StationDatabase_Update_URL = Properties.Settings.Default.StationDatabase_Update_URL + "/";
*/
// check for last saved stations not in database and revert to at least DL2ALF and GB3MHZ if necessary
// first check for saved stations
string mycall = GetPropertyDefaultValue(nameof(Properties.Settings.Default.MyCall));
double mylat = GetPropertyDefaultValue(nameof(Properties.Settings.Default.MyLat));
double mylon = GetPropertyDefaultValue(nameof(Properties.Settings.Default.MyLon));
string myloc = MaidenheadLocator.LocFromLatLon(mylat, mylon, Properties.Settings.Default.Locator_SmallLettersForSubsquares, 3);
LocationDesignator ld = StationData.Database.LocationFind(mycall, myloc);
if (ld == null)
{
mycall = GetPropertyDefaultValue(nameof(Properties.Settings.Default.MyCall));
mylat = GetPropertyDefaultValue(nameof(Properties.Settings.Default.MyLat));
mylon = GetPropertyDefaultValue(nameof(Properties.Settings.Default.MyLon));
myloc = MaidenheadLocator.LocFromLatLon(mylat, mylon, Properties.Settings.Default.Locator_SmallLettersForSubsquares, 3);
UpdateLocation(mycall, mylat, mylon, GEOSOURCE.FROMUSER);
Properties.Settings.Default.MyCall = mycall;
Properties.Settings.Default.MyLat = mylat;
Properties.Settings.Default.MyLon = mylon;
}
string dxcall = GetPropertyDefaultValue(nameof(Properties.Settings.Default.DXCall));
double dxlat = GetPropertyDefaultValue(nameof(Properties.Settings.Default.DXLat));
double dxlon = GetPropertyDefaultValue(nameof(Properties.Settings.Default.DXLon));
string dxloc = MaidenheadLocator.LocFromLatLon(dxlat, dxlon, Properties.Settings.Default.Locator_SmallLettersForSubsquares, 3);
ld = StationData.Database.LocationFind(dxcall, dxloc);
if (ld == null)
{
dxcall = GetPropertyDefaultValue(nameof(Properties.Settings.Default.DXCall));
dxlat = GetPropertyDefaultValue(nameof(Properties.Settings.Default.DXLat));
dxlon = GetPropertyDefaultValue(nameof(Properties.Settings.Default.DXLon));
dxloc = MaidenheadLocator.LocFromLatLon(dxlat, dxlon, Properties.Settings.Default.Locator_SmallLettersForSubsquares, 3);
UpdateLocation(dxcall, dxlat, dxlon, GEOSOURCE.FROMUSER);
Properties.Settings.Default.DXCall = dxcall;
Properties.Settings.Default.DXLat = dxlat;
Properties.Settings.Default.DXLon = dxlon;
}
Log.WriteMessage("Checking properties finished...");
}
@ -955,6 +1014,8 @@ namespace AirScout
Log.WriteMessage(Application.ProductName + " is starting up.", 0, false);
Log.WriteMessage("-------------------------------------------------------------------------------------");
Log.WriteMessage("Operating system : " + Environment.OSVersion.Platform);
Log.WriteMessage("OS Major version : " + Environment.OSVersion.Version.Major);
Log.WriteMessage("OS Minor version : " + Environment.OSVersion.Version.Minor);
Log.WriteMessage("Application directory : " + AppDirectory);
Log.WriteMessage("Application data directory: " + AppDataDirectory);
Log.WriteMessage("Log directory : " + LogDirectory);
@ -982,14 +1043,30 @@ namespace AirScout
Properties.Settings.Default.StationsDatabase_Directory = StationData.Database.DefaultDatabaseDirectory();
Properties.Settings.Default.ElevationDatabase_Directory = ElevationData.Database.DefaultDatabaseDirectory();
Properties.Settings.Default.PropagationDatabase_Directory = PropagationData.Database.DefaultDatabaseDirectory();
MapData.Database.DefaultDatabaseDirectory();
Log.WriteMessage("Finished.");
}
private void Splash(string text)
{
Splash(text, Color.White);
}
private void Splash(string text, Color color)
{
// show message in splash window
if (SplashDlg != null)
{
SplashDlg.Status(text, color);
}
}
private void MapDlg_Load(object sender, EventArgs e)
{
try
{
// Show splash screen
SplashDlg = new Splash();
SplashDlg.Show();
// bring window to front
SplashDlg.BringToFront();
@ -1001,25 +1078,25 @@ namespace AirScout
// show AirScout main window
this.BringToFront();
// Check directories, complete it and create, if not exist
SplashDlg.Status("Checking directories...");
Splash("Checking directories...");
CheckDirectories();
// start a log, specify format of logfile and entries
SplashDlg.Status("Initializing logfile...");
Splash("Initializing logfile...");
InitializeLogfile();
// Check properties
SplashDlg.Status("Checking settings...");
Splash("Checking settings...");
CheckSettings();
// check, copy and load plugins
SplashDlg.Status("Loading plugins...");
Splash("Loading plugins...");
LoadPlugins();
// Initialize database
SplashDlg.Status("Initializing database...");
Splash("Initializing database...");
InitializeDatabase();
// initialize icons
SplashDlg.Status("Creating icons...");
Splash("Creating icons...");
InitializeIcons();
ToolTipFont = CreateFontFromString(Properties.Settings.Default.Map_ToolTipFont);
SplashDlg.Status("Loading Map...");
Splash("Loading Map...");
// initialize map
// setting User Agent to fix Open Street Map issue 2016-09-20
@ -1046,7 +1123,7 @@ namespace AirScout
// setting User Agent to fix Open Street Map issue 2016-09-20
GMap.NET.MapProviders.GMapProvider.UserAgent = "AirScout";
// clearing referrer URL issue 2019-12-14
gm_Main.MapProvider.RefererUrl = "";
gm_Nearest.MapProvider.RefererUrl = "";
// set initial settings for main map
gm_Nearest.MapProvider = GMapProviders.Find(Properties.Settings.Default.Map_Provider);
gm_Main.MapProvider.RefererUrl = "";
@ -1062,6 +1139,13 @@ namespace AirScout
gm_Nearest.Overlays.Add(gmo_NearestPlanes);
gm_Nearest.Position = new PointLatLng(Properties.Settings.Default.MyLat, Properties.Settings.Default.MyLon);
// setting User Agent to fix Open Street Map issue 2016-09-20
GMap.NET.MapProviders.GMapProvider.UserAgent = "AirScout";
// clearing referrer URL issue 2019-12-14
gm_Cache.MapProvider.RefererUrl = "";
// set initial settings for main map
gm_Cache.MapProvider = GMapProviders.Find(Properties.Settings.Default.Map_Provider);
cntdn = Properties.Settings.Default.Planes_Update;
btn_Map_PlayPause.Select();
@ -1157,7 +1241,8 @@ namespace AirScout
CheckDirectories();
CheckSettings();
// reset topmost state
SplashDlg.TopMost = false;
if (SplashDlg != null)
SplashDlg.TopMost = false;
/*
// run database updater once for basic information
bw_DatabaseUpdater.RunWorkerAsync(UPDATERSTARTOPTIONS.FIRSTRUN);
@ -1165,7 +1250,8 @@ namespace AirScout
while (bw_DatabaseUpdater.IsBusy)
Application.DoEvents();
*/
SplashDlg.Close();
if (SplashDlg != null)
SplashDlg.Close();
// must have internet connection on FirstRun
CheckInternet();
// show FirstRunWizard
@ -1299,6 +1385,10 @@ namespace AirScout
cb_DXLoc.AutoLength = Properties.Settings.Default.Locator_AutoLength;
// populate watchlist
RefreshWatchlistView();
// Linux/Mon Hack: cycle control tab view to ensure that all elements are drawn
tc_Control.SelectedTab = tp_Control_Options;
tc_Control.SelectedTab = tp_Control_Multi;
tc_Control.SelectedTab = tp_Control_Single;
// set players bounds
sb_Analysis_Play.Minimum = 0;
sb_Analysis_Play.Maximum = int.MaxValue;
@ -1454,6 +1544,11 @@ namespace AirScout
{
StationDatabaseUpdaterStartOptions startoptions = new StationDatabaseUpdaterStartOptions();
startoptions.Name = "Stations";
startoptions.RestrictToAreaOfInterest = Properties.Settings.Default.Location_RestrictToAreaOfInterest;
startoptions.MinLat = Properties.Settings.Default.MinLat;
startoptions.MinLon = Properties.Settings.Default.MinLon;
startoptions.MaxLat = Properties.Settings.Default.MaxLat;
startoptions.MaxLon = Properties.Settings.Default.MaxLon;
startoptions.InstanceID = Properties.Settings.Default.AirScout_Instance_ID;
startoptions.SessionKey = SessionKey;
startoptions.GetKeyURL = Properties.Settings.Default.AirScout_GetKey_URL;
@ -1515,6 +1610,8 @@ namespace AirScout
bw_SRTM3PathCalculator.RunWorkerAsync(BACKGROUNDUPDATERSTARTOPTIONS.RUNONCE);
if (Properties.Settings.Default.Elevation_SRTM1_Enabled && (bw_SRTM1PathCalculator != null) && !bw_SRTM1PathCalculator.IsBusy)
bw_SRTM1PathCalculator.RunWorkerAsync(BACKGROUNDUPDATERSTARTOPTIONS.RUNONCE);
if (Properties.Settings.Default.Map_Preloader_Enabled && (bw_MapPreloader != null) && !bw_MapPreloader.IsBusy)
bw_MapPreloader.RunWorkerAsync(BACKGROUNDUPDATERSTARTOPTIONS.RUNONCE);
}
else if (Properties.Settings.Default.Background_Update_Periodically)
{
@ -1522,6 +1619,11 @@ namespace AirScout
{
StationDatabaseUpdaterStartOptions startoptions = new StationDatabaseUpdaterStartOptions();
startoptions.Name = "Stations";
startoptions.MinLat = Properties.Settings.Default.MinLat;
startoptions.MinLon = Properties.Settings.Default.MinLon;
startoptions.MaxLat = Properties.Settings.Default.MaxLat;
startoptions.MaxLon = Properties.Settings.Default.MaxLon;
startoptions.RestrictToAreaOfInterest = Properties.Settings.Default.Location_RestrictToAreaOfInterest;
startoptions.InstanceID = Properties.Settings.Default.AirScout_Instance_ID;
startoptions.SessionKey = SessionKey;
startoptions.GetKeyURL = Properties.Settings.Default.AirScout_GetKey_URL;
@ -1583,6 +1685,8 @@ namespace AirScout
bw_SRTM3PathCalculator.RunWorkerAsync(BACKGROUNDUPDATERSTARTOPTIONS.RUNPERIODICALLY);
if (Properties.Settings.Default.Elevation_SRTM1_Enabled && (bw_SRTM1PathCalculator != null) && !bw_SRTM1PathCalculator.IsBusy)
bw_SRTM1PathCalculator.RunWorkerAsync(BACKGROUNDUPDATERSTARTOPTIONS.RUNPERIODICALLY);
if (Properties.Settings.Default.Map_Preloader_Enabled && (bw_MapPreloader != null) && !bw_MapPreloader.IsBusy)
bw_MapPreloader.RunWorkerAsync(BACKGROUNDUPDATERSTARTOPTIONS.RUNPERIODICALLY);
}
if ((bw_PlaneFeed1 != null) && (!bw_PlaneFeed1.IsBusy))
bw_PlaneFeed1.RunWorkerAsync(CreatePlaneFeedWorkEventArgs(Properties.Settings.Default.Planes_PlaneFeed1));
@ -1631,7 +1735,7 @@ namespace AirScout
{
Say("Stopping background threads...");
// cancel permanent background workers, wait for finish
int bcount = 13;
int bcount = 14;
int i = 1;
// cancel all threads
StopBackgroundworker(bw_WinTestReceive, nameof(bw_WinTestReceive), i, bcount); i++;
@ -1647,6 +1751,7 @@ namespace AirScout
StopBackgroundworker(bw_SRTM1PathCalculator, nameof(bw_SRTM1PathCalculator), i, bcount); i++;
StopBackgroundworker(bw_AircraftDatabaseUpdater, nameof(bw_AircraftDatabaseUpdater), i, bcount); i++;
StopBackgroundworker(bw_StationDatabaseUpdater, nameof(bw_StationDatabaseUpdater), i, bcount); i++;
StopBackgroundworker(bw_MapPreloader, nameof(bw_MapPreloader), i, bcount); i++;
Say("Background threads stopped.");
}
@ -1996,6 +2101,8 @@ namespace AirScout
private void UpdateAirports()
{
// clear airports first
gmo_Airports.Clear();
if (!Properties.Settings.Default.Airports_Activate)
return;
if ((Airports == null) || (Airports.Count == 0))
@ -2061,14 +2168,87 @@ namespace AirScout
return usersettingspath;
}
private XmlElement CreateUserSection(XmlDocument doc, SettingsBase settings)
{
XmlElement usersection = doc.CreateElement(string.Empty, "section", string.Empty);
XmlAttribute sectionname = doc.CreateAttribute(string.Empty, "name", string.Empty);
sectionname.Value = settings.GetType().FullName;
usersection.Attributes.Append(sectionname);
XmlAttribute sectiontype = doc.CreateAttribute(string.Empty, "type", string.Empty);
Assembly assembly = Assembly.GetAssembly(typeof(System.Configuration.ClientSettingsSection));
// sectiontype.Value = "System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
sectiontype.Value = typeof(System.Configuration.ClientSettingsSection).FullName + ", " + assembly.FullName;
usersection.Attributes.Append(sectiontype);
XmlAttribute sectionallowexedefinition = doc.CreateAttribute(string.Empty, "allowExeDefinition", string.Empty);
sectionallowexedefinition.Value = "MachineToLocalUser";
usersection.Attributes.Append(sectionallowexedefinition);
XmlAttribute sectionrequirepermission = doc.CreateAttribute(string.Empty, "requirePermission", string.Empty);
sectionrequirepermission.Value = "false";
usersection.Attributes.Append(sectionrequirepermission);
return usersection;
}
private XmlElement SerializeSettings(XmlDocument doc, SettingsBase settings)
{
XmlElement properties = doc.CreateElement(string.Empty, settings.ToString(), string.Empty);
foreach (SettingsPropertyValue p in settings.PropertyValues)
{
if ((p != null) && (p.Name != null) && (p.PropertyValue != null) && !p.UsingDefaultValue)
{
// Console.WriteLine("Appending " + p.Name + " = " + p.PropertyValue.ToString());
XmlElement setting = doc.CreateElement(string.Empty, "setting", string.Empty);
XmlAttribute name = doc.CreateAttribute(string.Empty, "name", string.Empty);
name.Value = p.Name.ToString();
setting.Attributes.Append(name);
XmlAttribute serializeas = doc.CreateAttribute(string.Empty, "serializeAs", string.Empty);
serializeas.Value = p.Property.SerializeAs.ToString();
setting.Attributes.Append(serializeas);
XmlElement value = doc.CreateElement(string.Empty, "value", string.Empty);
if (p.PropertyValue != null && p.Property.SerializeAs == SettingsSerializeAs.String)
{
XmlText text = doc.CreateTextNode(p.SerializedValue.ToString());
value.AppendChild(text);
}
else
{
if (p.PropertyValue != null && p.Property.SerializeAs == SettingsSerializeAs.Xml)
{
MemoryStream ms = new MemoryStream();
XmlWriter writer = XmlWriter.Create(ms, new XmlWriterSettings
{
NewLineOnAttributes = true,
OmitXmlDeclaration = true
});
XmlSerializer serializer = new XmlSerializer(p.PropertyValue.GetType());
serializer.Serialize(writer, p.PropertyValue);
byte[] text2 = new byte[ms.ToArray().Length - 3];
Array.Copy(ms.ToArray(), 3, text2, 0, text2.Length);
XmlText xml = doc.CreateTextNode(Encoding.UTF8.GetString(text2.ToArray<byte>()));
value.AppendChild(xml);
value.InnerXml = WebUtility.HtmlDecode(value.InnerXml);
}
}
setting.AppendChild(value);
properties.AppendChild(setting);
}
}
return properties;
}
private void SaveUserSettings()
{
try
{
Log.WriteMessage("Saving configuration...");
// save all settings
ScoutBase.Elevation.Properties.Settings.Default.Save();
ScoutBase.Stations.Properties.Settings.Default.Save();
ScoutBase.Propagation.Properties.Settings.Default.Save();
AirScout.Aircrafts.Properties.Settings.Default.Save();
Properties.Settings.Default.Save();
if (!SupportFunctions.IsMono)
return;
// Linux/Mono hack to save all properties in a correct manner
Console.WriteLine("Creating XML document...");
XmlDocument doc = new XmlDocument();
XmlDeclaration xmlDeclaration = doc.CreateXmlDeclaration("1.0", "UTF-8", null);
@ -2082,114 +2262,31 @@ namespace AirScout
XmlAttribute usersettingsname = doc.CreateAttribute(string.Empty, "name", string.Empty);
usersettingsname.Value = "userSettings";
usersettingsgroup.Attributes.Append(usersettingsname);
XmlElement usersection = doc.CreateElement(string.Empty, "section", string.Empty);
XmlAttribute sectionname = doc.CreateAttribute(string.Empty, "name", string.Empty);
sectionname.Value = "AirScout.PlaneFeeds.Properties.Settings";
usersection.Attributes.Append(sectionname);
XmlAttribute sectiontype = doc.CreateAttribute(string.Empty, "type", string.Empty);
sectiontype.Value = "System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
usersection.Attributes.Append(sectiontype);
XmlAttribute sectionallowexedefinition = doc.CreateAttribute(string.Empty, "allowExeDefinition", string.Empty);
sectionallowexedefinition.Value = "MachineToLocalUser";
usersection.Attributes.Append(sectionallowexedefinition);
XmlAttribute sectionrequirepermission = doc.CreateAttribute(string.Empty, "requirePermission", string.Empty);
sectionrequirepermission.Value = "false";
usersection.Attributes.Append(sectionrequirepermission);
usersettingsgroup.AppendChild(usersection);
usersettingsgroup.AppendChild(CreateUserSection(doc, AirScout.PlaneFeeds.Properties.Settings.Default));
usersettingsgroup.AppendChild(CreateUserSection(doc, ScoutBase.Elevation.Properties.Settings.Default));
usersettingsgroup.AppendChild(CreateUserSection(doc, ScoutBase.Stations.Properties.Settings.Default));
usersettingsgroup.AppendChild(CreateUserSection(doc, ScoutBase.Propagation.Properties.Settings.Default));
usersettingsgroup.AppendChild(CreateUserSection(doc, AirScout.Aircrafts.Properties.Settings.Default));
configsections.AppendChild(usersettingsgroup);
XmlElement usersettings = doc.CreateElement(string.Empty, "userSettings", string.Empty);
configuration.AppendChild(usersettings);
Console.WriteLine("Writing user settings...");
// append AirScout.PlaneFeeds properties
Console.WriteLine("Appending AirScout.PlaneFeeds.Properties.Settings.Default node...");
XmlElement planefeedproperties = doc.CreateElement(string.Empty, AirScout.PlaneFeeds.Properties.Settings.Default.ToString(), string.Empty);
usersettings.AppendChild(planefeedproperties);
foreach (SettingsPropertyValue p in AirScout.PlaneFeeds.Properties.Settings.Default.PropertyValues)
{
if ((p != null) && (p.Name != null) && (p.PropertyValue != null) && !p.UsingDefaultValue)
{
// Console.WriteLine("Appending " + p.Name + " = " + p.PropertyValue.ToString());
XmlElement setting = doc.CreateElement(string.Empty, "setting", string.Empty);
XmlAttribute name = doc.CreateAttribute(string.Empty, "name", string.Empty);
name.Value = p.Name.ToString();
setting.Attributes.Append(name);
XmlAttribute serializeas = doc.CreateAttribute(string.Empty, "serializeAs", string.Empty);
serializeas.Value = p.Property.SerializeAs.ToString();
setting.Attributes.Append(serializeas);
XmlElement value = doc.CreateElement(string.Empty, "value", string.Empty);
if (p.PropertyValue != null && p.Property.SerializeAs == SettingsSerializeAs.String)
{
XmlText text = doc.CreateTextNode(p.SerializedValue.ToString());
value.AppendChild(text);
}
else
{
if (p.PropertyValue != null && p.Property.SerializeAs == SettingsSerializeAs.Xml)
{
MemoryStream ms = new MemoryStream();
XmlWriter writer = XmlWriter.Create(ms, new XmlWriterSettings
{
NewLineOnAttributes = true,
OmitXmlDeclaration = true
});
XmlSerializer serializer = new XmlSerializer(p.PropertyValue.GetType());
serializer.Serialize(writer, p.PropertyValue);
byte[] text2 = new byte[ms.ToArray().Length - 3];
Array.Copy(ms.ToArray(), 3, text2, 0, text2.Length);
XmlText xml = doc.CreateTextNode(Encoding.UTF8.GetString(text2.ToArray<byte>()));
value.AppendChild(xml);
value.InnerXml = WebUtility.HtmlDecode(value.InnerXml);
}
}
setting.AppendChild(value);
planefeedproperties.AppendChild(setting);
}
}
usersettings.AppendChild(SerializeSettings(doc, AirScout.PlaneFeeds.Properties.Settings.Default));
// append ScoutBase properties
Console.WriteLine("Appending ScoutBase.Elevation.Properties.Settings.Default node...");
usersettings.AppendChild(SerializeSettings(doc, ScoutBase.Elevation.Properties.Settings.Default));
Console.WriteLine("Appending ScoutBase.Stations.Properties.Settings.Default node...");
usersettings.AppendChild(SerializeSettings(doc, ScoutBase.Stations.Properties.Settings.Default));
Console.WriteLine("Appending ScoutBase.Propagation.Properties.Settings.Default node...");
// append AirScout.Aircrafts properties
usersettings.AppendChild(SerializeSettings(doc, ScoutBase.Propagation.Properties.Settings.Default));
Console.WriteLine("Appending AirScout.Aircrafts.Settings.Default node...");
usersettings.AppendChild(SerializeSettings(doc, AirScout.Aircrafts.Properties.Settings.Default));
// append AirScout properties
Console.WriteLine("Appending AirScout.Properties.Settings.Default node...");
XmlElement properties = doc.CreateElement(string.Empty, Properties.Settings.Default.ToString(), string.Empty);
usersettings.AppendChild(properties);
foreach (SettingsPropertyValue p in Properties.Settings.Default.PropertyValues)
{
if ((p != null) && (p.Name != null) && (p.PropertyValue != null) && !p.UsingDefaultValue)
{
// Console.WriteLine("Appending " + p.Name + " = " + p.PropertyValue.ToString();
XmlElement setting = doc.CreateElement(string.Empty, "setting", string.Empty);
XmlAttribute name = doc.CreateAttribute(string.Empty, "name", string.Empty);
name.Value = p.Name.ToString();
setting.Attributes.Append(name);
XmlAttribute serializeas = doc.CreateAttribute(string.Empty, "serializeAs", string.Empty);
serializeas.Value = p.Property.SerializeAs.ToString();
setting.Attributes.Append(serializeas);
XmlElement value = doc.CreateElement(string.Empty, "value", string.Empty);
if (p.PropertyValue != null && p.Property.SerializeAs == SettingsSerializeAs.String)
{
XmlText text = doc.CreateTextNode(p.SerializedValue.ToString());
value.AppendChild(text);
}
else
{
if (p.PropertyValue != null && p.Property.SerializeAs == SettingsSerializeAs.Xml)
{
MemoryStream ms = new MemoryStream();
XmlWriter writer = XmlWriter.Create(ms, new XmlWriterSettings
{
NewLineOnAttributes = true,
OmitXmlDeclaration = true
});
XmlSerializer serializer = new XmlSerializer(p.PropertyValue.GetType());
serializer.Serialize(writer, p.PropertyValue);
byte[] text2 = new byte[ms.ToArray().Length - 3];
Array.Copy(ms.ToArray(), 3, text2, 0, text2.Length);
XmlText xml = doc.CreateTextNode(Encoding.UTF8.GetString(text2.ToArray<byte>()));
value.AppendChild(xml);
value.InnerXml = WebUtility.HtmlDecode(value.InnerXml);
}
}
setting.AppendChild(value);
properties.AppendChild(setting);
}
}
usersettings.AppendChild(SerializeSettings(doc, Properties.Settings.Default));
doc.Save(GetUserSettingsPath());
}
catch (Exception ex)
@ -2219,11 +2316,16 @@ namespace AirScout
Log.FlushLog();
}
//save window size, state and location
Properties.Settings.Default.General_WindowLocation = this.Location;
if (this.WindowState == FormWindowState.Normal)
{
Properties.Settings.Default.General_WindowSize = this.Size;
Properties.Settings.Default.General_WindowLocation = this.Location;
}
else
{
Properties.Settings.Default.General_WindowSize = this.RestoreBounds.Size;
Properties.Settings.Default.General_WindowLocation = this.RestoreBounds.Location;
}
Properties.Settings.Default.General_WindowState = this.WindowState;
Say("Waiting for background threads to close...");
// close background threads, save database and settings
@ -2824,16 +2926,23 @@ namespace AirScout
// clear paths cache assuming that new options were set
ElevationPaths.Clear();
PropagationPaths.Clear();
// update station infos
UpdateLocation(Properties.Settings.Default.MyCall,
Properties.Settings.Default.MyLat,
Properties.Settings.Default.MyLon,
MaidenheadLocator.IsPrecise(Properties.Settings.Default.MyLat, Properties.Settings.Default.MyLon, 3) ? GEOSOURCE.FROMUSER : GEOSOURCE.FROMLOC);
UpdateLocation(Properties.Settings.Default.DXCall,
Properties.Settings.Default.DXLat,
Properties.Settings.Default.DXLon,
MaidenheadLocator.IsPrecise(Properties.Settings.Default.DXLat, Properties.Settings.Default.DXLon, 3) ? GEOSOURCE.FROMUSER : GEOSOURCE.FROMLOC);
// check and update station infos
LocationDesignator ld = StationData.Database.LocationFind(Properties.Settings.Default.MyCall, MaidenheadLocator.LocFromLatLon(Properties.Settings.Default.MyLat, Properties.Settings.Default.MyLon, false,3));
if ((ld == null) || (ld.Lat != Properties.Settings.Default.MyLat) || (ld.Lon != Properties.Settings.Default.MyLon))
{
UpdateLocation(Properties.Settings.Default.MyCall,
Properties.Settings.Default.MyLat,
Properties.Settings.Default.MyLon,
MaidenheadLocator.IsPrecise(Properties.Settings.Default.MyLat, Properties.Settings.Default.MyLon, 3) ? GEOSOURCE.FROMUSER : GEOSOURCE.FROMLOC);
}
ld = StationData.Database.LocationFind(Properties.Settings.Default.DXCall, MaidenheadLocator.LocFromLatLon(Properties.Settings.Default.DXLat, Properties.Settings.Default.DXLon, false, 3));
if ((ld == null) || (ld.Lat != Properties.Settings.Default.DXLat) || (ld.Lon != Properties.Settings.Default.DXLon))
{
UpdateLocation(Properties.Settings.Default.DXCall,
Properties.Settings.Default.DXLat,
Properties.Settings.Default.DXLon,
MaidenheadLocator.IsPrecise(Properties.Settings.Default.DXLat, Properties.Settings.Default.DXLon, 3) ? GEOSOURCE.FROMUSER : GEOSOURCE.FROMLOC);
}
// update map provider
gm_Main.MapProvider = GMapProviders.Find(Properties.Settings.Default.Map_Provider);
@ -4014,7 +4123,7 @@ namespace AirScout
int topItemIndex = 0;
try
{
if (PlayMode != AIRSCOUTPLAYMODE.FORWARD)
if ((PlayMode != AIRSCOUTPLAYMODE.FORWARD) && (lv_Control_Watchlist.TopItem != null))
{
topItemIndex = lv_Control_Watchlist.TopItem.Index;
}
@ -4783,6 +4892,8 @@ namespace AirScout
try
{
double potential = double.Parse(e.Item.ToolTipText);
// set default color
bkcolor = Color.White;
if (potential > 0)
bkcolor = Color.Orange;
if (potential > 50)
@ -6999,7 +7110,7 @@ namespace AirScout
string msg = (string)e.UserState;
// redirect output to splash screen on first run
if (FirstRun && SplashDlg != null)
SplashDlg.Status("Preparing database for first run: " + msg + " (please wait)", Color.Yellow);
Splash("Preparing database for first run: " + msg + " (please wait)", Color.Yellow);
else
{
SayDatabase(msg);
@ -7082,7 +7193,7 @@ namespace AirScout
Log.WriteMessage(msg);
// redirect output to splash screen on first run
if (FirstRun && SplashDlg != null)
SplashDlg.Status("Preparing database for first run: " + msg + " (please wait)", Color.Yellow);
Splash("Preparing database for first run: " + msg + " (please wait)", Color.Yellow);
else
{
SayDatabase(msg);
@ -7113,7 +7224,6 @@ namespace AirScout
if (!this.IsDisposed)
{
UpdateAirports();
// gm_Main.Refresh();
}
}
@ -7138,7 +7248,7 @@ namespace AirScout
Log.WriteMessage(msg);
// redirect output to splash screen on first run
if (FirstRun && SplashDlg != null)
SplashDlg.Status("Preparing database for first run: " + msg + " (please wait)", Color.Yellow);
Splash("Preparing database for first run: " + msg + " (please wait)", Color.Yellow);
else
{
SayDatabase(msg);
@ -7198,7 +7308,7 @@ namespace AirScout
Log.WriteMessage(msg);
// redirect output to splash screen on first run
if (FirstRun && SplashDlg != null)
SplashDlg.Status("Preparing database for first run: " + msg + " (please wait)", Color.Yellow);
Splash("Preparing database for first run: " + msg + " (please wait)", Color.Yellow);
else
{
SayDatabase(msg);
@ -7217,6 +7327,25 @@ namespace AirScout
{
}
#endregion
#region MapPreloader
private void bw_MapPreloader_ProgressChanged(object sender, ProgressChangedEventArgs e)
{
if (e.ProgressPercentage == 0)
SayCalculations((string)e.UserState);
else
{
PointLatLng p = (PointLatLng)e.UserState;
SayCalculations("Preloading map tile: " + MaidenheadLocator.LocFromLatLon(p.Lat, p.Lng, false, 2) + ", level " + e.ProgressPercentage);
gm_Cache.Zoom = e.ProgressPercentage;
gm_Cache.Position = p;
gm_Cache.ReloadMap();
}
}
#endregion
#endregion
@ -7596,8 +7725,6 @@ namespace AirScout
bw_AirportMapper.ReportProgress(0, "Getting airports from database...");
Stopwatch st = new Stopwatch();
st.Start();
// clear aiports overlay
bw_AirportMapper.ReportProgress(0, null);
// fill the airports layer of maps
// return if switched off
if (!Properties.Settings.Default.Airports_Activate)
@ -7612,18 +7739,13 @@ namespace AirScout
private void bw_AirportMapper_ProgressChanged(object sender, ProgressChangedEventArgs e)
{
if (e.ProgressPercentage < 0)
if (e.ProgressPercentage == 0)
{
// log error message
string msg = (string)e.UserState;
Say(msg);
Log.WriteMessage(msg, LogLevel.Error);
}
else if (e.ProgressPercentage == 0)
{
// clear airports overlay
gmo_Airports.Clear();
}
else if (e.ProgressPercentage == 100)
{
// add aiports to overlay

Wyświetl plik

@ -125,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACc
DQAAAk1TRnQBSQFMAgEBAwEAAXABCwFwAQsBIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
DQAAAk1TRnQBSQFMAgEBAwEAAYgBCwGIAQsBIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABgAMAASADAAEBAQABCAYAARAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
@ -340,7 +340,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACM
DAAAAk1TRnQBSQFMAwEBAAHYAQkB2AEJASABAAEgAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA
DAAAAk1TRnQBSQFMAwEBAAHwAQkB8AEJASABAAEgAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA
AYADAAEgAwABAQEAAQgGAAEQGAABgAIAAYADAAKAAQABgAMAAYABAAGAAQACgAIAA8ABAAHAAdwBwAEA
AfABygGmAQABMwUAATMBAAEzAQABMwEAAjMCAAMWAQADHAEAAyIBAAMpAQADVQEAA00BAANCAQADOQEA
AYABfAH/AQACUAH/AQABkwEAAdYBAAH/AewBzAEAAcYB1gHvAQAB1gLnAQABkAGpAa0CAAH/ATMDAAFm

Wyświetl plik

@ -0,0 +1,270 @@
using ScoutBase.Core;
using ScoutBase.Elevation;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;
using GMap.NET;
using GMap.NET.WindowsForms;
using GMap.NET.MapProviders;
using System.Data.SQLite;
using System.IO;
using System.Data;
using ScoutBase.Maps;
using System.Net;
namespace AirScout
{
public partial class MapDlg : Form
{
#region MapPreloader
class MapPreloaderTile
{
public int X;
public int Y;
public int Z;
public int Type;
public MapPreloaderTile(int x, int y, int z, int type)
{
X = x;
Y = y;
Z = z;
Type = type;
}
}
// Background worker for preloading of map tiles
[DefaultPropertyAttribute("Name")]
public class MapPreloader : BackgroundWorker
{
string Name = "MapPreloader";
ELEVATIONMODEL Model = ELEVATIONMODEL.NONE;
GMapControl gm_Map = new GMapControl();
System.Data.SQLite.SQLiteDatabase db;
public MapPreloader()
{
this.WorkerReportsProgress = true;
this.WorkerSupportsCancellation = true;
}
int long2tilex(double lon, int z)
{
return (int)(Math.Floor((lon + 180.0) / 360.0 * (1 << z)));
}
int lat2tiley(double lat, int z)
{
return (int)Math.Floor((1 - Math.Log(Math.Tan((lat / 180.0 * Math.PI)) + 1 / Math.Cos((lat / 180.0 * Math.PI))) / Math.PI) / 2 * (1 << z));
}
double tilex2long(int x, int z)
{
return x / (double)(1 << z) * 360.0 - 180;
}
double tiley2lat(int y, int z)
{
double n = Math.PI - 2.0 * Math.PI * y / (double)(1 << z);
return 180.0 / Math.PI * Math.Atan(0.5 * (Math.Exp(n) - Math.Exp(-n)));
}
private bool LoadOSM (int x, int y , int zoom)
{
bool b = false;
string url = ScoutBase.Maps.Properties.Settings.Default.Database_UpdateURL + zoom.ToString() + "/" + x.ToString() + "/" + y.ToString() + ".png";
string filename = Path.Combine(Path.GetTempPath(), y.ToString() + ".png");
try
{
WebClient cl = new WebClient();
cl.DownloadFile(url, filename);
using (BinaryReader br = new BinaryReader(File.OpenRead(filename)))
{
byte[] buf = br.ReadBytes((int)br.BaseStream.Length);
// int id = MapData.Database.TileInsert(x, y, zoom, gm_Map.MapProvider.DbId, File.GetLastWriteTime(filename), buf);
int dbid = GMapProviders.OpenStreetMap.DbId;
GMaps.Instance.EnqueueCacheTask(new GMap.NET.Internals.CacheQueueItem(new GMap.NET.Internals.RawTile(dbid, new GPoint(x, y), zoom), buf,GMap.NET.Internals.CacheUsage.First));
}
File.Delete(filename);
return true;
}
catch (Exception ex)
{
Console.WriteLine(this.Name + ": " + ex.ToString());
}
return b;
}
protected override void OnDoWork(DoWorkEventArgs e)
{
BACKGROUNDUPDATERSTARTOPTIONS Options = (BACKGROUNDUPDATERSTARTOPTIONS)e.Argument;
// name the thread for debugging
if (String.IsNullOrEmpty(Thread.CurrentThread.Name))
Thread.CurrentThread.Name = this.Name + "_" + this.GetType().Name;
this.ReportProgress(0, this.Name + " started.");
Log.WriteMessage(this.Name + " started.");
// get update interval
int interval = (int)Properties.Settings.Default.Background_Update_Period * 60;
// get mpst simple elevation model
if (Properties.Settings.Default.Elevation_GLOBE_Enabled)
Model = ELEVATIONMODEL.GLOBE;
else if (Properties.Settings.Default.Elevation_SRTM3_Enabled)
Model = ELEVATIONMODEL.SRTM3;
else if (Properties.Settings.Default.Elevation_SRTM1_Enabled)
Model = ELEVATIONMODEL.SRTM1;
// return if no elevation model selected
if (Model == ELEVATIONMODEL.NONE)
return;
// setting User Agent to fix Open Street Map issue 2016-09-20
GMap.NET.MapProviders.GMapProvider.UserAgent = "AirScout";
// clearing referrer URL issue 2019-12-14
gm_Map.MapProvider.RefererUrl = "";
// set initial settings for main map
gm_Map.MapProvider = GMapProviders.Find(Properties.Settings.Default.Map_Provider);
gm_Map.MinZoom = 0;
gm_Map.MaxZoom = 20;
// get database filename
int i = 0;
int count = 0;
int total = 0;
do
{
i = 0;
count = 0;
total = 0;
// checks if elevation database is complete
try
{
this.ReportProgress(0, this.Name + " getting tiles from database.");
int zmin = 5;
int zmax = 11;
List<MapPreloaderTile> l = new List<MapPreloaderTile>();
for (int z = zmin; z <= zmax; z++)
{
int xmin = long2tilex(Properties.Settings.Default.MinLon, z);
int xmax = long2tilex(Properties.Settings.Default.MaxLon, z);
int ymin = lat2tiley(Properties.Settings.Default.MaxLat, z);
int ymax = lat2tiley(Properties.Settings.Default.MinLat, z);
for (int x = xmin; x <= xmax; x++)
{
for (int y = ymin; y <= ymax; y++)
{
// check if tile already in database --> add it to list to get it from the web
if (!MapData.Database.TileExists(x, y, z, gm_Map.MapProvider.DbId))
{
MapPreloaderTile t = new MapPreloaderTile(x, y, z, gm_Map.MapProvider.DbId);
l.Add(t);
}
total++;
if (this.CancellationPending)
break;
}
if (this.CancellationPending)
break;
}
if (this.CancellationPending)
break;
}
if (this.CancellationPending)
break;
count = l.Count();
Random rng = new Random();
// shuffle the list
int n = l.Count;
while (n > 1)
{
n--;
int k = rng.Next(n + 1);
MapPreloaderTile value = l[k];
l[k] = l[n];
l[n] = value;
}
n = 0;
foreach (MapPreloaderTile t in l)
{
Exception ex = null;
this.ReportProgress(0, "Preloading " + "/" + t.Z.ToString() + "/" + t.X.ToString() + "/" + t.Y.ToString() + ".png");
try
{
// try to donwload from www.airscout.eu first
if (gm_Map.MapProvider.GetType() == typeof(OpenStreetMapProvider))
{
LoadOSM(t.X, t.Y, t.Z);
}
else
{
PureImage img = gm_Map.Manager.GetImageFrom(gm_Map.MapProvider, new GPoint(t.X, t.Y), t.Z, out ex);
// wait until cache is written to database
}
if (ex == null)
Console.WriteLine("Preload tile [" + i.ToString() + " of " + count.ToString() + "] x=" + t.X + ", y=" + t.Y + ", z=" + t.Z + ": OK");
else
Console.WriteLine("Preload tile [" + i.ToString() + " of " + count.ToString() + "] x=" + t.X + ", y=" + t.Y + ", z=" + t.Z + ": " + ex.ToString());
}
catch (Exception e1)
{
Console.WriteLine(this.Name + ": " + e1.ToString());
}
Thread.Sleep(100);
i++;
n++;
if (n > 100)
{
while (GMaps.Instance.tileCacheQueue.Count > 0)
{
Application.DoEvents();
if (this.CancellationPending)
break;
}
n = 0;
}
if (this.CancellationPending)
break;
}
if (this.CancellationPending)
break;
}
catch (Exception ex)
{
this.ReportProgress(-1, ex.ToString());
}
// sleep when running periodically
if (Options == BACKGROUNDUPDATERSTARTOPTIONS.RUNPERIODICALLY)
{
int l = 0;
while (!this.CancellationPending && (l < interval))
{
Thread.Sleep(1000);
l++;
}
}
if (this.CancellationPending)
break;
}
while (Options == BACKGROUNDUPDATERSTARTOPTIONS.RUNPERIODICALLY);
if (this.CancellationPending)
{
this.ReportProgress(0, Name + " cancelled.");
Log.WriteMessage(Name + " cancelled.");
}
else
{
this.ReportProgress(0, Name + " finished, total " + total.ToString() + " tile(s), " + (count-i).ToString() + " left.");
Log.WriteMessage(Name + " finished, total " + total.ToString() + " tile(s), " + (count - i).ToString() + " left.");
}
}
}
#endregion
}
}

Plik diff jest za duży Load Diff

Wyświetl plik

@ -26,6 +26,7 @@ using ScoutBase.Core;
using ScoutBase.Stations;
using ScoutBase.Elevation;
using ScoutBase.Propagation;
using ScoutBase.Maps;
using ScoutBase;
using Newtonsoft.Json;
using static ScoutBase.Core.ZIP;
@ -233,46 +234,6 @@ namespace AirScout
gm_Options_Coverage.SetZoomToFitRect(RectLatLng.FromLTRB(tb_Coverage_MinLon.Value - 1, tb_Coverage_MaxLat.Value + 1, tb_Coverage_MaxLon.Value + 1, tb_Coverage_MinLat.Value - 1));
}
private void btn_Options_Watchlist_Manage_Click(object sender, EventArgs e)
{
// sync watchlist, try to keep previously checked calls
// you can have a call only once in the watch list
List<string> checkedcalls = new List<string>();
foreach (WatchlistItem item in Properties.Settings.Default.Watchlist)
{
if (item.Checked)
checkedcalls.Add(item.Call);
}
WatchlistDlg Dlg = new WatchlistDlg();
if (Dlg.ShowDialog() == DialogResult.OK)
{
// clear watch list
Properties.Settings.Default.Watchlist.Clear();
foreach (DataGridViewRow row in Dlg.dgv_Watchlist_Selected.Rows)
{
string call = row.Cells[0].Value.ToString();
string loc = row.Cells[1].Value.ToString();
bool oor = true;
// try to get the location from database
LocationDesignator dxloc = StationData.Database.LocationFind(call, loc);
if (dxloc != null)
{
oor = LatLon.Distance(Properties.Settings.Default.MyLat, Properties.Settings.Default.MyLon, dxloc.Lat, dxloc.Lon) > Properties.Settings.Default.Path_MaxLength;
}
// add call to watch list
WatchlistItem item = new WatchlistItem(call, loc, oor);
Properties.Settings.Default.Watchlist.Add(item);
}
// reselect previously selected
foreach (string checkedcall in checkedcalls)
{
int index = Properties.Settings.Default.Watchlist.IndexOf(checkedcall);
if (index >= 0)
Properties.Settings.Default.Watchlist[index].Checked = true;
}
}
}
#endregion
#region tab_Options_Database
@ -295,22 +256,33 @@ namespace AirScout
private void tab_Options_Database_Enter(object sender, EventArgs e)
{
tb_Options_ScoutBase_Database_FileName.Text = GetDatabaseDir(StationData.Database.GetDBLocation());
lbl_Options_ScoutBase_Database_FileName.Text = GetDatabaseDir(StationData.Database.GetDBLocation());
tb_Options_ScoutBase_Database_FileSize.Text = StationData.Database.GetDBSize().ToString("F0");
tb_Options_AirScout_Database_FileName.Text = GetDatabaseDir(AircraftData.Database.GetDBLocation());
lbl_Options_AirScout_Database_FileName.Text = GetDatabaseDir(AircraftData.Database.GetDBLocation());
tb_Options_AirScout_Database_FileSize.Text = AircraftData.Database.GetDBSize().ToString("F0");
tb_Options_Propagation_GLOBE_Database_FileName.Text = GetDatabaseDir(PropagationData.Database.GetDBLocation(ELEVATIONMODEL.GLOBE));
lbl_Options_Propagation_GLOBE_Database_FileName.Text = GetDatabaseDir(PropagationData.Database.GetDBLocation(ELEVATIONMODEL.GLOBE));
tb_Options_Propagation_GLOBE_Database_FileSize.Text = PropagationData.Database.GetDBSize(ELEVATIONMODEL.GLOBE).ToString("F0");
tb_Options_Propagation_SRTM3_Database_FileName.Text = GetDatabaseDir(PropagationData.Database.GetDBLocation(ELEVATIONMODEL.SRTM3));
lbl_Options_Propagation_SRTM3_Database_FileName.Text = GetDatabaseDir(PropagationData.Database.GetDBLocation(ELEVATIONMODEL.SRTM3));
tb_Options_Propagation_SRTM3_Database_FileSize.Text = PropagationData.Database.GetDBSize(ELEVATIONMODEL.SRTM3).ToString("F0");
tb_Options_Propagation_SRTM1_Database_FileName.Text = GetDatabaseDir(PropagationData.Database.GetDBLocation(ELEVATIONMODEL.SRTM1));
lbl_Options_Propagation_SRTM1_Database_FileName.Text = GetDatabaseDir(PropagationData.Database.GetDBLocation(ELEVATIONMODEL.SRTM1));
tb_Options_Propagation_SRTM1_Database_FileSize.Text = PropagationData.Database.GetDBSize(ELEVATIONMODEL.SRTM1).ToString("F0");
tb_Options_Elevation_GLOBE_Database_FileName.Text = GetDatabaseDir(ElevationData.Database.GetDBLocation(ELEVATIONMODEL.GLOBE));
lbl_Options_Elevation_GLOBE_Database_FileName.Text = GetDatabaseDir(ElevationData.Database.GetDBLocation(ELEVATIONMODEL.GLOBE));
tb_Options_Elevation_GLOBE_Database_FileSize.Text = ElevationData.Database.GetDBSize(ELEVATIONMODEL.GLOBE).ToString("F0");
tb_Options_Elevation_SRTM3_Database_FileName.Text = GetDatabaseDir(ElevationData.Database.GetDBLocation(ELEVATIONMODEL.SRTM3));
lbl_Options_Elevation_SRTM3_Database_FileName.Text = GetDatabaseDir(ElevationData.Database.GetDBLocation(ELEVATIONMODEL.SRTM3));
tb_Options_Elevation_SRTM3_Database_FileSize.Text = ElevationData.Database.GetDBSize(ELEVATIONMODEL.SRTM3).ToString("F0");
tb_Options_Elevation_SRTM1_Database_FileName.Text = GetDatabaseDir(ElevationData.Database.GetDBLocation(ELEVATIONMODEL.SRTM1));
lbl_Options_Elevation_SRTM1_Database_FileName.Text = GetDatabaseDir(ElevationData.Database.GetDBLocation(ELEVATIONMODEL.SRTM1));
tb_Options_Elevation_SRTM1_Database_FileSize.Text = ElevationData.Database.GetDBSize(ELEVATIONMODEL.SRTM1).ToString("F0");
lbl_Options_Map_Database_FileName.Text = GetDatabaseDir(MapData.Database.GetDBLocation());
tb_Options_Map_Database_FileSize.Text = MapData.Database.GetDBSize().ToString("F0");
tt_Options.SetToolTip(lbl_Options_ScoutBase_Database_FileName, StationData.Database.GetDBLocation() + "\n\n" + "Click here to open database location in Explorer window.");
tt_Options.SetToolTip(lbl_Options_AirScout_Database_FileName, AircraftData.Database.GetDBLocation() + "\n\n" + "Click here to open database location in Explorer window.");
tt_Options.SetToolTip(lbl_Options_Propagation_GLOBE_Database_FileName, PropagationData.Database.GetDBLocation(ELEVATIONMODEL.GLOBE) + "\n\n" + "Click here to open database location in Explorer window.");
tt_Options.SetToolTip(lbl_Options_Propagation_SRTM3_Database_FileName, PropagationData.Database.GetDBLocation(ELEVATIONMODEL.SRTM3) + "\n\n" + "Click here to open database location in Explorer window.");
tt_Options.SetToolTip(lbl_Options_Propagation_SRTM1_Database_FileName, PropagationData.Database.GetDBLocation(ELEVATIONMODEL.SRTM1) + "\n\n" + "Click here to open database location in Explorer window.");
tt_Options.SetToolTip(lbl_Options_Elevation_GLOBE_Database_FileName, ElevationData.Database.GetDBLocation(ELEVATIONMODEL.GLOBE) + "\n\n" + "Click here to open database location in Explorer window.");
tt_Options.SetToolTip(lbl_Options_Elevation_SRTM3_Database_FileName, ElevationData.Database.GetDBLocation(ELEVATIONMODEL.SRTM3) + "\n\n" + "Click here to open database location in Explorer window.");
tt_Options.SetToolTip(lbl_Options_Elevation_SRTM1_Database_FileName, ElevationData.Database.GetDBLocation(ELEVATIONMODEL.SRTM1) + "\n\n" + "Click here to open database location in Explorer window.");
tt_Options.SetToolTip(lbl_Options_Map_Database_FileName, MapData.Database.GetDBLocation() + "\n\n" + "Click here to open database location in Explorer window.");
double total = StationData.Database.GetDBSize() +
AircraftData.Database.GetDBSize() +
PropagationData.Database.GetDBSize(ELEVATIONMODEL.GLOBE) +
@ -318,7 +290,8 @@ namespace AirScout
PropagationData.Database.GetDBSize(ELEVATIONMODEL.SRTM1) +
ElevationData.Database.GetDBSize(ELEVATIONMODEL.GLOBE) +
ElevationData.Database.GetDBSize(ELEVATIONMODEL.SRTM3) +
ElevationData.Database.GetDBSize(ELEVATIONMODEL.SRTM1);
ElevationData.Database.GetDBSize(ELEVATIONMODEL.SRTM1) +
MapData.Database.GetDBSize();
lbl_Options_Database_TotalSize.Text = total.ToString("F0");
rb_Options_Database_Update_Never.Checked = !Properties.Settings.Default.Background_Update_OnStartup && !Properties.Settings.Default.Background_Update_Periodically;
rb_Options_Database_Update_OnStartup.Checked = Properties.Settings.Default.Background_Update_OnStartup;
@ -361,21 +334,6 @@ namespace AirScout
Properties.Settings.Default.Background_Update_Periodically = false;
}
private void btn_Open_LogDirectory_Click(object sender, EventArgs e)
{
Process.Start(ParentDlg.LogDirectory);
}
private void btn_Open_TmpDirectory_Click(object sender, EventArgs e)
{
Process.Start(ParentDlg.TmpDirectory);
}
private void cb_Options_Watchlist_SyncWithKST_CheckedChanged(object sender, EventArgs e)
{
btn_Options_Watchlist_Manage.Enabled = !cb_Options_Watchlist_SyncWithKST.Checked;
}
private void btn_Options_DeleteAllElevationPaths_Click(object sender, EventArgs e)
{
if (MessageBox.Show("Are you sure to delete all precalculated elevation paths from database?", "Delete all elevation paths", MessageBoxButtons.YesNo) == DialogResult.Yes)
@ -396,6 +354,11 @@ namespace AirScout
}
}
private void btn_DeleteAllMapTiles_Click(object sender, EventArgs e)
{
MapData.Database.TileDeleteAll();
}
private void btn_Options_ScoutBase_Database_Maintenance_Click(object sender, EventArgs e)
{
DatabaseMaintenanceDlg Dlg = new DatabaseMaintenanceDlg(StationData.Database);
@ -444,6 +407,51 @@ namespace AirScout
Dlg.ShowDialog();
}
private void lbl_Options_ScoutBase_Database_FileName_Click(object sender, EventArgs e)
{
Process.Start(Path.GetDirectoryName(StationData.Database.GetDBLocation()));
}
private void lbl_Options_AirScout_Database_FileName_Click(object sender, EventArgs e)
{
Process.Start(Path.GetDirectoryName(AircraftData.Database.GetDBLocation()));
}
private void lbl_Options_Propagation_GLOBE_Database_FileName_Click(object sender, EventArgs e)
{
Process.Start(Path.GetDirectoryName(PropagationData.Database.GetDBLocation(ELEVATIONMODEL.GLOBE)));
}
private void lbl_Options_Propagation_SRTM3_Database_FileName_Click(object sender, EventArgs e)
{
Process.Start(Path.GetDirectoryName(PropagationData.Database.GetDBLocation(ELEVATIONMODEL.SRTM3)));
}
private void lbl_Options_Propagation_SRTM1_Database_FileName_Click(object sender, EventArgs e)
{
Process.Start(Path.GetDirectoryName(PropagationData.Database.GetDBLocation(ELEVATIONMODEL.SRTM1)));
}
private void lbl_Options_Elevation_GLOBE_Database_FileName_Click(object sender, EventArgs e)
{
Process.Start(Path.GetDirectoryName(ElevationData.Database.GetDBLocation(ELEVATIONMODEL.GLOBE)));
}
private void lbl_Options_Elevation_SRTM3_Database_FileName_Click(object sender, EventArgs e)
{
Process.Start(Path.GetDirectoryName(ElevationData.Database.GetDBLocation(ELEVATIONMODEL.SRTM3)));
}
private void lbl_Options_Elevation_SRTM1_Database_FileName_Click(object sender, EventArgs e)
{
Process.Start(Path.GetDirectoryName(ElevationData.Database.GetDBLocation(ELEVATIONMODEL.SRTM1)));
}
private void lbl_Options_Map_Database_FileName_Click(object sender, EventArgs e)
{
Process.Start(Path.GetDirectoryName(MapData.Database.GetDBLocation()));
}
#endregion
#region tab_Options_Stations
@ -2156,6 +2164,92 @@ namespace AirScout
}
#endregion
#region tab_Options_Watchlist
private void tab_Options_Watchlist_Enter(object sender, EventArgs e)
{
}
private void cb_Options_Watchlist_SyncWithKST_CheckedChanged(object sender, EventArgs e)
{
// disable manage buttons when synced with KST
btn_Options_Watchlist_Manage.Enabled = !cb_Options_Watchlist_SyncWithKST.Checked;
btn_Options_Watchlist_Clear.Enabled = !cb_Options_Watchlist_SyncWithKST.Checked;
}
private void btn_Options_Watchlist_Manage_Click(object sender, EventArgs e)
{
// sync watchlist, try to keep previously checked calls
// you can have a call only once in the watch list
List<string> checkedcalls = new List<string>();
foreach (WatchlistItem item in Properties.Settings.Default.Watchlist)
{
if (item.Checked)
checkedcalls.Add(item.Call);
}
WatchlistDlg Dlg = new WatchlistDlg();
if (Dlg.ShowDialog() == DialogResult.OK)
{
// clear watch list
Properties.Settings.Default.Watchlist.Clear();
foreach (DataGridViewRow row in Dlg.dgv_Watchlist_Selected.Rows)
{
string call = row.Cells[0].Value.ToString();
string loc = row.Cells[1].Value.ToString();
bool oor = true;
// try to get the location from database
LocationDesignator dxloc = StationData.Database.LocationFind(call, loc);
if (dxloc != null)
{
oor = LatLon.Distance(Properties.Settings.Default.MyLat, Properties.Settings.Default.MyLon, dxloc.Lat, dxloc.Lon) > Properties.Settings.Default.Path_MaxLength;
}
// add call to watch list
WatchlistItem item = new WatchlistItem(call, loc, oor);
Properties.Settings.Default.Watchlist.Add(item);
}
// reselect previously selected
foreach (string checkedcall in checkedcalls)
{
int index = Properties.Settings.Default.Watchlist.IndexOf(checkedcall);
if (index >= 0)
Properties.Settings.Default.Watchlist[index].Checked = true;
}
}
}
private void btn_Options_Watchlist_Clear_Click(object sender, EventArgs e)
{
Properties.Settings.Default.Watchlist.Clear();
}
#endregion
#region tab_Options_Misc
private void btn_Options_Open_AirScoutDirectory_Click(object sender, EventArgs e)
{
Process.Start(ParentDlg.AppDirectory);
}
private void btn_Options_Open_LogDirectory_Click(object sender, EventArgs e)
{
Process.Start(ParentDlg.LogDirectory);
}
private void btn_Options_Open_TmpDirectory_Click(object sender, EventArgs e)
{
Process.Start(ParentDlg.TmpDirectory);
}
private void btn_Options_Open_PluginDirectory_Click(object sender, EventArgs e)
{
Process.Start(ParentDlg.PluginDirectory);
}
private void pb_Donate_Click(object sender, EventArgs e)
{
try
@ -2165,12 +2259,10 @@ namespace AirScout
catch
{
}
}
#endregion
private void OptionsDlg_FormClosing(object sender, FormClosingEventArgs e)
{
bw_GLOBE_MapUpdater.CancelAsync();

Wyświetl plik

@ -117,9 +117,61 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<metadata name="tt_Options.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="label61.Text" xml:space="preserve">
<value>You can select different map provider from the list below. Depending on your selection some maps may not be available for your choosen area. Please note that the selection of maps is taken from Great Maps regardless of their legal status. Some of them might be copyrighted or otherwise restricted in use. You were asked to agree with the terms of use first.
Open Street Map is recommended as a default.</value>
</data>
<data name="label52.Text" xml:space="preserve">
<value>Information from callsign database and other sources are used to prefill fields. You can overwrite and complete entries here. Your local database is updated. If you want to share the information with the AirScout community please use the "Send Update!" buttons.</value>
</data>
<data name="label86.Text" xml:space="preserve">
<value>CAUTION: Running a web service is a potential security hole! You should activate this function only inside a private network.
Depending on your user profile you will prompted several times by the Operating System on first run. Please accept all security queries with "Yes" or "Accept".
Otherwise the web service will not run properly.</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>AirScout can work as a server in a network.
UDP Server:
You can ask for a path calculation between two stations and AirScout will return the planes near path and their portential for a reflection.
HTTP Server:
You can ask for latest plane positions via simple http-request (e.g. from a web browser. The result is delivered as a JSON file which can used to run own services and calculations.
See documentation for further details.</value>
</data>
<data name="label65.Text" xml:space="preserve">
<value>AirScout can get FFT data from Spectrum Lab software via Network. You must have Spectrum Lab software installed with default settings. Do not forget to activate http - server functionaltiy in Spectrum Lab.</value>
</data>
<data name="label37.Text" xml:space="preserve">
<value>Watchlist allows you to pick a number of stations out of your database.
This is very helpful especially when working in Multi-Path Mode.
All stations on watchlist can be shown on map with small markers and callsign labels for quick showing/hiding path to them.
If a station is selected from watchlist by checking the assigned checkbox, path is shown on map and entry is coloured according to aircraft scatter potential.
Watchlist can be synchronized with ON4KST chat user list instead of a local managed list to show all stations currently logged in in chat (Needs wtKST software and network functions enabbled).</value>
</data>
<metadata name="bw_SRTM3_MapUpdater.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>130, 17</value>
</metadata>
<metadata name="ss_Options.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>353, 17</value>
</metadata>
<metadata name="bw_SRTM1_MapUpdater.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>483, 17</value>
</metadata>
<metadata name="bw_GLOBE_MapUpdater.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>706, 17</value>
</metadata>
<metadata name="bw_StationDataUpdater.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>890, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="pb_Donate.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
@ -239,46 +291,4 @@
bOQwu7KRw+zKRg6zKxs5zK5s5DC7spHD7MpGDrMrGznMrkwUwn8BkAmqaXV391cAAAAASUVORK5CYII=
</value>
</data>
<data name="label61.Text" xml:space="preserve">
<value>You can select different map provider from the list below. Depending on your selection some maps may not be available for your choosen area. Please note that the selection of maps is taken from Great Maps regardless of their legal status. Some of them might be copyrighted or otherwise restricted in use. You were asked to agree with the terms of use first.
Open Street Map is recommended as a default.</value>
</data>
<data name="label52.Text" xml:space="preserve">
<value>Information from callsign database and other sources are used to prefill fields. You can overwrite and complete entries here. Your local database is updated. If you want to share the information with the AirScout community please use the "Send Update!" buttons.</value>
</data>
<data name="label86.Text" xml:space="preserve">
<value>CAUTION: Running a web service is a potential security hole! You should activate this function only inside a private network.
Depending on your user profile you will prompted several times by the Operating System on first run. Please accept all security queries with "Yes" or "Accept".
Otherwise the web service will not run properly.</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>AirScout can work as a server in a network.
UDP Server:
You can ask for a path calculation between two stations and AirScout will return the planes near path and their portential for a reflection.
HTTP Server:
You can ask for latest plane positions via simple http-request (e.g. from a web browser. The result is delivered as a JSON file which can used to run own services and calculations.
See documentation for further details.</value>
</data>
<data name="label65.Text" xml:space="preserve">
<value>AirScout can get FFT data from Spectrum Lab software via Network. You must have Spectrum Lab software installed with default settings. Do not forget to activate http - server functionaltiy in Spectrum Lab.</value>
</data>
<metadata name="bw_SRTM3_MapUpdater.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>130, 17</value>
</metadata>
<metadata name="ss_Options.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>353, 17</value>
</metadata>
<metadata name="bw_SRTM1_MapUpdater.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>483, 17</value>
</metadata>
<metadata name="bw_GLOBE_MapUpdater.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>706, 17</value>
</metadata>
<metadata name="bw_StationDataUpdater.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>890, 17</value>
</metadata>
</root>

Wyświetl plik

@ -45,6 +45,44 @@ namespace AirScout
this.Model = model;
}
private DateTime GetDatabaseTimeStamp()
{
string filename = StationData.Database.GetDBLocation();
DateTime dt = File.GetLastWriteTimeUtc(filename).ToUniversalTime();
// convert to YYYY:MM:DD hh:mm:ss only as this is stored in settings
dt = new DateTime(dt.Year, dt.Month, dt.Day, dt.Hour, dt.Minute, dt.Second, DateTimeKind.Utc);
return dt;
}
private DateTime GetSavedDatabaseTimeStamp()
{
DateTime dt = DateTime.MinValue;
dt = Properties.Settings.Default.StationsDatabase_TimeStamp;
// change kind to UTC as it is not specified in settings
dt = DateTime.SpecifyKind(dt, DateTimeKind.Utc);
return dt;
}
private void SaveDatabaseTimeStamp()
{
Properties.Settings.Default.StationsDatabase_TimeStamp = GetDatabaseTimeStamp();
}
private bool HasDatabaseChanged()
{
try
{
DateTime dt1 = GetSavedDatabaseTimeStamp();
DateTime dt2 = GetDatabaseTimeStamp();
return dt1 != dt2;
}
catch
{
// do nothing
}
return true;
}
protected override void OnDoWork(DoWorkEventArgs e)
{
// get all parameters
@ -75,23 +113,27 @@ namespace AirScout
// name the thread for debugging
if (String.IsNullOrEmpty(Thread.CurrentThread.Name))
Thread.CurrentThread.Name = Name + "_" + this.GetType().Name;
this.ReportProgress(0, Name + " started.");
try
{
// iterate through all locations in the database and calculate the propagation path
// chek if database is ready first
while (ElevationData.Database.GetDBStatusBit(Model, DATABASESTATUS.ERROR) || (!ElevationData.Database.GetDBStatusBit(Model, DATABASESTATUS.COMPLETE) && !ElevationData.Database.GetDBStatusBit(Model, DATABASESTATUS.UPTODATE)))
// chek if databases are ready and changes reported first
while (!ElevationData.Database.GetDBStatusBit(Model, DATABASESTATUS.UPTODATE) || !StationData.Database.GetDBStatusBit(DATABASESTATUS.UPTODATE) || !HasDatabaseChanged())
{
this.ReportProgress(0, Name + " waiting for database is complete...");
// sleep 10 sec
int i = 0;
while (!this.CancellationPending && (i < 10))
{
Thread.Sleep(1000);
i++;
if (this.CancellationPending)
break;
}
if (this.CancellationPending)
break;
}
if (this.CancellationPending)
break;
this.ReportProgress(0, Name + " getting locations...");
// get all locations in covered area but don't report progress
this.WorkerReportsProgress = false;
@ -103,6 +145,7 @@ namespace AirScout
// iterate through locations
QRVDesignator myqrv = null;
QRVDesignator dxqrv = null;
this.ReportProgress(0, Name + " checking locations...");
foreach (LocationDesignator ld in lds)
{
Stopwatch st = new Stopwatch();
@ -212,6 +255,8 @@ namespace AirScout
if (this.CancellationPending)
break;
}
if (this.CancellationPending)
break;
}
catch (Exception ex)
{
@ -220,6 +265,8 @@ namespace AirScout
// keep cpu load low --> TODO: find better solution here
Thread.Sleep(10);
}
// save station database timestamp
SaveDatabaseTimeStamp();
// wait to keep cpu load low
Thread.Sleep(Properties.Settings.Default.Background_Calculations_ThreadWait);
this.ReportProgress(0, Name + " finished.");
@ -248,7 +295,7 @@ namespace AirScout
}
else
{
this.ReportProgress(0, Name + "finished.");
this.ReportProgress(0, Name + " finished.");
Log.WriteMessage(Name + " finished.");
}
}

Wyświetl plik

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.3.2.0")]
[assembly: AssemblyFileVersion("1.3.2.0")]
[assembly: AssemblyVersion("1.3.3.0")]
[assembly: AssemblyFileVersion("1.3.3.0")]

Wyświetl plik

@ -19,7 +19,7 @@ namespace AirScout.Properties {
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
@ -60,6 +60,36 @@ namespace AirScout.Properties {
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap AirScout_Marker {
get {
object obj = ResourceManager.GetObject("AirScout_Marker", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap AirScout_Multi {
get {
object obj = ResourceManager.GetObject("AirScout_Multi", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap AirScout_Watchlist {
get {
object obj = ResourceManager.GetObject("AirScout_Watchlist", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>
@ -99,5 +129,15 @@ namespace AirScout.Properties {
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Settings {
get {
object obj = ResourceManager.GetObject("Settings", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

Wyświetl plik

@ -130,4 +130,16 @@
<data name="Map2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Icons\Map2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="AirScout_Marker" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AirScout_Marker.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="AirScout_Multi" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AirScout_Multi.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="AirScout_Watchlist" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AirScout_Watchlist.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Settings" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Settings.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

Wyświetl plik

@ -12,7 +12,7 @@ namespace AirScout.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.5.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@ -1984,12 +1984,12 @@ Digital data base on the World Wide Web (URL: http://www.ngdc.noaa.gov/mgg/topo/
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("10")]
public decimal Analysis_CrossingHistory_AmbiguousGap {
public decimal Analysis_CrossingHistory_AmbigousGap {
get {
return ((decimal)(this["Analysis_CrossingHistory_AmbiguousGap"]));
return ((decimal)(this["Analysis_CrossingHistory_AmbigousGap"]));
}
set {
this["Analysis_CrossingHistory_AmbiguousGap"] = value;
this["Analysis_CrossingHistory_AmbigousGap"] = value;
}
}
@ -2244,5 +2244,65 @@ Digital data base on the World Wide Web (URL: http://www.ngdc.noaa.gov/mgg/topo/
this["Charts_FontSize"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool Location_RestrictToAreaOfInterest {
get {
return ((bool)(this["Location_RestrictToAreaOfInterest"]));
}
set {
this["Location_RestrictToAreaOfInterest"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("1970-01-01")]
public global::System.DateTime StationsDatabase_TimeStamp {
get {
return ((global::System.DateTime)(this["StationsDatabase_TimeStamp"]));
}
set {
this["StationsDatabase_TimeStamp"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool Map_Preloader_Enabled {
get {
return ((bool)(this["Map_Preloader_Enabled"]));
}
set {
this["Map_Preloader_Enabled"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public decimal Map_Preloader_MinZoom {
get {
return ((decimal)(this["Map_Preloader_MinZoom"]));
}
set {
this["Map_Preloader_MinZoom"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("11")]
public decimal Map_Preloader_MaxZoom {
get {
return ((decimal)(this["Map_Preloader_MaxZoom"]));
}
set {
this["Map_Preloader_MaxZoom"] = value;
}
}
}
}

Wyświetl plik

@ -523,7 +523,7 @@ MEaSUREs data and products are available at no charge from the LP DAAC.See https
<Setting Name="Analysis_CrossingHistory_WithSignalLevel" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="Analysis_CrossingHistory_AmbiguousGap" Type="System.Decimal" Scope="User">
<Setting Name="Analysis_CrossingHistory_AmbigousGap" Type="System.Decimal" Scope="User">
<Value Profile="(Default)">10</Value>
</Setting>
<Setting Name="Planes_KeepHistory" Type="System.Boolean" Scope="User">
@ -589,5 +589,20 @@ MEaSUREs data and products are available at no charge from the LP DAAC.See https
<Setting Name="Charts_FontSize" Type="System.Decimal" Scope="User">
<Value Profile="(Default)">6</Value>
</Setting>
<Setting Name="Location_RestrictToAreaOfInterest" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="StationsDatabase_TimeStamp" Type="System.DateTime" Scope="User">
<Value Profile="(Default)">1970-01-01</Value>
</Setting>
<Setting Name="Map_Preloader_Enabled" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="Map_Preloader_MinZoom" Type="System.Decimal" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="Map_Preloader_MaxZoom" Type="System.Decimal" Scope="User">
<Value Profile="(Default)">11</Value>
</Setting>
</Settings>
</SettingsFile>

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 19 KiB

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 2.7 MiB

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 7.4 KiB

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 12 KiB

Wyświetl plik

@ -74,7 +74,7 @@
this.Name = "Splash";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Splash";
this.Text = "AirScout";
this.TopMost = true;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Splash_FormClosing);
this.Load += new System.EventHandler(this.Splash_Load);

Wyświetl plik

@ -99,6 +99,11 @@ namespace AirScout
this.Opacity += 0.01;
ti_Animation.Start();
}
else
{
// rest topmost style
this.TopMost = false;
}
}
private void pb_Main_Paint(object sender, PaintEventArgs e)

Wyświetl plik

@ -1,43 +1,181 @@
2014-01-04: V1.0.0.0
2020-xx-xx: V1.3.3.0
====================
Initial Version
- Feature: Option to restrict call sign database to locations inside the area of interest (via "Option/Stations"), all others outside this area will be deleted in each update prcodedure
- Bugfix: Again fixed some issues with splash window preventing error messages being shown at startup.
- Bugifx: Some elements inside the control tab were not drawn on first enter when running under Linux/Mono --> fixed
- Feature: Optimize the database update procedures to save CPU load and bandwidth, do nothing now when neither database nor web update has changed since last update
- Bugfix: Airports are showing up on map with long delay --> fixed
- Bugfix: AirScout crashes when startup is delayed for some reason and splash window has closed meanwhile --> fixed
- Bugfix: AirScout crashes after cleaning up settings via AirScout.exe /clean and opening "Options" dialog, default path settings are lost --> fixed
- Bugfix: Critical! AirScout does not show up anymore when closed once in "Minimized" state, only way to recover is to clean up settings --> fixed (tnx SM6MUY, OZ9GE)
- Bugfix: Coloured watchlist items were not reset to default when plane passed and no potetial is left anymore --> fixed (tnx OZ9GE)
- Feature: Implementing TLS1.2 for .NET4.0 (Windows XP) for plane feeds which require a secure connection, this keeps backward compatibility for almost all streams
- Feature: Map preloader (experimental), preload missing map tiles from www.airscout.eu (only Open Street Maps, only Central Europe) or from map server and store it to database
- Feature: Rework of Options dialog, re-arranged some items to get more clearance in what they stand for
2014-01-09: V1.0.0.1
2020-xx-xx: V1.3.2.0 (not published)
====================
- Bugfix: Activation of AirScout server via "Activate Server" checkbox on "Options/Network" does not work. No server functions available --> fixed (tnx SM7EYW)
- Bugfix: Several limitations on Windows XP, program crashes while opening Options Dialog, users cannot save plane feed settings --> fixed (tnx OK1TEH)
- Feature: Users can click on the watchlist markers on the map to change path immediately in SINGLE mode (tnx GM4JTJ)
- Feature: Option to change font size in charts via "Options/Map" (tnx LZ2ZP)
- Bugfix: Radio Horizon shows an unwanted strike through in Cartesian diagram --> fixed (tnx LZ2ZP)
- Feature: Redirect console output, users can run AirScout from a command line and see all console output for debugging (like on Linux)
- Bugfix: Watchlist was not properly sorted when synchronized with wtKST --> fixed
- Bugfix: "Orphan paths" when watchlist is synchronized with wtKST and user leaves the chat --> fixed, call is kept on watchlist now as long as it is selected
2015-02-08: V1.1.0.0
2020-03-01: V1.3.1.0
====================
- Bugfix: Lat/Lon textboxes at "Options/Planes" do not show the current settings from "Options/General" tab. --> fixed (tnx VK6KDX)
- Bugfix: Program is crashing when pressing the "Show Traffic" button on the "Options/Planes" tab on an empty plane position database
(e.g. no plane positions were loaded neither from Internet nor from a local file) --> fixed (tnx VK6KDX)
- Bugfix: InfoWindow: Elevation is showing wrong values --> fixed
- Feature: Accessiblity enhancement, minimize Zoom, Fliter and Alarm Boxes to save screen space when using larger system fonts.
New splitters between map, info box and elevation details, positions were saved now.
Ensure that the basic window elements are always visible. (tnx IK1ZOF)
- Bugfix: several text box input in the Options window (e.g. Sepctrum Lab Server URL) is not saved correctly after pressing "Apply" or "OK" --> fixed
- Feature: new plane feeds created including random source and new web feeds, file feeds and raw data input from ADS-B receiver (DVB-T stick based with RTL1090)
- Feature: AirScout web server functionalitity
- Feature: News Feed included in separate tab
- Feature: Plane tracking by several ways included (experimental)
- Feature: Import call sign database from previous versions or other sources
- Feature: New (scalable) plane icons according to category (tnx OK1TEH)
- Bugfix: AirportMapper does not work, Airports were not shown on the map anymore --> fixed (tnx OZ9GE)
- Feature: complete rework of watchlist dialog, now changed from ListView to DataGridView (which is much faster), additionally show locator (tnx G8JVM, DH5FS, OZ9GE)
- Bugfix: Aircraft labels were not shown on the elevation tab anymore (tab was disabled while in PLAY mode) --> fixed, now showing again on Left+Click (tnx OZ9GE)
- Bugfix: ProgressTimer overflow under heavy load (especially when too many planes or paths are to display on slow systems) --> fixed (timer is stopped now and restarted not until update is performed)
- Bugfix: do not disable whole tab controls while in PLAY mode, allow some user action and display changes --> fixed (change of tabs in tab control is now blocked by other means)
- Feature: Rework of watch list in main window, showing potential now in full color, last selected call in MULTI mode is automatically transferred as selected call for SINGLE mode (tnx GM3SEK)
- Feature: rework of splash window at startup, showing software version now
- Bugfix: Planefinder web feed stopped working --> fixed (tnx F8AIH)
- Feature: New web feed from OpenSky Network implenented (a free community)
- Bugfix: AirScout crashed when the "Info" tab in the "Options" dialog box is opened twice after doing some other stuff --> fixed (tnx G0LGS)
2020-xx-xx: V1.3.0.8 (not published)
====================
2015-xx-xx: V1.1.0.1 (not published)
====================================
- Bugfix: The calculation of free disk space does not work on some Linux configurations, unable to load elevation tiles --> fixed with workaround (tnx G8JVM)
- Bugfix: Somtimes unable to set own callsign in First Run Wizard on Linux (when own callsign is not in database) --> fixed (tnx (G8JVM)
- Bugfix: Window splitter position not set properly when starting up after First Run Wizard or when starting on Linux
- Feature: Manage watch list dialog is slow, filling the list boxes is taking ages (especially on Linux/Mono)--> create a background worker and show progress while loading (tnx G8JVM)
- Feature: Watch list is now sorted on selected calls first when in Play mode, coloured checkboxes are showing AS potential (tnx DH5FS)
- Bugfix: Multiple dialog boxes "There are news on the website..." are showing if no user reaaction happend after some minutes --> fixed
- Bugfix: Planes Minimal Category Filter Boxes are showing all categories twice --> fixed (tnx S51ML)
- Bugfix: UDP-Server (for wtKST or similar) delivers full plane category string (e.g. "MEDIUM") in ASNEAREST message instead of one character (e.g. "M") --> fixed (tnx S51ML)
- Bugfix: Donate button issue - Program hangs or shows "Script error" while trying to load the website from the server --> fixed (tnx SM6CEN)
- Bugfix: Antenna tracking does not stop when selected AP disappeared, sending "0.0" values for Az/El instead of stop sending data--> fixed
- Bugfix: Planes with category "S" (Superheavy) were shown as "M" sized icons --> fixed
- Bugfix: GLOBE source unusable outside Europe: changed URL, tiles and data format --> fixed, complete new tile handling and download strategy is implemented (tnx VK2BJP)
- Bugfix: Corrupted lat/lon information in <www.planefinder.net> feed, major amount of planes is dropped --> not fixed so far(tnx W3SZ)
- Bugfix: Error in 2-line TLE handling for ISS --> fixed
- Feature: Playing of historical data (Offline mode) when double-clicking on UTC field in "Pause" mode
2020-02-12: V1.3.0.7
====================
- Bugfix: The AirScout_clean.cmd does not work properly when trying to cleanup files (database files are locked) --> fixed
- Bugfix: Session key sometimes was not genrated at fresh install, resulting in limited functionality --> fixed
- Bugfix: Watchlist in multi-path mode always scrolls back to top position after watchlist is updated, watchlist is getting inoperable on large amounts of calls --> fixed
- Bugfix: Sometimes a MemoryCounter could not created by the system, Exception will occur and AirScout will not start --> fixed
- Feature: Create a progress indicator while creating elevation tile catalogue --> number of tiles processed is displayed now (tnx DL8AAU)
- Feature: colour checked items in watch list according to their AS potential (tnx DF5HS)
- Feature: Sort selected items to the top of watch list to better view all selected items at once
- Feature: label checked items from watch list in map premantently when in Multi-Path Mode (call sign only) (tnx DF5HS)
- Bugfix: several minor bugs when managing watch list (calls not sorted, multiple adding adding possible) --> fixed (tnx DL8AAU)
2020-02-04: V1.3.0.6
====================
- Bugfix: Planefeed plugins do not show up on some configurations - seems to be a problem with .NET security policies --> fixed (tnx DL8AAU)
- Bugfix: Users cannot click on a single plane to show info permanently when in PLAY mode, also no tracking of a single plane is possible --> fixed (tnx IN3UPQ)
- Bugfix: Calculation of elevation angle is wrong, always showing abt. 0°, tracking not working --> fixed (tnx IN3UPQ)
2020-02-02: V1.3.0.5
====================
- Feature: New AirScout user space on webserver, including PHP scripts for upload download information and keys
- Feature: New database on webserver containing station info, qrv info and keys
- Feature: [Security enhancement] generate a unique AirScout instance key and a temporary session key each time AirScout is starting up, all traffic is now encrypted
- Feature: [Plugin framework for plane feeds] allowing to update feeds online and to write own feeds
- Feature: New and refurbished plane feeds, according to the new plane feed framework
- Feature: News tab is moved to map tab to get more space for viewing content
2019-xx-xx: V1.3.0.4 (not published)
====================
- Feature: new "Multi-Path" feature to monitor more than one path at the same time, enhanced watch list features
- Feature: new common database layout for aircraft database
- Feature: keep aircraft positions in database instead of in memory
- Feature: local obstruction is now kept in database, new dialog window in "Stations" tab to enter obstruction data
- Bugfix: Showing of airports in map could not be switched off --> fixed (tnx DL8AAU)
- Bugfix: Calculation of squint angle was intransparent and probably incorrect, its now defined as the difference between both angles theta (refer to handbook) --> fixed
- Feature: Enhanced spectrum tab with zoomed map for supervising nearest plane in real time, singal strength is kept in database for further analysis
- Feature: Enhanced webserver functionality, deliver path and nearest planes info on HTTP-request via JSON, makes it possible to run one ore more AirScout view clients
- Feature: Enhanced analysis tab with history player and import/export functions
- Feature: [Virtual Radar Server] Extended plausibility check to avoid "jumping planes" due to incorrect position messages (estimate position from older messages and check against latest message)
- Feature: [PlaneFeeds] improved recovery of missing data/empty fields in captured messages
- Bugfix: Error 403 (forbidden) when loading map tiles from OpenStreetMap --> fixed
2018-xx-xx: V1.3.0.3 (not published)
====================
- Bugfix: Web downloader now allows redirection (e.g. http:// --> https://) --> fixed (tnx DL8AAU)
- Feature: new database structure (internal)
- Feature: extended database structure --> storing location per user & 6digit locator, storing QRV info per user & 6digit locator & band
- Feature: new elevation tile structure and download procedure
- Feature: latest SQLite library version and "Any CPU" feature, AirScout now running as 32bit or 64bit application on both Windows and Linux
- Feature: Linux/Mono compatibility allows running AirScout native in a Linux/Mono environment (details and limitations see readme_Linux.txt)
- Feature: New charts library for enhanced presentation and Linux/Mono compatibility
- Feature: Enhanced station details dialog with map for easier location change and QRV info per callsign, locator and band
- Feature: new background procedures for station and elevation database updates
- Feature: new background procedure for propagation path pre-calculation
- Feature: extended error logging
2017-xx-xx: V1.2.0.7 (not published)
====================
- Bugfix: "Jumping planes" due to incorrect timestamps when using VirtualRadarServer --> Workaround implemented (check server time and calculate offset)
- Feature: using GAlt (corrected altitude by air pressure) when using VirtualRadarServer giving more accurate altitude asl
- Feature: History Analysis tab implemented to load an play with historical data
- Bugfix: band specific setting of maximum distance to path not working --> fixed (tnx DL8AAU)
- Feature: show Radio Horizon on map as an additional option to easy locate obstructions on topology
2017-xx-xx: V1.2.0.6 (not published)
====================
- Bugfix: AirScout crashes when Options/Database/Update local database is set to "Never" --> fixed (tnx DL3IAE)
- Bugfix: AirScout does not set DXCall properly when triggered from wtKST to show path and DXLocator does not match with database --> fixed (tnx DL8AAU)
- Feature: Import old callsign database from previous versions as TXT-file (tnx F1EBK)
- Bugfix: Import of initial database files crashed
- Bugfix: misformatted tracking file in WSJT format (azel.dat) --> fixed (tnx DJ5AR)
- Bugfix: creating an empty database under unknown circumstances which causes AirScout to crash on next startup --> Workaround implemented (check for empty lookup tables before saving to database)
2017-01-02: V1.2.0.5
====================
- Bugfix: Antenna height was not set to 10m by default in the HorizonCalculationDlg --> fixed (tnx DL8AAU)
- Bugfix: Elevation data and antenna height textboxes were not set in Options/Stations --> fixed
- Bugfix: DXStation details were not filled when enetering Options/Stations --> fixed
- Bugfix: ADSBSharp and RTL1090 feeds: exeptions while receiving misformatted messages were blocking the decoder for 10sec, no position messages could be decoded --> fixed (tnx PE1ITR)
- Bugfix: ADSBSharp and RTL1090 feeds: endless loop when not receiving a start character via TCP(binary mode only) --> fixed with receiving timeout (10sec)
- Feature: Aircraft database is now updated also from received web feeds
- Bugfix: Redraw loop to maximaized window when alarms occur --> fixed (tnx DL8AAU)
- Bugfix: Frequency calcluation wrong in HorizonDlg with special CultureInfo --> fixed (tnx DL8AAU)
- Bugfix: Callsign does not update in DXCall combobox when clicking on a marker from watchlist --> fixed (tnx OZ9GE)
- Bugfix: Changes on database were discarded when done before database background update was finished --> fixed
2016-12-24: V1.2.0.4
====================
- Bugfix: several issues when entering a completly unknown callsign --> fixed (tnx SM6CEN)
- Bugfix: station detail boxes in FirtsRuznWizard and Options/Stations differ in order --> fixed
- Feature: adjust MapWindow zoom automatically in FirstRunWizard when changing locator
- Bugfix: initial DXCall was set to GB3MHL, this is outdated --> fixed, DXCall now set to GB3MHZ (tnx G3XDY)
- Bugfix: loss of callsign database if closed before DatabaseUpdater was finished > fixed
- Bugfix: LastUpdated timestamps are not handled correctly, preventing user from altering locator once set as new --> fixed
2016-12-23: V1.2.0.3
====================
- Feature: new threadsafe LogWriter object created and extensive logging implemented
- Bugfix: download of SRTM elevation tiles does not work on WinXP due to missing TLS1.2 implementation --> Workaround
2016-12-20: V1.2.0.2
====================
- Bugfix: FirstRunWizard windows remained on topmost position blocking other dialogs--> fixed (tnx G3XDY)
- Feature: downgrade FirstRunWizard to Microsoft .Net4.0 and get back Winodws XP compatibitliy (tnx OK1TEH)
- Feature: design back button as classic button in FirstRunWizard regardless of Windows Design Rules (tnx DL8AAU)
- Bugfix: Reset settings to factory default does not work properly for plane feeds --> fixed
- Bugfix: use of "Best Case Elevation" even when given location is exact --> fixed (tnx G3XDY)
- Bugfix: "Best Case Elevation" did not work properly when more than one elevation model is activated --> fixed
- Feature: added QRZ lookup for own callsign on FirstRunWizard (tnx DL8AAU)
- Bugfix: proper handling of input (callsign, lat/lon, locator textboxes)
- Bugfix: proper handling of drag marker for own locaton on map (FirstRunWizard) --> fixed
- Bugfix: aircrafts did not show up on first run --> fixed (tnx G3XDY)
- Bugfix: database updater did not load elevation tiles from web --> fixed
- Feature: buttons for default elevation path added at Options/GLOBE, SRTM3, SRTM1
2016-12-11: V1.2.0.1
====================
@ -57,166 +195,42 @@ Initial Version
- Feature: no admin rights necessary anymore, all files are now stored in local user space
- Feature: window layout, position and size is kept now
2016-12-20: V1.2.0.2
2015-xx-xx: V1.1.0.1 (not published)
====================================
- Bugfix: Donate button issue - Program hangs or shows "Script error" while trying to load the website from the server --> fixed (tnx SM6CEN)
- Bugfix: Antenna tracking does not stop when selected AP disappeared, sending "0.0" values for Az/El instead of stop sending data--> fixed
- Bugfix: Planes with category "S" (Superheavy) were shown as "M" sized icons --> fixed
- Bugfix: GLOBE source unusable outside Europe: changed URL, tiles and data format --> fixed, complete new tile handling and download strategy is implemented (tnx VK2BJP)
- Bugfix: Corrupted lat/lon information in <www.planefinder.net> feed, major amount of planes is dropped --> not fixed so far(tnx W3SZ)
- Bugfix: Error in 2-line TLE handling for ISS --> fixed
- Feature: Playing of historical data (Offline mode) when double-clicking on UTC field in "Pause" mode
2015-02-08: V1.1.0.0
====================
- Bugfix: FirstRunWizard windows remained on topmost position blocking other dialogs--> fixed (tnx G3XDY)
- Feature: downgrade FirstRunWizard to Microsoft .Net4.0 and get back Winodws XP compatibitliy (tnx OK1TEH)
- Feature: design back button as classic button in FirstRunWizard regardless of Windows Design Rules (tnx DL8AAU)
- Bugfix: Reset settings to factory default does not work properly for plane feeds --> fixed
- Bugfix: use of "Best Case Elevation" even when given location is exact --> fixed (tnx G3XDY)
- Bugfix: "Best Case Elevation" did not work properly when more than one elevation model is activated --> fixed
- Feature: added QRZ lookup for own callsign on FirstRunWizard (tnx DL8AAU)
- Bugfix: proper handling of input (callsign, lat/lon, locator textboxes)
- Bugfix: proper handling of drag marker for own locaton on map (FirstRunWizard) --> fixed
- Bugfix: aircrafts did not show up on first run --> fixed (tnx G3XDY)
- Bugfix: database updater did not load elevation tiles from web --> fixed
- Feature: buttons for default elevation path added at Options/GLOBE, SRTM3, SRTM1
- Bugfix: Lat/Lon textboxes at "Options/Planes" do not show the current settings from "Options/General" tab. --> fixed (tnx VK6KDX)
- Bugfix: Program is crashing when pressing the "Show Traffic" button on the "Options/Planes" tab on an empty plane position database
(e.g. no plane positions were loaded neither from Internet nor from a local file) --> fixed (tnx VK6KDX)
- Bugfix: InfoWindow: Elevation is showing wrong values --> fixed
- Feature: Accessiblity enhancement, minimize Zoom, Fliter and Alarm Boxes to save screen space when using larger system fonts.
New splitters between map, info box and elevation details, positions were saved now.
Ensure that the basic window elements are always visible. (tnx IK1ZOF)
- Bugfix: several text box input in the Options window (e.g. Sepctrum Lab Server URL) is not saved correctly after pressing "Apply" or "OK" --> fixed
- Feature: new plane feeds created including random source and new web feeds, file feeds and raw data input from ADS-B receiver (DVB-T stick based with RTL1090)
- Feature: AirScout web server functionalitity
- Feature: News Feed included in separate tab
- Feature: Plane tracking by several ways included (experimental)
- Feature: Import call sign database from previous versions or other sources
- Feature: New (scalable) plane icons according to category (tnx OK1TEH)
2016-12-23: V1.2.0.3
2014-01-09: V1.0.0.1
====================
- Feature: new threadsafe LogWriter object created and extensive logging implemented
- Bugfix: download of SRTM elevation tiles does not work on WinXP due to missing TLS1.2 implementation --> Workaround
- Bugfix: Activation of AirScout server via "Activate Server" checkbox on "Options/Network" does not work. No server functions available --> fixed (tnx SM7EYW)
2016-12-24: V1.2.0.4
2014-01-04: V1.0.0.0
====================
- Bugfix: several issues when entering a completly unknown callsign --> fixed (tnx SM6CEN)
- Bugfix: station detail boxes in FirtsRuznWizard and Options/Stations differ in order --> fixed
- Feature: adjust MapWindow zoom automatically in FirstRunWizard when changing locator
- Bugfix: initial DXCall was set to GB3MHL, this is outdated --> fixed, DXCall now set to GB3MHZ (tnx G3XDY)
- Bugfix: loss of callsign database if closed before DatabaseUpdater was finished > fixed
- Bugfix: LastUpdated timestamps are not handled correctly, preventing user from altering locator once set as new --> fixed
2017-01-02: V1.2.0.5
====================
- Bugfix: Antenna height was not set to 10m by default in the HorizonCalculationDlg --> fixed (tnx DL8AAU)
- Bugfix: Elevation data and antenna height textboxes were not set in Options/Stations --> fixed
- Bugfix: DXStation details were not filled when enetering Options/Stations --> fixed
- Bugfix: ADSBSharp and RTL1090 feeds: exeptions while receiving misformatted messages were blocking the decoder for 10sec, no position messages could be decoded --> fixed (tnx PE1ITR)
- Bugfix: ADSBSharp and RTL1090 feeds: endless loop when not receiving a start character via TCP(binary mode only) --> fixed with receiving timeout (10sec)
- Feature: Aircraft database is now updated also from received web feeds
- Bugfix: Redraw loop to maximaized window when alarms occur --> fixed (tnx DL8AAU)
- Bugfix: Frequency calcluation wrong in HorizonDlg with special CultureInfo --> fixed (tnx DL8AAU)
- Bugfix: Callsign does not update in DXCall combobox when clicking on a marker from watchlist --> fixed (tnx OZ9GE)
- Bugfix: Changes on database were discarded when done before database background update was finished --> fixed
2017-xx-xx: V1.2.0.6 (not published)
====================
- Bugfix: AirScout crashes when Options/Database/Update local database is set to "Never" --> fixed (tnx DL3IAE)
- Bugfix: AirScout does not set DXCall properly when triggered from wtKST to show path and DXLocator does not match with database --> fixed (tnx DL8AAU)
- Feature: Import old callsign database from previous versions as TXT-file (tnx F1EBK)
- Bugfix: Import of initial database files crashed
- Bugfix: misformatted tracking file in WSJT format (azel.dat) --> fixed (tnx DJ5AR)
- Bugfix: creating an empty database under unknown circumstances which causes AirScout to crash on next startup --> Workaround implemented (check for empty lookup tables before saving to database)
2017-xx-xx: V1.2.0.7 (not published)
====================
- Bugfix: "Jumping planes" due to incorrect timestamps when using VirtualRadarServer --> Workaround implemented (check server time and calculate offset)
- Feature: using GAlt (corrected altitude by air pressure) when using VirtualRadarServer giving more accurate altitude asl
- Feature: History Analysis tab implemented to load an play with historical data
- Bugfix: band specific setting of maximum distance to path not working --> fixed (tnx DL8AAU)
- Feature: show Radio Horizon on map as an additional option to easy locate obstructions on topology
2018-xx-xx: V1.3.0.3 (not published)
====================
- Bugfix: Web downloader now allows redirection (e.g. http:// --> https://) --> fixed (tnx DL8AAU)
- Feature: new database structure (internal)
- Feature: extended database structure --> storing location per user & 6digit locator, storing QRV info per user & 6digit locator & band
- Feature: new elevation tile structure and download procedure
- Feature: latest SQLite library version and "Any CPU" feature, AirScout now running as 32bit or 64bit application on both Windows and Linux
- Feature: Linux/Mono compatibility allows running AirScout native in a Linux/Mono environment (details and limitations see readme_Linux.txt)
- Feature: New charts library for enhanced presentation and Linux/Mono compatibility
- Feature: Enhanced station details dialog with map for easier location change and QRV info per callsign, locator and band
- Feature: new background procedures for station and elevation database updates
- Feature: new background procedure for propagation path pre-calculation
- Feature: extended error logging
2019-xx-xx: V1.3.0.4 (not published)
====================
- Feature: new "Multi-Path" feature to monitor more than one path at the same time, enhanced watch list features
- Feature: new common database layout for aircraft database
- Feature: keep aircraft positions in database instead of in memory
- Feature: local obstruction is now kept in database, new dialog window in "Stations" tab to enter obstruction data
- Bugfix: Showing of airports in map could not be switched off --> fixed (tnx DL8AAU)
- Bugfix: Calculation of squint angle was intransparent and probably incorrect, its now defined as the difference between both angles theta (refer to handbook) --> fixed
- Feature: Enhanced spectrum tab with zoomed map for supervising nearest plane in real time, singal strength is kept in database for further analysis
- Feature: Enhanced webserver functionality, deliver path and nearest planes info on HTTP-request via JSON, makes it possible to run one ore more AirScout view clients
- Feature: Enhanced analysis tab with history player and import/export functions
- Feature: [Virtual Radar Server] Extended plausibility check to avoid "jumping planes" due to incorrect position messages (estimate position from older messages and check against latest message)
- Feature: [PlaneFeeds] improved recovery of missing data/empty fields in captured messages
- Bugfix: Error 403 (forbidden) when loading map tiles from OpenStreetMap --> fixed
2020-02-02: V1.3.0.5
====================
- Feature: New AirScout user space on webserver, including PHP scripts for upload download information and keys
- Feature: New database on webserver containing station info, qrv info and keys
- Feature: [Security enhancement] generate a unique AirScout instance key and a temporary session key each time AirScout is starting up, all traffic is now encrypted
- Feature: [Plugin framework for plane feeds] allowing to update feeds online and to write own feeds
- Feature: New and refurbished plane feeds, according to the new plane feed framework
- Feature: News tab is moved to map tab to get more space for viewing content
2020-02-04: V1.3.0.6
====================
- Bugfix: Planefeed plugins do not show up on some configurations - seems to be a problem with .NET security policies --> fixed (tnx DL8AAU)
- Bugfix: Users cannot click on a single plane to show info permanently when in PLAY mode, also no tracking of a single plane is possible --> fixed (tnx IN3UPQ)
- Bugfix: Calculation of elevation angle is wrong, always showing abt. 0°, tracking not working --> fixed (tnx IN3UPQ)
2020-02-12: V1.3.0.7
====================
- Bugfix: The AirScout_clean.cmd does not work properly when trying to cleanup files (database files are locked) --> fixed
- Bugfix: Session key sometimes was not genrated at fresh install, resulting in limited functionality --> fixed
- Bugfix: Watchlist in multi-path mode always scrolls back to top position after watchlist is updated, watchlist is getting inoperable on large amounts of calls --> fixed
- Bugfix: Sometimes a MemoryCounter could not created by the system, Exception will occur and AirScout will not start --> fixed
- Feature: Create a progress indicator while creating elevation tile catalogue --> number of tiles processed is displayed now (tnx DL8AAU)
- Feature: colour checked items in watch list according to their AS potential (tnx DF5HS)
- Feature: Sort selected items to the top of watch list to better view all selected items at once
- Feature: label checked items from watch list in map premantently when in Multi-Path Mode (call sign only) (tnx DF5HS)
- Bugfix: several minor bugs when managing watch list (calls not sorted, multiple adding adding possible) --> fixed (tnx DL8AAU)
2020-xx-xx: V1.3.0.8 (not published)
====================
- Bugfix: The calculation of free disk space does not work on some Linux configurations, unable to load elevation tiles --> fixed with workaround (tnx G8JVM)
- Bugfix: Somtimes unable to set own callsign in First Run Wizard on Linux (when own callsign is not in database) --> fixed (tnx (G8JVM)
- Bugfix: Window splitter position not set properly when starting up after First Run Wizard or when starting on Linux
- Feature: Manage watch list dialog is slow, filling the list boxes is taking ages (especially on Linux/Mono)--> create a background worker and show progress while loading (tnx G8JVM)
- Feature: Watch list is now sorted on selected calls first when in Play mode, coloured checkboxes are showing AS potential (tnx DH5FS)
- Bugfix: Multiple dialog boxes "There are news on the website..." are showing if no user reaaction happend after some minutes --> fixed
- Bugfix: Planes Minimal Category Filter Boxes are showing all categories twice --> fixed (tnx S51ML)
- Bugfix: UDP-Server (for wtKST or similar) delivers full plane category string (e.g. "MEDIUM") in ASNEAREST message instead of one character (e.g. "M") --> fixed (tnx S51ML)
2020-03-01: V1.3.1.0
====================
- Bugfix: AirportMapper does not work, Airports were not shown on the map anymore --> fixed (tnx OZ9GE)
- Feature: complete rework of watchlist dialog, now changed from ListView to DataGridView (which is much faster), additionally show locator (tnx G8JVM, DH5FS, OZ9GE)
- Bugfix: Aircraft labels were not shown on the elevation tab anymore (tab was disabled while in PLAY mode) --> fixed, now showing again on Left+Click (tnx OZ9GE)
- Bugfix: ProgressTimer overflow under heavy load (especially when too many planes or paths are to display on slow systems) --> fixed (timer is stopped now and restarted not until update is performed)
- Bugfix: do not disable whole tab controls while in PLAY mode, allow some user action and display changes --> fixed (change of tabs in tab control is now blocked by other means)
- Feature: Rework of watch list in main window, showing potential now in full color, last selected call in MULTI mode is automatically transferred as selected call for SINGLE mode (tnx GM3SEK)
- Feature: rework of splash window at startup, showing software version now
- Bugfix: Planefinder web feed stopped working --> fixed (tnx F8AIH)
- Feature: New web feed from OpenSky Network implenented (a free community)
- Bugfix: AirScout crashed when the "Info" tab in the "Options" dialog box is opened twice after doing some other stuff --> fixed (tnx G0LGS)
2020-xx-xx: V1.3.2.0
====================
- Bugfix: Several limitations on Windows XP, program crashes while opening Options Dialog, users cannot save plane feed settings --> fixed (tnx OK1TEH)
- Feature: Users can click on the watchlist markers on the map to change path immediately in SINGLE mode (tnx GM4JTJ)
- Feature: Change font size in charts via "Options/Map" (tnx LZ2ZP)
- Bugfix: Radio Horizon shows an unwanted strike through in Cartesian diagram --> fixed (tnx LZ2ZP)
- Feature: Redirect console output, users can run AirScout from a command line and see all console output for debugging (like on Linux)
- Bugfix: Watchlist was not properly sorted when synchronized with wtKST --> fixed
- Bugfix: "Orphan paths" when watchlist synchronized with wtKST and user leaves the chat --> fixed, call is kept on watchlist now as long as it is selected
Initial Version

Wyświetl plik

@ -29,8 +29,8 @@
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
this.ss_Watchlist_Main = new System.Windows.Forms.StatusStrip();
this.tsl_Watchlist_Main = new System.Windows.Forms.ToolStripStatusLabel();
this.btn_Watchlist_Add = new System.Windows.Forms.Button();
@ -109,7 +109,7 @@
// btn_Watchlist_Cancel
//
this.btn_Watchlist_Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btn_Watchlist_Cancel.Location = new System.Drawing.Point(147, 402);
this.btn_Watchlist_Cancel.Location = new System.Drawing.Point(245, 402);
this.btn_Watchlist_Cancel.Name = "btn_Watchlist_Cancel";
this.btn_Watchlist_Cancel.Size = new System.Drawing.Size(75, 23);
this.btn_Watchlist_Cancel.TabIndex = 8;
@ -120,7 +120,7 @@
//
this.btn_Watchlist_OK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btn_Watchlist_OK.Enabled = false;
this.btn_Watchlist_OK.Location = new System.Drawing.Point(237, 402);
this.btn_Watchlist_OK.Location = new System.Drawing.Point(153, 402);
this.btn_Watchlist_OK.Name = "btn_Watchlist_OK";
this.btn_Watchlist_OK.Size = new System.Drawing.Size(75, 23);
this.btn_Watchlist_OK.TabIndex = 9;
@ -174,17 +174,18 @@
this.dgv_Watchlist_Callsigns.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dgv_Watchlist_Callsigns.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
this.dgv_Watchlist_Callsigns.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle3.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgv_Watchlist_Callsigns.DefaultCellStyle = dataGridViewCellStyle3;
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle1.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgv_Watchlist_Callsigns.DefaultCellStyle = dataGridViewCellStyle1;
this.dgv_Watchlist_Callsigns.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;
this.dgv_Watchlist_Callsigns.Location = new System.Drawing.Point(15, 101);
this.dgv_Watchlist_Callsigns.Name = "dgv_Watchlist_Callsigns";
this.dgv_Watchlist_Callsigns.ReadOnly = true;
this.dgv_Watchlist_Callsigns.RowHeadersVisible = false;
this.dgv_Watchlist_Callsigns.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dgv_Watchlist_Callsigns.Size = new System.Drawing.Size(180, 280);
@ -201,14 +202,14 @@
this.dgv_Watchlist_Selected.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dgv_Watchlist_Selected.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
this.dgv_Watchlist_Selected.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle4.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgv_Watchlist_Selected.DefaultCellStyle = dataGridViewCellStyle4;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle2.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgv_Watchlist_Selected.DefaultCellStyle = dataGridViewCellStyle2;
this.dgv_Watchlist_Selected.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;
this.dgv_Watchlist_Selected.Location = new System.Drawing.Point(288, 101);
this.dgv_Watchlist_Selected.Name = "dgv_Watchlist_Selected";
@ -261,6 +262,9 @@
this.Controls.Add(this.btn_Watchlist_Remove);
this.Controls.Add(this.btn_Watchlist_Add);
this.Controls.Add(this.ss_Watchlist_Main);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "WatchlistDlg";
this.Text = "Manage Watchlist";
this.Load += new System.EventHandler(this.WatchlistDlg_Load);

Wyświetl plik

@ -123,9 +123,6 @@
<metadata name="tt_Watchlist_Main.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>167, 17</value>
</metadata>
<metadata name="tt_Watchlist_Main.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>167, 17</value>
</metadata>
<metadata name="bw_Watchlist_Fill.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>315, 17</value>
</metadata>

Wyświetl plik

@ -521,7 +521,7 @@ MEaSUREs data and products are available at no charge from the LP DAAC.See https
<setting name="Analysis_CrossingHistory_WithSignalLevel" serializeAs="String">
<value>False</value>
</setting>
<setting name="Analysis_CrossingHistory_AmbiguousGap" serializeAs="String">
<setting name="Analysis_CrossingHistory_AmbigousGap" serializeAs="String">
<value>10</value>
</setting>
<setting name="Planes_KeepHistory" serializeAs="String">
@ -588,6 +588,21 @@ MEaSUREs data and products are available at no charge from the LP DAAC.See https
<setting name="Charts_FontSize" serializeAs="String">
<value>6</value>
</setting>
<setting name="Location_RestrictToAreaOfInterest" serializeAs="String">
<value>True</value>
</setting>
<setting name="StationsDatabase_TimeStamp" serializeAs="String">
<value>1970-01-01</value>
</setting>
<setting name="Map_Preloader_Enabled" serializeAs="String">
<value>False</value>
</setting>
<setting name="Map_Preloader_MinZoom" serializeAs="String">
<value>0</value>
</setting>
<setting name="Map_Preloader_MaxZoom" serializeAs="String">
<value>11</value>
</setting>
</AirScout.Properties.Settings>
</userSettings>
<startup>
@ -606,7 +621,6 @@ MEaSUREs data and products are available at no charge from the LP DAAC.See https
</entityFramework>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>

Wyświetl plik

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="DeviceId" version="4.5.0" targetFramework="net40" />
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="net40" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net40" />
<package id="System.Data.SQLite.Core" version="1.0.112.0" targetFramework="net40" />
</packages>

Wyświetl plik

@ -74,8 +74,7 @@
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="Renci.SshNet, Version=2016.1.0.0, Culture=neutral, PublicKeyToken=1cee9f8bde3db106, processorArchitecture=MSIL">
<HintPath>..\packages\SSH.NET.2016.1.0\lib\net40\Renci.SshNet.dll</HintPath>

Wyświetl plik

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="HtmlAgilityPack" version="1.8.4" targetFramework="net40-client" />
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="net40-client" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net40-client" />
<package id="SSH.NET" version="2016.1.0" targetFramework="net40-client" />
<package id="System.Data.SQLite.Core" version="1.0.112.0" targetFramework="net40-client" />
</packages>

Wyświetl plik

@ -63,8 +63,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />

Wyświetl plik

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="net40-client" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net40-client" />
<package id="System.Data.SQLite.Core" version="1.0.112.0" targetFramework="net40-client" />
</packages>

Wyświetl plik

@ -35,8 +35,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />

Wyświetl plik

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="net40" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net40" />
<package id="System.Data.SQLite.Core" version="1.0.112.0" targetFramework="net40" />
</packages>

Wyświetl plik

@ -38,8 +38,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />

Wyświetl plik

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="net40" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net40" />
<package id="System.Data.SQLite.Core" version="1.0.112.0" targetFramework="net40" />
</packages>

Wyświetl plik

@ -34,8 +34,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
<HintPath>..\..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />

Wyświetl plik

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="net40" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net40" />
<package id="System.Data.SQLite.Core" version="1.0.112.0" targetFramework="net40" />
</packages>

Wyświetl plik

@ -39,8 +39,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net20\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net20\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data.SQLite, Version=1.0.112.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">

Wyświetl plik

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="net20" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net20" />
<package id="System.Data.SQLite.Core" version="1.0.112.0" targetFramework="net20" />
</packages>

Wyświetl plik

@ -67,8 +67,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
<HintPath>..\..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />

Wyświetl plik

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="net40" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net40" />
<package id="System.Data.SQLite.Core" version="1.0.112.0" targetFramework="net40" />
</packages>

Wyświetl plik

@ -100,6 +100,9 @@
<Reference Include="mscorlib">
<Name>mscorlib</Name>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.12.0.3\lib\net20\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System">
<Name>System</Name>
</Reference>
@ -147,6 +150,7 @@
<None Include="..\Ionic.snk">
<Link>Ionic.snk</Link>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">

Wyświetl plik

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net20" />
</packages>

Wyświetl plik

@ -19,6 +19,12 @@
<setting name="Overwrite" serializeAs="String">
<value>False</value>
</setting>
<setting name="Tile1" serializeAs="String">
<value />
</setting>
<setting name="Tile2" serializeAs="String">
<value />
</setting>
</ElevationTileGenerator.Properties.Settings>
</userSettings>
</configuration>

Wyświetl plik

@ -74,8 +74,7 @@
<HintPath>..\..\..\ScoutBase\DotNetZip\zip-v1.9\Debug\Ionic.Zip.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />

Wyświetl plik

@ -43,11 +43,37 @@
this.btn_TestCAT = new System.Windows.Forms.Button();
this.btn_CATFromZIP = new System.Windows.Forms.Button();
this.btn_PictureFromTiles = new System.Windows.Forms.Button();
this.btn_Delete = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.btn_Compare = new System.Windows.Forms.Button();
this.btn_Compare_Tile2 = new System.Windows.Forms.Button();
this.btn_Compare_Tile1 = new System.Windows.Forms.Button();
this.tb_Tile2 = new System.Windows.Forms.TextBox();
this.tb_Tile1 = new System.Windows.Forms.TextBox();
this.tb_DestDir = new System.Windows.Forms.TextBox();
this.tb_SourceDir = new System.Windows.Forms.TextBox();
this.btn_Delete = new System.Windows.Forms.Button();
this.tb_Diff = new System.Windows.Forms.TextBox();
this.btn_ShowDiff = new System.Windows.Forms.Button();
this.lbl_Diff_Dimensions = new System.Windows.Forms.Label();
this.lbl_Diff_Min = new System.Windows.Forms.Label();
this.lbl_Diff_Total = new System.Windows.Forms.Label();
this.lbl_Diff_Max = new System.Windows.Forms.Label();
this.tb_Show_Diff = new System.Windows.Forms.TextBox();
this.lbl_Diff_Voids = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.pb_Diff = new System.Windows.Forms.PictureBox();
this.label8 = new System.Windows.Forms.Label();
this.lbl_Diff_Mean = new System.Windows.Forms.Label();
this.btn_PictureFromZIP = new System.Windows.Forms.Button();
this.btn_ConvertSRTM1ToSRTM3 = new System.Windows.Forms.Button();
this.ss_Main.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pb_Picture)).BeginInit();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pb_Diff)).BeginInit();
this.SuspendLayout();
//
// ss_Main
@ -69,7 +95,7 @@
//
// btn_Start
//
this.btn_Start.Location = new System.Drawing.Point(640, 478);
this.btn_Start.Location = new System.Drawing.Point(36, 478);
this.btn_Start.Name = "btn_Start";
this.btn_Start.Size = new System.Drawing.Size(75, 23);
this.btn_Start.TabIndex = 1;
@ -117,7 +143,7 @@
//
// btn_Stop
//
this.btn_Stop.Location = new System.Drawing.Point(721, 478);
this.btn_Stop.Location = new System.Drawing.Point(117, 478);
this.btn_Stop.Name = "btn_Stop";
this.btn_Stop.Size = new System.Drawing.Size(75, 23);
this.btn_Stop.TabIndex = 8;
@ -128,17 +154,18 @@
// pb_Picture
//
this.pb_Picture.BackColor = System.Drawing.SystemColors.AppWorkspace;
this.pb_Picture.Location = new System.Drawing.Point(36, 127);
this.pb_Picture.Location = new System.Drawing.Point(36, 117);
this.pb_Picture.Name = "pb_Picture";
this.pb_Picture.Size = new System.Drawing.Size(586, 326);
this.pb_Picture.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pb_Picture.TabIndex = 9;
this.pb_Picture.TabStop = false;
//
// btn_Picture
//
this.btn_Picture.Location = new System.Drawing.Point(537, 478);
this.btn_Picture.Location = new System.Drawing.Point(310, 507);
this.btn_Picture.Name = "btn_Picture";
this.btn_Picture.Size = new System.Drawing.Size(75, 23);
this.btn_Picture.Size = new System.Drawing.Size(105, 23);
this.btn_Picture.TabIndex = 10;
this.btn_Picture.Text = "Picture";
this.btn_Picture.UseVisualStyleBackColor = true;
@ -146,7 +173,7 @@
//
// btn_ZIP
//
this.btn_ZIP.Location = new System.Drawing.Point(802, 478);
this.btn_ZIP.Location = new System.Drawing.Point(421, 478);
this.btn_ZIP.Name = "btn_ZIP";
this.btn_ZIP.Size = new System.Drawing.Size(75, 23);
this.btn_ZIP.TabIndex = 11;
@ -156,7 +183,7 @@
//
// btn_CAT
//
this.btn_CAT.Location = new System.Drawing.Point(883, 478);
this.btn_CAT.Location = new System.Drawing.Point(502, 478);
this.btn_CAT.Name = "btn_CAT";
this.btn_CAT.Size = new System.Drawing.Size(75, 23);
this.btn_CAT.TabIndex = 12;
@ -166,7 +193,7 @@
//
// btn_TestCAT
//
this.btn_TestCAT.Location = new System.Drawing.Point(883, 390);
this.btn_TestCAT.Location = new System.Drawing.Point(502, 507);
this.btn_TestCAT.Name = "btn_TestCAT";
this.btn_TestCAT.Size = new System.Drawing.Size(75, 23);
this.btn_TestCAT.TabIndex = 13;
@ -176,7 +203,7 @@
//
// btn_CATFromZIP
//
this.btn_CATFromZIP.Location = new System.Drawing.Point(883, 449);
this.btn_CATFromZIP.Location = new System.Drawing.Point(502, 449);
this.btn_CATFromZIP.Name = "btn_CATFromZIP";
this.btn_CATFromZIP.Size = new System.Drawing.Size(75, 23);
this.btn_CATFromZIP.TabIndex = 14;
@ -186,14 +213,104 @@
//
// btn_PictureFromTiles
//
this.btn_PictureFromTiles.Location = new System.Drawing.Point(451, 478);
this.btn_PictureFromTiles.Location = new System.Drawing.Point(310, 478);
this.btn_PictureFromTiles.Name = "btn_PictureFromTiles";
this.btn_PictureFromTiles.Size = new System.Drawing.Size(75, 23);
this.btn_PictureFromTiles.Size = new System.Drawing.Size(105, 23);
this.btn_PictureFromTiles.TabIndex = 15;
this.btn_PictureFromTiles.Text = "Pic fm Tiles";
this.btn_PictureFromTiles.Text = "Pic fm Loc-Tiles";
this.btn_PictureFromTiles.UseVisualStyleBackColor = true;
this.btn_PictureFromTiles.Click += new System.EventHandler(this.btn_PictureFromTiles_Click);
//
// btn_Delete
//
this.btn_Delete.Location = new System.Drawing.Point(229, 478);
this.btn_Delete.Name = "btn_Delete";
this.btn_Delete.Size = new System.Drawing.Size(75, 23);
this.btn_Delete.TabIndex = 16;
this.btn_Delete.Text = "Delete";
this.btn_Delete.UseVisualStyleBackColor = true;
this.btn_Delete.Click += new System.EventHandler(this.btn_Delete_Click);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.label8);
this.groupBox1.Controls.Add(this.lbl_Diff_Mean);
this.groupBox1.Controls.Add(this.pb_Diff);
this.groupBox1.Controls.Add(this.label7);
this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.lbl_Diff_Voids);
this.groupBox1.Controls.Add(this.tb_Show_Diff);
this.groupBox1.Controls.Add(this.lbl_Diff_Max);
this.groupBox1.Controls.Add(this.lbl_Diff_Total);
this.groupBox1.Controls.Add(this.lbl_Diff_Min);
this.groupBox1.Controls.Add(this.lbl_Diff_Dimensions);
this.groupBox1.Controls.Add(this.btn_ShowDiff);
this.groupBox1.Controls.Add(this.tb_Diff);
this.groupBox1.Controls.Add(this.btn_Compare);
this.groupBox1.Controls.Add(this.btn_Compare_Tile2);
this.groupBox1.Controls.Add(this.btn_Compare_Tile1);
this.groupBox1.Controls.Add(this.tb_Tile2);
this.groupBox1.Controls.Add(this.tb_Tile1);
this.groupBox1.Location = new System.Drawing.Point(671, 12);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(318, 431);
this.groupBox1.TabIndex = 17;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "TileCompare";
//
// btn_Compare
//
this.btn_Compare.Location = new System.Drawing.Point(243, 76);
this.btn_Compare.Name = "btn_Compare";
this.btn_Compare.Size = new System.Drawing.Size(69, 23);
this.btn_Compare.TabIndex = 19;
this.btn_Compare.Text = "Compare";
this.btn_Compare.UseVisualStyleBackColor = true;
this.btn_Compare.Click += new System.EventHandler(this.btn_Compare_Click);
//
// btn_Compare_Tile2
//
this.btn_Compare_Tile2.Location = new System.Drawing.Point(243, 47);
this.btn_Compare_Tile2.Name = "btn_Compare_Tile2";
this.btn_Compare_Tile2.Size = new System.Drawing.Size(69, 23);
this.btn_Compare_Tile2.TabIndex = 18;
this.btn_Compare_Tile2.Text = "Select";
this.btn_Compare_Tile2.UseVisualStyleBackColor = true;
this.btn_Compare_Tile2.Click += new System.EventHandler(this.btn_Compare_Tile2_Click);
//
// btn_Compare_Tile1
//
this.btn_Compare_Tile1.Location = new System.Drawing.Point(243, 18);
this.btn_Compare_Tile1.Name = "btn_Compare_Tile1";
this.btn_Compare_Tile1.Size = new System.Drawing.Size(69, 23);
this.btn_Compare_Tile1.TabIndex = 17;
this.btn_Compare_Tile1.Text = "Select";
this.btn_Compare_Tile1.UseVisualStyleBackColor = true;
this.btn_Compare_Tile1.Click += new System.EventHandler(this.btn_Compare_Tile1_Click);
//
// tb_Tile2
//
this.tb_Tile2.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::ElevationTileGenerator.Properties.Settings.Default, "Tile2", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.tb_Tile2.Location = new System.Drawing.Point(7, 49);
this.tb_Tile2.Name = "tb_Tile2";
this.tb_Tile2.ReadOnly = true;
this.tb_Tile2.Size = new System.Drawing.Size(230, 20);
this.tb_Tile2.TabIndex = 1;
this.tb_Tile2.Text = global::ElevationTileGenerator.Properties.Settings.Default.Tile2;
//
// tb_Tile1
//
this.tb_Tile1.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::ElevationTileGenerator.Properties.Settings.Default, "Tile1", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.tb_Tile1.Location = new System.Drawing.Point(7, 20);
this.tb_Tile1.Name = "tb_Tile1";
this.tb_Tile1.ReadOnly = true;
this.tb_Tile1.Size = new System.Drawing.Size(230, 20);
this.tb_Tile1.TabIndex = 0;
this.tb_Tile1.Text = global::ElevationTileGenerator.Properties.Settings.Default.Tile1;
//
// tb_DestDir
//
this.tb_DestDir.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::ElevationTileGenerator.Properties.Settings.Default, "DestDir", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
@ -212,21 +329,178 @@
this.tb_SourceDir.TabIndex = 3;
this.tb_SourceDir.Text = global::ElevationTileGenerator.Properties.Settings.Default.SourceDir;
//
// btn_Delete
// tb_Diff
//
this.btn_Delete.Location = new System.Drawing.Point(640, 449);
this.btn_Delete.Name = "btn_Delete";
this.btn_Delete.Size = new System.Drawing.Size(75, 23);
this.btn_Delete.TabIndex = 16;
this.btn_Delete.Text = "Delete";
this.btn_Delete.UseVisualStyleBackColor = true;
this.btn_Delete.Click += new System.EventHandler(this.btn_Delete_Click);
this.tb_Diff.Location = new System.Drawing.Point(7, 78);
this.tb_Diff.Name = "tb_Diff";
this.tb_Diff.ReadOnly = true;
this.tb_Diff.Size = new System.Drawing.Size(230, 20);
this.tb_Diff.TabIndex = 20;
//
// btn_ShowDiff
//
this.btn_ShowDiff.Location = new System.Drawing.Point(243, 105);
this.btn_ShowDiff.Name = "btn_ShowDiff";
this.btn_ShowDiff.Size = new System.Drawing.Size(69, 23);
this.btn_ShowDiff.TabIndex = 21;
this.btn_ShowDiff.Text = "Show Diff";
this.btn_ShowDiff.UseVisualStyleBackColor = true;
this.btn_ShowDiff.Click += new System.EventHandler(this.btn_ShowDiff_Click);
//
// lbl_Diff_Dimensions
//
this.lbl_Diff_Dimensions.AutoSize = true;
this.lbl_Diff_Dimensions.Location = new System.Drawing.Point(176, 140);
this.lbl_Diff_Dimensions.Name = "lbl_Diff_Dimensions";
this.lbl_Diff_Dimensions.Size = new System.Drawing.Size(22, 13);
this.lbl_Diff_Dimensions.TabIndex = 22;
this.lbl_Diff_Dimensions.Text = "xxx";
//
// lbl_Diff_Min
//
this.lbl_Diff_Min.AutoSize = true;
this.lbl_Diff_Min.Location = new System.Drawing.Point(176, 192);
this.lbl_Diff_Min.Name = "lbl_Diff_Min";
this.lbl_Diff_Min.Size = new System.Drawing.Size(22, 13);
this.lbl_Diff_Min.TabIndex = 23;
this.lbl_Diff_Min.Text = "xxx";
//
// lbl_Diff_Total
//
this.lbl_Diff_Total.AutoSize = true;
this.lbl_Diff_Total.Location = new System.Drawing.Point(176, 157);
this.lbl_Diff_Total.Name = "lbl_Diff_Total";
this.lbl_Diff_Total.Size = new System.Drawing.Size(22, 13);
this.lbl_Diff_Total.TabIndex = 24;
this.lbl_Diff_Total.Text = "xxx";
//
// lbl_Diff_Max
//
this.lbl_Diff_Max.AutoSize = true;
this.lbl_Diff_Max.Location = new System.Drawing.Point(174, 208);
this.lbl_Diff_Max.Name = "lbl_Diff_Max";
this.lbl_Diff_Max.Size = new System.Drawing.Size(22, 13);
this.lbl_Diff_Max.TabIndex = 25;
this.lbl_Diff_Max.Text = "xxx";
//
// tb_Show_Diff
//
this.tb_Show_Diff.Location = new System.Drawing.Point(7, 107);
this.tb_Show_Diff.Name = "tb_Show_Diff";
this.tb_Show_Diff.ReadOnly = true;
this.tb_Show_Diff.Size = new System.Drawing.Size(230, 20);
this.tb_Show_Diff.TabIndex = 26;
//
// lbl_Diff_Voids
//
this.lbl_Diff_Voids.AutoSize = true;
this.lbl_Diff_Voids.Location = new System.Drawing.Point(176, 175);
this.lbl_Diff_Voids.Name = "lbl_Diff_Voids";
this.lbl_Diff_Voids.Size = new System.Drawing.Size(22, 13);
this.lbl_Diff_Voids.TabIndex = 27;
this.lbl_Diff_Voids.Text = "xxx";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(9, 140);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(64, 13);
this.label3.TabIndex = 28;
this.label3.Text = "Dimensions:";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(9, 157);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(89, 13);
this.label4.TabIndex = 29;
this.label4.Text = "Total differences:";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(9, 175);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(62, 13);
this.label5.TabIndex = 30;
this.label5.Text = "Total voids:";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(11, 192);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(101, 13);
this.label6.TabIndex = 31;
this.label6.Text = "Minimum difference:";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(11, 208);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(104, 13);
this.label7.TabIndex = 32;
this.label7.Text = "Maximum difference:";
//
// pb_Diff
//
this.pb_Diff.BackColor = System.Drawing.SystemColors.AppWorkspace;
this.pb_Diff.Location = new System.Drawing.Point(15, 260);
this.pb_Diff.Name = "pb_Diff";
this.pb_Diff.Size = new System.Drawing.Size(181, 163);
this.pb_Diff.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pb_Diff.TabIndex = 33;
this.pb_Diff.TabStop = false;
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(12, 225);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(87, 13);
this.label8.TabIndex = 35;
this.label8.Text = "Mean difference:";
//
// lbl_Diff_Mean
//
this.lbl_Diff_Mean.AutoSize = true;
this.lbl_Diff_Mean.Location = new System.Drawing.Point(175, 225);
this.lbl_Diff_Mean.Name = "lbl_Diff_Mean";
this.lbl_Diff_Mean.Size = new System.Drawing.Size(22, 13);
this.lbl_Diff_Mean.TabIndex = 34;
this.lbl_Diff_Mean.Text = "xxx";
//
// btn_PictureFromZIP
//
this.btn_PictureFromZIP.Location = new System.Drawing.Point(310, 449);
this.btn_PictureFromZIP.Name = "btn_PictureFromZIP";
this.btn_PictureFromZIP.Size = new System.Drawing.Size(105, 23);
this.btn_PictureFromZIP.TabIndex = 18;
this.btn_PictureFromZIP.Text = "Pic fm ZIP";
this.btn_PictureFromZIP.UseVisualStyleBackColor = true;
this.btn_PictureFromZIP.Click += new System.EventHandler(this.btn_PictureFromZIP_Click);
//
// btn_ConvertSRTM1ToSRTM3
//
this.btn_ConvertSRTM1ToSRTM3.Location = new System.Drawing.Point(36, 508);
this.btn_ConvertSRTM1ToSRTM3.Name = "btn_ConvertSRTM1ToSRTM3";
this.btn_ConvertSRTM1ToSRTM3.Size = new System.Drawing.Size(153, 23);
this.btn_ConvertSRTM1ToSRTM3.TabIndex = 19;
this.btn_ConvertSRTM1ToSRTM3.Text = "Convert SRTM1 to SRTM3";
this.btn_ConvertSRTM1ToSRTM3.UseVisualStyleBackColor = true;
this.btn_ConvertSRTM1ToSRTM3.Click += new System.EventHandler(this.btn_ConvertSRTM1ToSRTM3_Click);
//
// MainDlg
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1001, 556);
this.Controls.Add(this.btn_ConvertSRTM1ToSRTM3);
this.Controls.Add(this.btn_PictureFromZIP);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.btn_Delete);
this.Controls.Add(this.btn_PictureFromTiles);
this.Controls.Add(this.btn_CATFromZIP);
@ -251,6 +525,9 @@
this.ss_Main.ResumeLayout(false);
this.ss_Main.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pb_Picture)).EndInit();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pb_Diff)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@ -276,6 +553,30 @@
private System.Windows.Forms.Button btn_CATFromZIP;
private System.Windows.Forms.Button btn_PictureFromTiles;
private System.Windows.Forms.Button btn_Delete;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Button btn_Compare_Tile2;
private System.Windows.Forms.Button btn_Compare_Tile1;
private System.Windows.Forms.TextBox tb_Tile2;
private System.Windows.Forms.TextBox tb_Tile1;
private System.Windows.Forms.Button btn_Compare;
private System.Windows.Forms.TextBox tb_Diff;
private System.Windows.Forms.Label lbl_Diff_Dimensions;
private System.Windows.Forms.Button btn_ShowDiff;
private System.Windows.Forms.Label lbl_Diff_Max;
private System.Windows.Forms.Label lbl_Diff_Total;
private System.Windows.Forms.Label lbl_Diff_Min;
private System.Windows.Forms.TextBox tb_Show_Diff;
private System.Windows.Forms.Label lbl_Diff_Voids;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.PictureBox pb_Diff;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label lbl_Diff_Mean;
private System.Windows.Forms.Button btn_PictureFromZIP;
private System.Windows.Forms.Button btn_ConvertSRTM1ToSRTM3;
}
}

Wyświetl plik

@ -24,6 +24,9 @@ namespace ElevationTileGenerator
{
DataTableSRTM3 srtm3 = new DataTableSRTM3();
List<string> Files1 = new List<string>();
List<string> Files2 = new List<string>();
ElevationCatalogue Tiles = new ElevationCatalogue();
public MainDlg()
@ -33,7 +36,32 @@ namespace ElevationTileGenerator
private void MainDlg_Load(object sender, EventArgs e)
{
// string[] a = ElevationModel.Database.GetLocsFromRect(50, 0, 51, 2);
// string[] a = ElevationModel.Database.GetLocsFromRect(50, 0, 51, 2);
// fill compare files catalogues
if (!String.IsNullOrEmpty(tb_Tile1.Text))
{
// check for multiple files
if (tb_Tile1.Text.Contains(";"))
{
string[] a = tb_Tile1.Text.Split(';');
foreach (string file in a)
Files1.Add(file);
}
else
Files1.Add(tb_Tile1.Text);
}
if (!String.IsNullOrEmpty(tb_Tile2.Text))
{
// check for multiple files
if (tb_Tile2.Text.Contains(";"))
{
string[] a = tb_Tile2.Text.Split(';');
foreach (string file in a)
Files2.Add(file);
}
else
Files2.Add(tb_Tile2.Text);
}
}
private void btn_Start_Click(object sender, EventArgs e)
@ -780,6 +808,41 @@ namespace ElevationTileGenerator
CATFromZIP();
}
private void PictureFromTiles(string[] files, bool createTIFFromTiles = false)
{
Bitmap bm = null;
foreach (string file in files)
{
tsl_Status.Text = "Processing " + Path.GetFileName(file) + "...";
Application.DoEvents();
using (StreamReader sr = new StreamReader(File.OpenRead(file)))
{
string json = sr.ReadToEnd();
ElevationTileDesignator tile = ElevationTileDesignator.FromJSON<ElevationTileDesignator>(json);
// create bitmap if not created
if (bm == null)
{
bm = new Bitmap(tile.Columns * 24, tile.Rows * 24);
}
Bitmap bt = tile.ToBitmap();
if (createTIFFromTiles)
bt.Save(file.Replace(".loc",".tif"), System.Drawing.Imaging.ImageFormat.Tiff);
int col = (int)(tile.TileIndex[4] - 'A') * tile.Columns;
int row = (int)(tile.TileIndex[5] - 'A') * tile.Rows;
for (int i = 0; i < tile.Columns; i++)
{
for (int j = 0; j < tile.Rows; j++)
{
bm.SetPixel(col + i, bm.Height - row - bt.Height + j, bt.GetPixel(i, j));
}
}
pb_Picture.Image = bm;
}
}
if (bm != null)
bm.Save("ElevationTiles.tif", System.Drawing.Imaging.ImageFormat.Tiff);
}
private void btn_PictureFromTiles_Click(object sender, EventArgs e)
{
FolderBrowserDialog Dlg = new FolderBrowserDialog();
@ -787,38 +850,6 @@ namespace ElevationTileGenerator
if (Dlg.ShowDialog() == DialogResult.OK)
{
string[] files = Directory.GetFiles(Dlg.SelectedPath, "*.loc");
Bitmap bm = null;
double baselat, baselon;
string dir = Directory.GetParent(Dlg.SelectedPath).Name + Dlg.SelectedPath.Substring(Dlg.SelectedPath.LastIndexOf('\\')).Replace("\\", "");
MaidenheadLocator.LatLonFromLoc(dir, PositionInRectangle.BottomLeft, out baselat, out baselon);
foreach (string file in files)
{
tsl_Status.Text = "Processing " + Path.GetFileName(file) + "...";
Application.DoEvents();
using (StreamReader sr = new StreamReader(File.OpenRead(file)))
{
string json = sr.ReadToEnd();
ElevationTileDesignator tile = ElevationTileDesignator.FromJSON<ElevationTileDesignator>(json);
// create bitmap if not created
if (bm == null)
{
bm = new Bitmap(tile.Columns * 24, tile.Rows * 24);
}
Bitmap bt = tile.ToBitmap();
// bt.Save(Path.Combine(Dlg.SelectedPath, tile.TileIndex) + ".tif", System.Drawing.Imaging.ImageFormat.Tiff);
int col = (int)(tile.TileIndex[4] - 'A') * tile.Columns;
int row = (int)(tile.TileIndex[5] - 'A') * tile.Rows;
for (int i = 0; i < tile.Columns; i++)
{
for (int j = 0; j < tile.Rows; j++)
{
bm.SetPixel(col + i, bm.Height - row - bt.Height + j, bt.GetPixel(i, j));
}
}
}
}
if (bm != null)
bm.Save("ElevationTiles.tif", System.Drawing.Imaging.ImageFormat.Tiff);
}
}
@ -857,6 +888,429 @@ namespace ElevationTileGenerator
{
Delete();
}
private void Say(string txt)
{
if (tsl_Status.Text != txt)
{
tsl_Status.Text = txt;
this.Refresh();
Application.DoEvents();
}
}
private void btn_Compare_Tile1_Click(object sender, EventArgs e)
{
OpenFileDialog Dlg = new OpenFileDialog();
Dlg.CheckFileExists = true;
Dlg.Multiselect = true;
Dlg.Filter = "Elevation Files (*.hgt)|*.hgt|Zipped Elevation Files (*.zip)|*.zip";
if (Dlg.ShowDialog() == DialogResult.OK)
{
Files1.Clear();
if (Dlg.FileNames.Length > 1)
{
// multiple files selected
tb_Tile1.Text = string.Join(";", Dlg.FileNames);
}
else
{
// unzip if zip file selected
if (Path.GetExtension(Dlg.FileName) == ".zip")
{
// create ZIP file and add all loc files
ZipFile zip = new ZipFile(Dlg.FileName);
foreach (string filename in zip.EntryFileNames)
{
Files1.Add(Path.Combine(Path.GetTempPath(), "Files1", filename));
}
zip.ExtractAll(Path.Combine(Path.GetTempPath(), "Files1"), ExtractExistingFileAction.OverwriteSilently);
bool filemissing;
do
{
filemissing = false;
foreach (String filename in Files1)
{
if (!File.Exists(filename))
{
Application.DoEvents();
filemissing = true;
break;
}
}
Thread.Sleep(1000);
}
while (filemissing);
}
else
{
tb_Tile1.Text = Dlg.FileName;
Files1.Add(Dlg.FileName);
}
}
}
Properties.Settings.Default.Save();
}
private void btn_Compare_Tile2_Click(object sender, EventArgs e)
{
OpenFileDialog Dlg = new OpenFileDialog();
Dlg.CheckFileExists = true;
Dlg.Multiselect = true;
Dlg.Filter = "Elevation Files (*.hgt)|*.hgt|Zipped Elevation Files (*.zip)|*.zip";
if (Dlg.ShowDialog() == DialogResult.OK)
{
Files2.Clear();
if (Dlg.FileNames.Length > 1)
{
// multiple files selected
tb_Tile2.Text = string.Join(";", Dlg.FileNames);
}
else
{
// unzip if zip file selected
if (Path.GetExtension(Dlg.FileName) == ".zip")
{
// create ZIP file and add all loc files
ZipFile zip = new ZipFile(Dlg.FileName);
foreach (string filename in zip.EntryFileNames)
{
Files2.Add(Path.Combine(Path.GetTempPath(), "Files2", filename));
}
zip.ExtractAll(Path.Combine(Path.GetTempPath(), "Files2"), ExtractExistingFileAction.OverwriteSilently);
bool filemissing;
do
{
filemissing = false;
foreach (String filename in Files2)
{
if (!File.Exists(filename))
{
Application.DoEvents();
filemissing = true;
break;
}
}
Thread.Sleep(1000);
}
while (filemissing);
}
else
{
tb_Tile2.Text = Dlg.FileName;
Files2.Add(Dlg.FileName);
}
}
}
Properties.Settings.Default.Save();
}
private string FindinFiles2(string filename1)
{
foreach(string filename2 in Files2)
{
if (Path.GetFileName(filename1) == Path.GetFileName(filename2))
return filename2;
}
return "";
}
public Bitmap DrawElevationBitmapHGT(string filename)
{
int minelv = 0;
int maxelv = 0;
long length = new System.IO.FileInfo(filename).Length / 2;
// calculate bitmap dimensions
// get the x/y ratio first
int width = (int)Math.Sqrt(length);
int height = width;
short[,] elv = new short[width,height];
long diff = 0;
long voids = 0;
long count = 0;
long sum = 0;
using (var filestream = File.Open(filename, FileMode.Open))
using (var binaryStream = new BinaryReader(filestream))
{
for (int i = 0; i < width; i++)
{
for (int j = 0; j < height; j++)
{
elv[i, j] = binaryStream.ReadInt16();
if (elv[i, j] != 0)
diff++;
if (elv[i, j] == -512)
voids++;
if (elv[i, j] < minelv)
minelv = elv[i, j];
if (elv[i, j] > maxelv)
maxelv = elv[i, j];
count++;
if (count % 100000 == 0)
Say("Processing " + count.ToString() + " of " + length.ToString() + " points");
}
}
}
long[] d = new long[maxelv - minelv + 1];
for (int i = 0; i < d.Length; i++)
d[i] = 0;
DEMColorPalette palette = new DEMColorPalette();
Bitmap bm = new Bitmap(width, height);
for (int i = 0; i < width; i++)
{
// System.Console.WriteLine(i);
for (int j = 0; j < height; j++)
{
double e = (double)(elv[i,j] - minelv) / (double)(maxelv - minelv) * 100.0;
if (e < 0)
e = 0;
if (e > 100)
e = 100;
// count occurence of difference in an array
d[elv[i,j] - minelv]++;
sum += elv[i, j];
bm.SetPixel(i, height - j - 1, palette.GetColor(e));
}
}
using (StreamWriter sw = new StreamWriter("ElevationDifference.csv"))
{
sw.WriteLine("Difference[m];Count");
for (int i = 0; i < d.Length; i++)
{
sw.WriteLine((i + minelv).ToString() + ";" + d[i].ToString());
}
}
lbl_Diff_Dimensions.Text = width.ToString() + "x" + height.ToString();
lbl_Diff_Total.Text = diff.ToString();
lbl_Diff_Voids.Text = voids.ToString();
lbl_Diff_Min.Text = minelv.ToString();
lbl_Diff_Max.Text = maxelv.ToString();
lbl_Diff_Mean.Text = (sum / length).ToString("F2");
return bm;
}
private string CompareFilesHGT(string filename1, string filename2)
{
string difffilename = Path.Combine(Application.StartupPath, Path.GetFileName(filename1).Replace(".hgt",".hgtdiff"));
long length1 = new System.IO.FileInfo(filename1).Length / 2;
long length2 = new System.IO.FileInfo(filename2).Length / 2;
if (length1 != length2)
{
MessageBox.Show("Cannot compare files with different length: " + filename1 + "<>" + filename2);
return "";
}
long l = 0;
long diff = 0;
// delete diff file
try
{
File.Delete(difffilename);
FileStream fs1 = File.OpenRead(filename1);
FileStream fs2 = File.OpenRead(filename2);
using (BinaryReader br1 = new BinaryReader(fs1))
{
using (BinaryReader br2 = new BinaryReader(fs2))
{
using (BinaryWriter bw = new BinaryWriter(File.Create(difffilename)))
{
while (br1.BaseStream.Position < br1.BaseStream.Length)
{
byte[] b1 = br1.ReadBytes(2);
byte[] b2 = br2.ReadBytes(2);
Array.Reverse(b1);
Array.Reverse(b2);
short e1 = BitConverter.ToInt16(b1, 0);
short e2 = BitConverter.ToInt16(b2, 0);
short e = ElevationData.Database.ElvMissingFlag;
if ((e1 >= -500) && (e2 >= -500))
{
e = (short)(e1 - e2);
if (e > 1000)
Console.WriteLine("Error at position:" + br1.BaseStream.Position.ToString("0X"));
if (e != 0)
diff++;
}
bw.Write(e);
if (l % 100000 == 0)
{
Say("Comparing point " + l.ToString() + " of " + length1.ToString() + ": " + diff.ToString() + " differences");
}
l++;
}
}
}
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
return difffilename;
}
private void CompareFiles(string filename1, string filename2)
{
Stopwatch st = new Stopwatch();
st.Start();
if (Path.GetExtension(filename1) == ".hgt")
{
string difffilename = CompareFilesHGT(filename1, filename2);
tb_Diff.Text = difffilename;
Bitmap bm = DrawElevationBitmapHGT(difffilename);
pb_Picture.Image = bm;
bm.Save("ElevationDifference.tif", System.Drawing.Imaging.ImageFormat.Tiff);
pb_Picture.Image = bm;
}
st.Stop();
tsl_Status.Text = "Compare files: " + st.ElapsedMilliseconds.ToString() + "ms.";
this.Refresh();
}
private void btn_Compare_Click(object sender, EventArgs e)
{
foreach (string filename1 in Files1)
{
string filename2 = FindinFiles2(filename1);
if (!String.IsNullOrEmpty(filename2))
{
CompareFiles(filename1, filename2);
}
}
}
private void btn_ShowDiff_Click(object sender, EventArgs e)
{
OpenFileDialog Dlg = new OpenFileDialog();
Dlg.CheckFileExists = true;
Dlg.Multiselect = false;
Dlg.Filter = "Elevation Difference Files (*.hgtdiff)|*.hgtdiff";
if (Dlg.ShowDialog() == DialogResult.OK)
{
tb_Show_Diff.Text = Dlg.FileName;
Bitmap bm = DrawElevationBitmapHGT(tb_Show_Diff.Text);
pb_Diff.Image = bm;
}
Properties.Settings.Default.Save();
}
private void btn_PictureFromZIP_Click(object sender, EventArgs e)
{
OpenFileDialog Dlg = new OpenFileDialog();
Dlg.CheckFileExists = true;
Dlg.Multiselect = false;
Dlg.Filter = "Zipped Elevation Files (*.zip)|*.zip";
if (Dlg.ShowDialog() == DialogResult.OK)
{
string[] delfiles = Directory.GetFiles(Path.GetTempPath(), "*.loc");
foreach (string file in delfiles)
{
try
{
File.Delete(file);
}
catch
{
// do nothing
}
}
// unzip if zip file selected
if (Path.GetExtension(Dlg.FileName) == ".zip")
{
// create ZIP file and add all loc files
ZipFile zip = new ZipFile(Dlg.FileName);
zip.ExtractAll(Path.GetTempPath(), ExtractExistingFileAction.OverwriteSilently);
bool filemissing;
do
{
filemissing = false;
foreach (String filename in Files1)
{
if (!File.Exists(filename))
{
Application.DoEvents();
filemissing = true;
break;
}
}
Thread.Sleep(1000);
}
while (filemissing);
List<string> files = new List<string>();
foreach (string file in zip.EntryFileNames)
files.Add(Path.Combine(Path.GetTempPath(), file));
PictureFromTiles(files.ToArray());
}
else
{
tb_Tile1.Text = Dlg.FileName;
Files1.Add(Dlg.FileName);
}
}
}
private short GetSRTM1Elevation(BinaryReader br, int x, int y)
{
int rows = 3601;
int cols = 3601;
long l = (x * cols + y) * 2;
br.BaseStream.Seek(l,0);
byte[] b = br.ReadBytes(2);
Array.Reverse(b);
short e = BitConverter.ToInt16(b, 0);
return e;
}
private void ConvertSRTM1ToSRTM3File(string srtm1file, string srtm3file)
{
Say("Processing " + srtm1file);
using (BinaryReader br = new BinaryReader(File.OpenRead(srtm1file)))
{
using (BinaryWriter bw = new BinaryWriter(File.Create(srtm3file)))
{
short e = 0;
for (int i = 0; i < 1200; i++)
{
for (int j = 0; j < 1200; j++)
{
e = 0;
for (int k = 0; k < 3; k++)
{
for (int l = 0; l < 3; l++)
{
short elv = GetSRTM1Elevation(br, i * 3 + k, j * 3 + l);
e += elv;
}
}
e = (short)(e / 9);
bw.BaseStream.WriteByte((byte)((e >> 8) & 0xFF));
bw.BaseStream.WriteByte((byte)(e & 0xFF));
}
// write point #1201
bw.BaseStream.WriteByte((byte)((e >> 8) & 0xFF));
bw.BaseStream.WriteByte((byte)(e & 0xFF));
}
for (int j = 0; j < 1201; j++)
{
e= GetSRTM1Elevation(br, 3600, j * 3);
bw.BaseStream.WriteByte((byte)((e >> 8) & 0xFF));
bw.BaseStream.WriteByte((byte)(e & 0xFF));
}
}
}
Say("Ready.");
}
private void btn_ConvertSRTM1ToSRTM3_Click(object sender, EventArgs e)
{
string[] files = Directory.GetFiles(Properties.Settings.Default.SourceDir, "*.hgt");
foreach (string srtm1file in files)
{
if (!IsSRTM1File(srtm1file))
continue;
string srtm3file = Path.Combine(Properties.Settings.Default.DestDir, Path.GetFileName(srtm1file));
ConvertSRTM1ToSRTM3File(srtm1file, srtm3file);
}
}
}
[System.ComponentModel.DesignerCategory("")]

Wyświetl plik

@ -12,7 +12,7 @@ namespace ElevationTileGenerator.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@ -58,5 +58,29 @@ namespace ElevationTileGenerator.Properties {
this["Overwrite"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string Tile1 {
get {
return ((string)(this["Tile1"]));
}
set {
this["Tile1"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string Tile2 {
get {
return ((string)(this["Tile2"]));
}
set {
this["Tile2"] = value;
}
}
}
}

Wyświetl plik

@ -11,5 +11,11 @@
<Setting Name="Overwrite" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="Tile1" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="Tile2" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
</Settings>
</SettingsFile>

Wyświetl plik

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="net40" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net40" />
<package id="System.Data.SQLite.Core" version="1.0.112.0" targetFramework="net40" />
</packages>

Wyświetl plik

@ -1,5 +0,0 @@
repo: 4535e32c8607b09918d4b3415247cd7063d4a1a1
node: 871ebb856b1d3bc515193fc75393ad3e12b29905
branch: default
latesttag: 1.6
latesttagdistance: 112

Wyświetl plik

@ -1,24 +0,0 @@
a41a181da72e4724a7e3442ed6260f174a47e639 1.5 beta
a41a181da72e4724a7e3442ed6260f174a47e639 1.5.0.1
a41a181da72e4724a7e3442ed6260f174a47e639 1.5.0.1
0000000000000000000000000000000000000000 1.5.0.1
0000000000000000000000000000000000000000 1.5.0.1
d7c8a823dcfa8320d90e26490ef0df894d07beec 1.5.0.1
d7c8a823dcfa8320d90e26490ef0df894d07beec 1.5.0.1
0000000000000000000000000000000000000000 1.5.0.1
0000000000000000000000000000000000000000 1.5.0.1
9283af54b20b47c60ec16730c449468047a773d0 1.5.0.1
2b589a98ebb5da85bd4df8ea97a05dce10065376 1.5.1.1
5aa1baf7897fbe83ffc414f83daad717eeb7073a 1.5.1.2
2d0d554965044e588be7963c76f1ae01beaab029 1.5.1.3
2d0d554965044e588be7963c76f1ae01beaab029 1.5.1.3
0000000000000000000000000000000000000000 1.5.1.3
0000000000000000000000000000000000000000 1.5.1.3
940011f42d467102e820969c952fa78525724c45 1.5.1.3
940011f42d467102e820969c952fa78525724c45 1.5.1.3
0000000000000000000000000000000000000000 1.5.1.3
258a79e50af78a6586292b98ba7925144d493d32 1.5.3.1
3eb3a2e66d886e999ee6e39c747896df9cb47de3 1.5.3.2
4dd6c1c7428b74731d67e713f023f9714a45a369 1.5.3.3
32f7138ff593910cf788e8c9dd766716e8340042 1.5.5.5
dbfffa5b4adced279df1e089a153b51dbbc34d92 1.6

Wyświetl plik

@ -1,105 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GMap.NET", "GMap.NET", "{775C3C1A-44D3-41F4-9FC6-F83E39D3ABB8}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Demo", "Demo", "{4071E6E4-D401-4EF2-94B0-6F5257088116}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Testing", "Testing", "{A24009F2-84ED-4F0A-BC1C-8B05F474986A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Info", "Info", "{9EB13FA2-ADB7-4C90-A6DA-18EDFE256273}"
ProjectSection(SolutionItems) = preProject
Info\google maps.pdf = Info\google maps.pdf
Info\License.txt = Info\License.txt
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo.WindowsForms", "Demo.WindowsForms\Demo.WindowsForms.csproj", "{A2E07A76-8B2C-41A2-B23E-EA31AE94D706}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo.WindowsPresentation", "Demo.WindowsPresentation\Demo.WindowsPresentation.csproj", "{83195AEF-0071-471C-9E8B-E67211F5D028}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GMap.NET.Core", "GMap.NET.Core\GMap.NET.Core.csproj", "{D0C39D9D-BED0-418B-9A5E-713176CAF40C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GMap.NET.WindowsForms", "GMap.NET.WindowsForms\GMap.NET.WindowsForms.csproj", "{E06DEF77-F933-42FB-AFD7-DB2D0D8D6A98}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GMap.NET.WindowsPresentation", "GMap.NET.WindowsPresentation\GMap.NET.WindowsPresentation.csproj", "{644FE7D4-0184-400F-B2D7-99CB41360658}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TemplatedBinding", "Testing\TemplatedBinding\TemplatedBinding.csproj", "{C7CD6A76-D941-493F-91F8-6222AB87BECA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF-GMapControlNew", "Testing\WPF-GMapControlNew\WPF-GMapControlNew.csproj", "{B5A673B4-6286-4150-A536-1C16F3B8DC8B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo.StreetView", "Testing\Demo.StreetView\Demo.StreetView.csproj", "{B6E411A2-DFD8-461E-8207-BDBA405264CA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BigMapMaker", "Testing\BigMapMaker\BigMapMaker.csproj", "{A6E9D42C-935B-44D0-9FB0-E2E0319627D1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo.Clouds", "Testing\Demo.Clouds\Demo.Clouds.csproj", "{097FA134-51A5-4801-AADD-A1914EAA32FF}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Setup", "Setup", "{BA76BAF9-B8BB-46B3-89D2-3087524D80B0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GMap.NET - Hot Build", "Setup\GMap.NET - Hot Build\GMap.NET - Hot Build.csproj", "{C5E9D4B5-F9A8-4414-9B17-5A70DC2705C0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo.Docking", "Testing\Demo.Docking\Demo.Docking.csproj", "{F729FF99-2991-4819-9855-7CD7A1199089}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApplication", "Testing\ConsoleApplication\ConsoleApplication.csproj", "{448B761F-C033-447D-93D5-F4380A7DB0E2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A2E07A76-8B2C-41A2-B23E-EA31AE94D706}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A2E07A76-8B2C-41A2-B23E-EA31AE94D706}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A2E07A76-8B2C-41A2-B23E-EA31AE94D706}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A2E07A76-8B2C-41A2-B23E-EA31AE94D706}.Release|Any CPU.Build.0 = Release|Any CPU
{83195AEF-0071-471C-9E8B-E67211F5D028}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{83195AEF-0071-471C-9E8B-E67211F5D028}.Debug|Any CPU.Build.0 = Debug|Any CPU
{83195AEF-0071-471C-9E8B-E67211F5D028}.Release|Any CPU.ActiveCfg = Release|Any CPU
{83195AEF-0071-471C-9E8B-E67211F5D028}.Release|Any CPU.Build.0 = Release|Any CPU
{D0C39D9D-BED0-418B-9A5E-713176CAF40C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D0C39D9D-BED0-418B-9A5E-713176CAF40C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D0C39D9D-BED0-418B-9A5E-713176CAF40C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D0C39D9D-BED0-418B-9A5E-713176CAF40C}.Release|Any CPU.Build.0 = Release|Any CPU
{E06DEF77-F933-42FB-AFD7-DB2D0D8D6A98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E06DEF77-F933-42FB-AFD7-DB2D0D8D6A98}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E06DEF77-F933-42FB-AFD7-DB2D0D8D6A98}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E06DEF77-F933-42FB-AFD7-DB2D0D8D6A98}.Release|Any CPU.Build.0 = Release|Any CPU
{644FE7D4-0184-400F-B2D7-99CB41360658}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{644FE7D4-0184-400F-B2D7-99CB41360658}.Debug|Any CPU.Build.0 = Debug|Any CPU
{644FE7D4-0184-400F-B2D7-99CB41360658}.Release|Any CPU.ActiveCfg = Release|Any CPU
{644FE7D4-0184-400F-B2D7-99CB41360658}.Release|Any CPU.Build.0 = Release|Any CPU
{C7CD6A76-D941-493F-91F8-6222AB87BECA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C7CD6A76-D941-493F-91F8-6222AB87BECA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B5A673B4-6286-4150-A536-1C16F3B8DC8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B5A673B4-6286-4150-A536-1C16F3B8DC8B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B6E411A2-DFD8-461E-8207-BDBA405264CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B6E411A2-DFD8-461E-8207-BDBA405264CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A6E9D42C-935B-44D0-9FB0-E2E0319627D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A6E9D42C-935B-44D0-9FB0-E2E0319627D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{097FA134-51A5-4801-AADD-A1914EAA32FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{097FA134-51A5-4801-AADD-A1914EAA32FF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C5E9D4B5-F9A8-4414-9B17-5A70DC2705C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C5E9D4B5-F9A8-4414-9B17-5A70DC2705C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F729FF99-2991-4819-9855-7CD7A1199089}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F729FF99-2991-4819-9855-7CD7A1199089}.Release|Any CPU.ActiveCfg = Release|Any CPU
{448B761F-C033-447D-93D5-F4380A7DB0E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{448B761F-C033-447D-93D5-F4380A7DB0E2}.Release|Any CPU.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{D0C39D9D-BED0-418B-9A5E-713176CAF40C} = {775C3C1A-44D3-41F4-9FC6-F83E39D3ABB8}
{E06DEF77-F933-42FB-AFD7-DB2D0D8D6A98} = {775C3C1A-44D3-41F4-9FC6-F83E39D3ABB8}
{644FE7D4-0184-400F-B2D7-99CB41360658} = {775C3C1A-44D3-41F4-9FC6-F83E39D3ABB8}
{A2E07A76-8B2C-41A2-B23E-EA31AE94D706} = {4071E6E4-D401-4EF2-94B0-6F5257088116}
{83195AEF-0071-471C-9E8B-E67211F5D028} = {4071E6E4-D401-4EF2-94B0-6F5257088116}
{C7CD6A76-D941-493F-91F8-6222AB87BECA} = {A24009F2-84ED-4F0A-BC1C-8B05F474986A}
{B5A673B4-6286-4150-A536-1C16F3B8DC8B} = {A24009F2-84ED-4F0A-BC1C-8B05F474986A}
{B6E411A2-DFD8-461E-8207-BDBA405264CA} = {A24009F2-84ED-4F0A-BC1C-8B05F474986A}
{A6E9D42C-935B-44D0-9FB0-E2E0319627D1} = {A24009F2-84ED-4F0A-BC1C-8B05F474986A}
{097FA134-51A5-4801-AADD-A1914EAA32FF} = {A24009F2-84ED-4F0A-BC1C-8B05F474986A}
{F729FF99-2991-4819-9855-7CD7A1199089} = {A24009F2-84ED-4F0A-BC1C-8B05F474986A}
{448B761F-C033-447D-93D5-F4380A7DB0E2} = {A24009F2-84ED-4F0A-BC1C-8B05F474986A}
{C5E9D4B5-F9A8-4414-9B17-5A70DC2705C0} = {BA76BAF9-B8BB-46B3-89D2-3087524D80B0}
EndGlobalSection
EndGlobal

Wyświetl plik

@ -94,7 +94,7 @@ namespace GMap.NET.CacheProviders
return null;
}
internal void AddTileToMemoryCache(RawTile tile, byte[] data)
public void AddTileToMemoryCache(RawTile tile, byte[] data)
{
if(data != null)
{

Wyświetl plik

@ -113,8 +113,7 @@
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
<HintPath>..\..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="Npgsql, Version=2.0.11.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>

Wyświetl plik

@ -7,7 +7,7 @@ namespace GMap.NET.Internals
/// <summary>
/// cache queue item
/// </summary>
internal struct CacheQueueItem
public struct CacheQueueItem
{
public RawTile Tile;
public byte[] Img;
@ -31,7 +31,7 @@ namespace GMap.NET.Internals
}
}
internal enum CacheUsage
public enum CacheUsage
{
First = 2,
Second = 4,

Wyświetl plik

@ -6,7 +6,7 @@
/// <summary>
/// struct for raw tile
/// </summary>
internal struct RawTile
public struct RawTile
{
public int Type;
public GPoint Pos;

Wyświetl plik

@ -394,7 +394,7 @@ namespace GMap.NET.MapProviders
{
MemoryStream responseStream = Stuff.CopyStream(response.GetResponseStream(), false);
{
Debug.WriteLine("Response[" + responseStream.Length + " bytes]: " + url);
Console.WriteLine("Response[" + responseStream.Length + " bytes]: " + url);
if(responseStream.Length > 0)
{

Some files were not shown because too many files have changed in this diff Show More