kopia lustrzana https://github.com/dl2alf/AirScout
V1.3.1.0
rodzic
14eeaf8ffe
commit
c1b5b7b82e
|
@ -3,6 +3,12 @@
|
||||||
##
|
##
|
||||||
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
||||||
|
|
||||||
|
# Exclude internal projects
|
||||||
|
|
||||||
|
AirScoutDatabaseManager/
|
||||||
|
ElevationTileGenerator/
|
||||||
|
HorizonGenerator/
|
||||||
|
|
||||||
# User-specific files
|
# User-specific files
|
||||||
*.suo
|
*.suo
|
||||||
*.user
|
*.user
|
||||||
|
|
|
@ -0,0 +1,83 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="..\packages\ILMerge.3.0.29\build\ILMerge.props" Condition="Exists('..\packages\ILMerge.3.0.29\build\ILMerge.props')" />
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{23F584DB-EB5E-452D-B49F-7C1CABB713FF}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>AirScout.PlaneFeeds.Plugin.OpenSky</RootNamespace>
|
||||||
|
<AssemblyName>AirScout.PlaneFeeds.Plugin.OpenSky</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<Deterministic>true</Deterministic>
|
||||||
|
<NuGetPackageImportStamp>
|
||||||
|
</NuGetPackageImportStamp>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.ComponentModel.Composition" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Web.Extensions" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="OpenSky.cs" />
|
||||||
|
<Compile Include="Properties\Settings.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\AirScout.PlaneFeeds.Plugin\AirScout.PlaneFeeds.Plugin.csproj">
|
||||||
|
<Project>{36945dbd-96c8-41e7-9168-f83c42e67af3}</Project>
|
||||||
|
<Name>AirScout.PlaneFeeds.Plugin</Name>
|
||||||
|
<Private>False</Private>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="app.config" />
|
||||||
|
<None Include="packages.config" />
|
||||||
|
<None Include="Properties\Settings.settings">
|
||||||
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ErrorText>Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}".</ErrorText>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Error Condition="!Exists('..\packages\ILMerge.3.0.29\build\ILMerge.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ILMerge.3.0.29\build\ILMerge.props'))" />
|
||||||
|
<Error Condition="!Exists('..\packages\ILMerge.MSBuild.Task.1.0.7\build\ILMerge.MSBuild.Task.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ILMerge.MSBuild.Task.1.0.7\build\ILMerge.MSBuild.Task.targets'))" />
|
||||||
|
</Target>
|
||||||
|
<Import Project="..\packages\ILMerge.MSBuild.Task.1.0.7\build\ILMerge.MSBuild.Task.targets" Condition="Exists('..\packages\ILMerge.MSBuild.Task.1.0.7\build\ILMerge.MSBuild.Task.targets')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<PostBuildEvent>copy Z:\CSharp\AirScout\AirScout\AirScout.PlaneFeeds.Plugin.OpenSky\bin\Debug\ILMerge\*.dll Z:\CSharp\AirScout\AirScout\AirScout\bin\Debug\ /Y</PostBuildEvent>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
|
@ -0,0 +1,648 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.ComponentModel.Composition;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Globalization;
|
||||||
|
using AirScout.PlaneFeeds.Plugin.MEFContract;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Net;
|
||||||
|
using System.IO;
|
||||||
|
using System.Web.Script.Serialization;
|
||||||
|
using System.Xml.Linq;
|
||||||
|
using System.Xml.Serialization;
|
||||||
|
using System.Collections;
|
||||||
|
|
||||||
|
//TODO: Rename namespace to a name of your choice
|
||||||
|
namespace AirScout.PlaneFeeds.Plugin.OpenSky
|
||||||
|
{
|
||||||
|
|
||||||
|
//TODO: Rename settings class to a name of your choice
|
||||||
|
// Add any persistant setting here
|
||||||
|
// Use [Browsable(true/false)] to present the setting to the user and allow changes or not
|
||||||
|
// Use [CategoryAttribute("<description")] to group settings to categories
|
||||||
|
// Use [DescriptionAttribute("<description")] to add a description to this setting
|
||||||
|
// Use [DefaultValue(<value>)] to set a default value for this setting
|
||||||
|
// Use [XmlIgnore] if you don't want this setting to be ex-/imported, but stiil stored in settings file
|
||||||
|
// Example:
|
||||||
|
// [CategoryAttribute("Web Feed")]
|
||||||
|
// [DescriptionAttribute("Timeout for loading the site.")]
|
||||||
|
// [DefaultValue(30)]
|
||||||
|
// [XmlIgnore]
|
||||||
|
// public int Timeout { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Keeps all persistant settings of plugin
|
||||||
|
/// </summary>
|
||||||
|
public class OpenSkySettings
|
||||||
|
{
|
||||||
|
[Browsable(false)]
|
||||||
|
[DefaultValue("")]
|
||||||
|
[XmlIgnore]
|
||||||
|
public string DisclaimerAccepted { get; set; }
|
||||||
|
|
||||||
|
[Browsable(true)]
|
||||||
|
[CategoryAttribute("Web Feed")]
|
||||||
|
[DescriptionAttribute("Save downloaded JSON to file")]
|
||||||
|
[DefaultValue(false)]
|
||||||
|
[XmlIgnore]
|
||||||
|
public bool SaveToFile { get; set; }
|
||||||
|
|
||||||
|
[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%")]
|
||||||
|
public string URL { get; set; }
|
||||||
|
|
||||||
|
[Browsable(true)]
|
||||||
|
[CategoryAttribute("Web Feed")]
|
||||||
|
[DescriptionAttribute("Timeout for loading the site.")]
|
||||||
|
[DefaultValue(60)]
|
||||||
|
[XmlIgnore]
|
||||||
|
public int Timeout { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public OpenSkySettings()
|
||||||
|
{
|
||||||
|
Default();
|
||||||
|
Load(true);
|
||||||
|
// TODO:
|
||||||
|
}
|
||||||
|
|
||||||
|
// Methods für Load/Dave/Default, don't change!
|
||||||
|
|
||||||
|
#region Load/Save/Default
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets all properties to their default value according to the [DefaultValue=] attribute
|
||||||
|
/// </summary>
|
||||||
|
public void Default()
|
||||||
|
{
|
||||||
|
// set all properties to their default values according to definition in [DeafultValue=]
|
||||||
|
foreach (var p in this.GetType().GetProperties())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// initialize all properties with default value if set
|
||||||
|
if (Attribute.IsDefined(p, typeof(DefaultValueAttribute)))
|
||||||
|
{
|
||||||
|
p.SetValue(this, ((DefaultValueAttribute)Attribute.GetCustomAttribute(
|
||||||
|
p, typeof(DefaultValueAttribute)))?.Value, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("[" + this.GetType().Name + "]: Cannot set default value of: " + p.Name + ", " + ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Loads settings from a XML-formatted configuration file into settings.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="loadall">If true, ignore the [XmlIgnore] attribute, e.g. load all settings available in the file.<br>If false, load only settings without [XmlIgore] attrbute.</br></param>
|
||||||
|
/// <param name="filename">The filename of the settings file.</param>
|
||||||
|
public void Load(bool loadall, string filename = "")
|
||||||
|
{
|
||||||
|
// use standard filename if empty
|
||||||
|
// be careful because Linux file system is case sensitive
|
||||||
|
if (String.IsNullOrEmpty(filename))
|
||||||
|
filename = new Uri(Assembly.GetExecutingAssembly().GetName().CodeBase.Replace(".dll", ".cfg").Replace(".DLL", ".CFG")).LocalPath;
|
||||||
|
// do nothing if file not exists
|
||||||
|
if (!File.Exists(filename))
|
||||||
|
return;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string xml = "";
|
||||||
|
using (StreamReader sr = new StreamReader(File.OpenRead(filename)))
|
||||||
|
{
|
||||||
|
xml = sr.ReadToEnd();
|
||||||
|
}
|
||||||
|
XDocument xdoc = XDocument.Parse(xml);
|
||||||
|
PropertyInfo[] properties = this.GetType().GetProperties();
|
||||||
|
foreach (PropertyInfo p in properties)
|
||||||
|
{
|
||||||
|
if (!loadall)
|
||||||
|
{
|
||||||
|
// check on XmlIgnore attribute, skip if set
|
||||||
|
object[] attr = p.GetCustomAttributes(typeof(XmlIgnoreAttribute), false);
|
||||||
|
if (attr.Length > 0)
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// get matching element
|
||||||
|
XElement typenode = xdoc.Element(this.GetType().Name);
|
||||||
|
if (typenode != null)
|
||||||
|
{
|
||||||
|
XElement element = typenode.Element(p.Name);
|
||||||
|
if (element != null)
|
||||||
|
p.SetValue(this, Convert.ChangeType(element.Value, p.PropertyType), null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("[" + this.GetType().Name + "]: Error while loading property[" + p.Name + " from " + filename + ", " + ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("[" + this.GetType().Name + "]: Cannot load settings from " + filename + ", " + ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Saves settings from settings into a XML-formatted configuration file
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="saveall">If true, ignore the [XmlIgnore] attribute, e.g. save all settings.<br>If false, save only settings without [XmlIgore] attrbute.</param>
|
||||||
|
/// <param name="filename">The filename of the settings file.</param>
|
||||||
|
public void Save(bool saveall, string filename = "")
|
||||||
|
{
|
||||||
|
// use standard filename if empty
|
||||||
|
// be careful because Linux file system is case sensitive
|
||||||
|
if (String.IsNullOrEmpty(filename))
|
||||||
|
filename = new Uri(Assembly.GetExecutingAssembly().GetName().CodeBase.Replace(".dll", ".cfg").Replace(".DLL", ".CFG")).LocalPath;
|
||||||
|
XmlAttributeOverrides overrides = new XmlAttributeOverrides();
|
||||||
|
if (saveall)
|
||||||
|
{
|
||||||
|
// ovverride the XmlIgnore attributes to get all serialized
|
||||||
|
PropertyInfo[] properties = this.GetType().GetProperties();
|
||||||
|
foreach (PropertyInfo p in properties)
|
||||||
|
{
|
||||||
|
XmlAttributes attribs = new XmlAttributes { XmlIgnore = false };
|
||||||
|
overrides.Add(this.GetType(), p.Name, attribs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using (StreamWriter sw = new StreamWriter(File.Create(filename)))
|
||||||
|
{
|
||||||
|
XmlSerializer s = new XmlSerializer(this.GetType(), overrides);
|
||||||
|
s.Serialize(sw, this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new InvalidOperationException("[" + this.GetType().Name + "]: Cannot save settings to " + filename + ", " + ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
//TODO: Rename plugin class to a name of yout choice
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Holds the plane feed plugin class
|
||||||
|
/// </summary>
|
||||||
|
[Export(typeof(IPlaneFeedPlugin))]
|
||||||
|
[ExportMetadata("Name", "PlaneFeedPlugin")]
|
||||||
|
public class OpenSkyPlugin : IPlaneFeedPlugin
|
||||||
|
{
|
||||||
|
private OpenSkySettings Settings = new OpenSkySettings();
|
||||||
|
|
||||||
|
// start of interface
|
||||||
|
|
||||||
|
//TODO: Change return values so that they represent plugin's functionality
|
||||||
|
#region Interface
|
||||||
|
|
||||||
|
public string Name
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return "[WebFeed] OpenSky";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public string Version
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Info
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return "Web feed from the OpenSky Network.\n" +
|
||||||
|
"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";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public bool HasSettings
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool CanImport
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool CanExport
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Disclaimer
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string DisclaimerAccepted
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Settings.DisclaimerAccepted;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
Settings.DisclaimerAccepted = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ResetSettings()
|
||||||
|
{
|
||||||
|
Settings.Default();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void LoadSettings()
|
||||||
|
{
|
||||||
|
Settings.Load(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SaveSettings()
|
||||||
|
{
|
||||||
|
Settings.Save(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public object GetSettings()
|
||||||
|
{
|
||||||
|
return this.Settings;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ImportSettings()
|
||||||
|
{
|
||||||
|
// nothing to do
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ExportSettings()
|
||||||
|
{
|
||||||
|
// nothing to do
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Start(PlaneFeedPluginArgs args)
|
||||||
|
{
|
||||||
|
// add code for startup here
|
||||||
|
}
|
||||||
|
|
||||||
|
public PlaneFeedPluginPlaneInfoList GetPlanes(PlaneFeedPluginArgs args)
|
||||||
|
{
|
||||||
|
// intialize variables
|
||||||
|
VarConverter VC = new VarConverter();
|
||||||
|
VC.AddVar("APPDIR", args.AppDirectory);
|
||||||
|
VC.AddVar("DATADIR", args.AppDataDirectory);
|
||||||
|
VC.AddVar("LOGDIR", args.LogDirectory);
|
||||||
|
VC.AddVar("DATABASEDIR", args.DatabaseDirectory);
|
||||||
|
VC.AddVar("MINLAT", args.MinLat);
|
||||||
|
VC.AddVar("MAXLAT", args.MaxLat);
|
||||||
|
VC.AddVar("MINLON", args.MinLon);
|
||||||
|
VC.AddVar("MAXLON", args.MaxLon);
|
||||||
|
VC.AddVar("MINALTM", args.MinAlt);
|
||||||
|
VC.AddVar("MAXALTM", args.MaxAlt);
|
||||||
|
VC.AddVar("MINALTFT", (int)UnitConverter.m_ft((double)args.MinAlt));
|
||||||
|
VC.AddVar("MAXALTFT", (int)UnitConverter.m_ft((double)args.MaxAlt));
|
||||||
|
// initialize plane info list
|
||||||
|
PlaneFeedPluginPlaneInfoList planes = new PlaneFeedPluginPlaneInfoList();
|
||||||
|
string json = "";
|
||||||
|
// calculate url and get json
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
// save raw data to file if enabled
|
||||||
|
if (Settings.SaveToFile)
|
||||||
|
{
|
||||||
|
using (StreamWriter sw = new StreamWriter(args.TmpDirectory + Path.DirectorySeparatorChar + this.GetType().Name + "_" + DateTime.UtcNow.ToString("yyyy-MM-dd HH_mm_ss") + ".json"))
|
||||||
|
{
|
||||||
|
sw.WriteLine(json);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Console.WriteLine("[" + this.GetType().Name + "]: Analyzing data");
|
||||||
|
JavaScriptSerializer js = new JavaScriptSerializer();
|
||||||
|
dynamic root = js.Deserialize<dynamic>(json);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// analyze json string for planes data
|
||||||
|
// get the planes position list
|
||||||
|
var aclist = root["states"];
|
||||||
|
foreach (var ac in aclist)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// 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;
|
||||||
|
}
|
||||||
|
// skip if too few fields in record
|
||||||
|
if (len < 17)
|
||||||
|
continue;
|
||||||
|
PlaneFeedPluginPlaneInfo plane = new PlaneFeedPluginPlaneInfo();
|
||||||
|
// get hex first
|
||||||
|
plane.Hex = ReadPropertyString(ac, 0).ToUpper();
|
||||||
|
// get callsign
|
||||||
|
plane.Call = ReadPropertyString(ac, 1);
|
||||||
|
// get position
|
||||||
|
plane.Lon = ReadPropertyDouble(ac, 5);
|
||||||
|
plane.Lat = ReadPropertyDouble(ac, 6);
|
||||||
|
// get altitude (provided in m --> convert to ft)
|
||||||
|
plane.Alt = UnitConverter.m_ft(ReadPropertyDouble(ac, 13));
|
||||||
|
// get track
|
||||||
|
plane.Track = ReadPropertyDouble(ac, 10);
|
||||||
|
// get speed (provided in m/s --> convert to kts)
|
||||||
|
plane.Speed = UnitConverter.ms_kts(ReadPropertyDouble(ac, 9));
|
||||||
|
// registration is not provided
|
||||||
|
plane.Reg = "";
|
||||||
|
// get position timestamp in sec
|
||||||
|
int l = ReadPropertyInt(ac, 3);
|
||||||
|
if (l != int.MinValue)
|
||||||
|
{
|
||||||
|
DateTime timestamp = new System.DateTime(1970, 1, 1, 0, 0, 0, 0);
|
||||||
|
timestamp = timestamp.AddSeconds(l);
|
||||||
|
plane.Time = timestamp;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// skip plane if no valid timestamp found
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// get type info
|
||||||
|
plane.Type = ReadPropertyString(ac, 5);
|
||||||
|
planes.Add(plane);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("[" + System.Reflection.MethodBase.GetCurrentMethod().Name + "]" + ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
// do nothing if property is not found
|
||||||
|
}
|
||||||
|
Console.WriteLine("[" + this.GetType().Name + "]: Returning " + planes.Count + " planes");
|
||||||
|
return planes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Stop(PlaneFeedPluginArgs args)
|
||||||
|
{
|
||||||
|
// add code for stopping here
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
// End of interface
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************* Helpers ****************************************************
|
||||||
|
|
||||||
|
[System.Diagnostics.DebuggerNonUserCode]
|
||||||
|
private string ReadPropertyString(dynamic o, int propertyindex)
|
||||||
|
{
|
||||||
|
string s = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
s = o[propertyindex];
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
// do nothing if something went wrong
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.Diagnostics.DebuggerNonUserCode]
|
||||||
|
private int ReadPropertyInt(dynamic o, int propertyindex)
|
||||||
|
{
|
||||||
|
int i = int.MinValue;
|
||||||
|
double d = ReadPropertyDouble(o, propertyindex);
|
||||||
|
if ((d != double.MinValue) && (d >= int.MinValue) && (d <= int.MaxValue))
|
||||||
|
i = (int)d;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.Diagnostics.DebuggerNonUserCode]
|
||||||
|
private double ReadPropertyDouble(dynamic o, int propertyindex)
|
||||||
|
{
|
||||||
|
double d = double.MinValue;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string s = o[propertyindex].ToString(CultureInfo.InvariantCulture);
|
||||||
|
d = double.Parse(s, CultureInfo.InvariantCulture);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
// do nothing if something went wrong
|
||||||
|
}
|
||||||
|
return d;
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.Diagnostics.DebuggerNonUserCode]
|
||||||
|
private long ReadPropertyLong(dynamic o, int propertyindex)
|
||||||
|
{
|
||||||
|
long l = long.MinValue;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
l = long.Parse(o[propertyindex].ToString());
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
// do nothing if something went wrong
|
||||||
|
}
|
||||||
|
return l;
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.Diagnostics.DebuggerNonUserCode]
|
||||||
|
private bool ReadPropertyBool(dynamic o, int propertyindex)
|
||||||
|
{
|
||||||
|
bool b = false;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string s = o[propertyindex].ToString();
|
||||||
|
b = s.ToLower() == "true";
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
// do nothing if something went wrong
|
||||||
|
}
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class UnitConverter
|
||||||
|
{
|
||||||
|
public static double ft_m(double feet)
|
||||||
|
{
|
||||||
|
return feet / 3.28084;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static double m_ft(double m)
|
||||||
|
{
|
||||||
|
return m * 3.28084;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static double kts_kmh(double kts)
|
||||||
|
{
|
||||||
|
return kts * 1.852;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static double kmh_kts(double kmh)
|
||||||
|
{
|
||||||
|
return kmh / 1.852;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static double ms_kts(double ms)
|
||||||
|
{
|
||||||
|
return ms * 3.6 / 1.852;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static double km_mi(double km)
|
||||||
|
{
|
||||||
|
return km * 1.609;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static double mi_km(double mi)
|
||||||
|
{
|
||||||
|
return mi / 1.609;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class VarConverter : Dictionary<string, object>
|
||||||
|
{
|
||||||
|
public readonly char VarSeparator = '%';
|
||||||
|
|
||||||
|
public void AddVar(string var, object value)
|
||||||
|
{
|
||||||
|
// adds a new var<>value pair to dictionary
|
||||||
|
object o;
|
||||||
|
if (this.TryGetValue(var, out o))
|
||||||
|
{
|
||||||
|
// item found --> update value
|
||||||
|
o = value;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// item not found --> add new
|
||||||
|
this.Add(var, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public object GetValue(string var)
|
||||||
|
{
|
||||||
|
// finds a var in dictionary and returns its value
|
||||||
|
object o;
|
||||||
|
if (this.TryGetValue(var, out o))
|
||||||
|
{
|
||||||
|
// item found --> return value
|
||||||
|
return o;
|
||||||
|
}
|
||||||
|
// item not found --> return null
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string ReplaceAllVars(string s)
|
||||||
|
{
|
||||||
|
// check for var separotors first
|
||||||
|
if (s.Contains(VarSeparator))
|
||||||
|
{
|
||||||
|
// OK, string is containing vars --> crack the string first and replace vars
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string[] a = s.Split(VarSeparator);
|
||||||
|
// as we are always using a pair of separators the length of a[] must be odd
|
||||||
|
if (a.Length % 2 == 0)
|
||||||
|
throw new ArgumentException("Number of separators is not an even number.");
|
||||||
|
// create new string and replace all vars (on odd indices)
|
||||||
|
s = "";
|
||||||
|
for (int i = 0; i < a.Length; i++)
|
||||||
|
{
|
||||||
|
if (i % 2 == 0)
|
||||||
|
{
|
||||||
|
// cannot be not a var on that position
|
||||||
|
s = s + a[i];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// var identifier: upper the string and try to convert
|
||||||
|
a[i] = a[i].ToUpper();
|
||||||
|
object o;
|
||||||
|
if (this.TryGetValue(a[i], out o))
|
||||||
|
{
|
||||||
|
// convert floating points with invariant culture info
|
||||||
|
if (o.GetType() == typeof(double))
|
||||||
|
s = s + ((double)o).ToString(CultureInfo.InvariantCulture);
|
||||||
|
else if (o.GetType() == typeof(float))
|
||||||
|
s = s + ((float)o).ToString(CultureInfo.InvariantCulture);
|
||||||
|
else
|
||||||
|
s = s + o.ToString();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new ArgumentException("Var identifier not found: " + a[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
// throw an excecption
|
||||||
|
throw new ArgumentException("Error while parsing string for variables [" + ex.Message + "]: " + s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||||
|
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||||
|
// die einer Assembly zugeordnet sind.
|
||||||
|
[assembly: AssemblyTitle("AirScout.PlaneFeeds.Plugin.OpenSky")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("AirScout.PlaneFeeds.Plugin.OpenSky")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2020")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
|
||||||
|
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
|
||||||
|
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
|
||||||
|
[assembly: Guid("db85e98a-e209-49d0-b6cf-6cdd5b8e20e3")]
|
||||||
|
|
||||||
|
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||||
|
//
|
||||||
|
// Hauptversion
|
||||||
|
// Nebenversion
|
||||||
|
// Buildnummer
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// 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")]
|
|
@ -0,0 +1,26 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// Dieser Code wurde von einem Tool generiert.
|
||||||
|
// Laufzeitversion:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||||
|
// der Code erneut generiert wird.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace AirScout.PlaneFeeds.Plugin.OpenSky.Properties {
|
||||||
|
|
||||||
|
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
[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())));
|
||||||
|
|
||||||
|
public static Settings Default {
|
||||||
|
get {
|
||||||
|
return defaultInstance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||||
|
<Profiles />
|
||||||
|
<Settings />
|
||||||
|
</SettingsFile>
|
|
@ -0,0 +1,61 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<configSections>
|
||||||
|
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||||
|
<section name="AirScout.PlaneFeeds.Plugin.PlaneFinder.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||||
|
</sectionGroup>
|
||||||
|
</configSections>
|
||||||
|
<userSettings>
|
||||||
|
<AirScout.PlaneFeeds.Plugin.PlaneFinder.Properties.Settings>
|
||||||
|
<setting name="Info" serializeAs="String">
|
||||||
|
<value>Web feed from www.planefinder.net
|
||||||
|
See https://planefinder.net/
|
||||||
|
|
||||||
|
(c) AirScout (www.airscout.eu)
|
||||||
|
|
||||||
|
This feed does not require a login or API key.
|
||||||
|
</value>
|
||||||
|
</setting>
|
||||||
|
<setting name="Name" serializeAs="String">
|
||||||
|
<value>[WebFeed] www.planefinder.net</value>
|
||||||
|
</setting>
|
||||||
|
<setting name="Disclaimer" serializeAs="String">
|
||||||
|
<value>This plane feed is being fetched from an Internet server via Deep Link
|
||||||
|
technology (see http://en.wikipedia.org/wiki/Deep_link).
|
||||||
|
|
||||||
|
The use is not intended by the website owners and could be changed in URL and data format frequently and without further notice.
|
||||||
|
Furthermore, it might cause legal issues in some countries.
|
||||||
|
|
||||||
|
By clicking on "Accept" you understand that you are
|
||||||
|
|
||||||
|
DOING THAT ON YOUR OWN RISK
|
||||||
|
|
||||||
|
The auhor of this software will not be responsible in any case.</value>
|
||||||
|
</setting>
|
||||||
|
<setting name="Disclaimer_Accepted" serializeAs="String">
|
||||||
|
<value />
|
||||||
|
</setting>
|
||||||
|
<setting name="URL" serializeAs="String">
|
||||||
|
<value>http://droidapp.pinkfroot.com/APPAPIDROID/v7/planeUpdateFAA.php?routetype=IATA&amp;FAA=1&amp;bounds=%MAXLAT%,%MINLAT%,%MINLON%,%MAXLON%</value>
|
||||||
|
</setting>
|
||||||
|
<setting name="SaveToFile" serializeAs="String">
|
||||||
|
<value>False</value>
|
||||||
|
</setting>
|
||||||
|
<setting name="Version" serializeAs="String">
|
||||||
|
<value />
|
||||||
|
</setting>
|
||||||
|
<setting name="HasSettings" serializeAs="String">
|
||||||
|
<value>True</value>
|
||||||
|
</setting>
|
||||||
|
<setting name="CanImport" serializeAs="String">
|
||||||
|
<value>False</value>
|
||||||
|
</setting>
|
||||||
|
<setting name="CanExport" serializeAs="String">
|
||||||
|
<value>False</value>
|
||||||
|
</setting>
|
||||||
|
<setting name="Timeout" serializeAs="String">
|
||||||
|
<value>30</value>
|
||||||
|
</setting>
|
||||||
|
</AirScout.PlaneFeeds.Plugin.PlaneFinder.Properties.Settings>
|
||||||
|
</userSettings>
|
||||||
|
</configuration>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="ILMerge" version="3.0.29" targetFramework="net40" />
|
||||||
|
<package id="ILMerge.MSBuild.Task" version="1.0.7" targetFramework="net40" />
|
||||||
|
</packages>
|
|
@ -1,4 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
@ -35,7 +35,7 @@ namespace AirScout.PlaneFeeds.Plugin.PlaneFinder
|
||||||
[Browsable(true)]
|
[Browsable(true)]
|
||||||
[CategoryAttribute("Web Feed")]
|
[CategoryAttribute("Web Feed")]
|
||||||
[DescriptionAttribute("Base URL for website.")]
|
[DescriptionAttribute("Base URL for website.")]
|
||||||
[DefaultValue("http://droidapp.pinkfroot.com/APPAPIDROID/v7/planeUpdateFAA.php?routetype=IATA&FAA=1&bounds=%MAXLAT%,%MINLAT%,%MINLON%,%MAXLON%")]
|
[DefaultValue("http://droidapp.pinkfroot.com/APPAPIDROID/v7/planeUpdateFAA.php?routetype=IATA&FAA=1&bounds=%MAXLAT%,%MINLAT%,%MINLON%,%MAXLON%")]
|
||||||
public string URL { get; set; }
|
public string URL { get; set; }
|
||||||
|
|
||||||
[Browsable(true)]
|
[Browsable(true)]
|
||||||
|
@ -310,9 +310,8 @@ namespace AirScout.PlaneFeeds.Plugin.PlaneFinder
|
||||||
String url = VC.ReplaceAllVars(Settings.URL);
|
String url = VC.ReplaceAllVars(Settings.URL);
|
||||||
Console.WriteLine("[" + this.GetType().Name + "]: Creating web request: " + url);
|
Console.WriteLine("[" + this.GetType().Name + "]: Creating web request: " + url);
|
||||||
HttpWebRequest webrequest = (HttpWebRequest)HttpWebRequest.Create(url);
|
HttpWebRequest webrequest = (HttpWebRequest)HttpWebRequest.Create(url);
|
||||||
webrequest.Referer = "http://planefinder.net/";
|
|
||||||
webrequest.Timeout = Settings.Timeout * 1000;
|
webrequest.Timeout = Settings.Timeout * 1000;
|
||||||
webrequest.UserAgent = "Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130807 Firefox/17.0";
|
webrequest.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0";
|
||||||
Console.WriteLine("[" + this.GetType().Name + "]: Getting web response");
|
Console.WriteLine("[" + this.GetType().Name + "]: Getting web response");
|
||||||
HttpWebResponse webresponse = (HttpWebResponse)webrequest.GetResponse();
|
HttpWebResponse webresponse = (HttpWebResponse)webrequest.GetResponse();
|
||||||
Console.WriteLine("[" + this.GetType().Name + "]: Reading stream");
|
Console.WriteLine("[" + this.GetType().Name + "]: Reading stream");
|
||||||
|
|
|
@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
|
||||||
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||||
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||||
// die einer Assembly zugeordnet sind.
|
// die einer Assembly zugeordnet sind.
|
||||||
[assembly: AssemblyTitle("AirScout.PlaneFeeds.Plugin.PlaneFinder")]
|
[assembly: AssemblyTitle("AirScout.PlaneFeeds.Plugin.Template")]
|
||||||
[assembly: AssemblyDescription("")]
|
[assembly: AssemblyDescription("")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("")]
|
[assembly: AssemblyCompany("")]
|
||||||
[assembly: AssemblyProduct("AirScout.PlaneFeeds.Plugin.PlaneFinder")]
|
[assembly: AssemblyProduct("AirScout.PlaneFeeds.Plugin.Template")]
|
||||||
[assembly: AssemblyCopyright("Copyright © 2020")]
|
[assembly: AssemblyCopyright("Copyright © 2020")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
|
@ -77,7 +77,7 @@
|
||||||
<Error Condition="!Exists('..\packages\ILMerge.MSBuild.Task.1.0.7\build\ILMerge.MSBuild.Task.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ILMerge.MSBuild.Task.1.0.7\build\ILMerge.MSBuild.Task.targets'))" />
|
<Error Condition="!Exists('..\packages\ILMerge.MSBuild.Task.1.0.7\build\ILMerge.MSBuild.Task.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ILMerge.MSBuild.Task.1.0.7\build\ILMerge.MSBuild.Task.targets'))" />
|
||||||
</Target>
|
</Target>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PostBuildEvent>copy $(OutDir)\ILMerge\*.$(TargetExt) $(OutDir) /Y</PostBuildEvent>
|
<PostBuildEvent>copy $(ProjectDir)\$(OutDir)\ILMerge\*$(TargetExt) $(SolutionDir)\Airscout\$(OutDir) /y</PostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="..\packages\ILMerge.MSBuild.Task.1.0.7\build\ILMerge.MSBuild.Task.targets" Condition="Exists('..\packages\ILMerge.MSBuild.Task.1.0.7\build\ILMerge.MSBuild.Task.targets')" />
|
<Import Project="..\packages\ILMerge.MSBuild.Task.1.0.7\build\ILMerge.MSBuild.Task.targets" Condition="Exists('..\packages\ILMerge.MSBuild.Task.1.0.7\build\ILMerge.MSBuild.Task.targets')" />
|
||||||
</Project>
|
</Project>
|
41
AirScout.sln
41
AirScout.sln
|
@ -73,8 +73,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirScout.PlaneFeeds.Plugin.
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirScout.PlaneFeeds", "AirScout.PlaneFeeds\AirScout.PlaneFeeds.csproj", "{EA78AD40-1505-406F-8049-744E58D93F54}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirScout.PlaneFeeds", "AirScout.PlaneFeeds\AirScout.PlaneFeeds.csproj", "{EA78AD40-1505-406F-8049-744E58D93F54}"
|
||||||
EndProject
|
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}") = "AirScout.PlaneFeeds.Plugin.RTL1090", "AirScout.PlaneFeeds.Plugin.RTL1090\AirScout.PlaneFeeds.Plugin.RTL1090.csproj", "{4225D870-2CCB-4E6A-965C-AA005CB1C36C}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirScout.PlaneFeeds.Plugin.RTL1090", "AirScout.PlaneFeeds.Plugin.RTL1090\AirScout.PlaneFeeds.Plugin.RTL1090.csproj", "{4225D870-2CCB-4E6A-965C-AA005CB1C36C}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirScout.PlaneFeeds.Plugin.FlexJSON", "AirScout.PlaneFeeds.Plugin.FlexJSON\AirScout.PlaneFeeds.Plugin.FlexJSON.csproj", "{F1689770-0F8F-4716-B0FF-817D1319827E}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirScout.PlaneFeeds.Plugin.FlexJSON", "AirScout.PlaneFeeds.Plugin.FlexJSON\AirScout.PlaneFeeds.Plugin.FlexJSON.csproj", "{F1689770-0F8F-4716-B0FF-817D1319827E}"
|
||||||
|
@ -85,6 +83,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirScout.PlaneFeeds.Plugin.
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirScout_Cleanup", "AirScout_Cleanup\AirScout_Cleanup.csproj", "{4DDDB65C-0E40-4A69-8775-5B4152C3196D}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirScout_Cleanup", "AirScout_Cleanup\AirScout_Cleanup.csproj", "{4DDDB65C-0E40-4A69-8775-5B4152C3196D}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirScout.PlaneFeeds.Plugin.OpenSky", "AirScout.PlaneFeeds.Plugin.OpenSky\AirScout.PlaneFeeds.Plugin.OpenSky.csproj", "{23F584DB-EB5E-452D-B49F-7C1CABB713FF}"
|
||||||
|
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
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
@ -491,17 +493,6 @@ Global
|
||||||
{EA78AD40-1505-406F-8049-744E58D93F54}.Release|Mixed Platforms.Build.0 = Release|x86
|
{EA78AD40-1505-406F-8049-744E58D93F54}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||||
{EA78AD40-1505-406F-8049-744E58D93F54}.Release|x86.ActiveCfg = Release|x86
|
{EA78AD40-1505-406F-8049-744E58D93F54}.Release|x86.ActiveCfg = Release|x86
|
||||||
{EA78AD40-1505-406F-8049-744E58D93F54}.Release|x86.Build.0 = Release|x86
|
{EA78AD40-1505-406F-8049-744E58D93F54}.Release|x86.Build.0 = Release|x86
|
||||||
{DB85E98A-E209-49D0-B6CF-6CDD5B8E20E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{DB85E98A-E209-49D0-B6CF-6CDD5B8E20E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{DB85E98A-E209-49D0-B6CF-6CDD5B8E20E3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
|
||||||
{DB85E98A-E209-49D0-B6CF-6CDD5B8E20E3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
|
||||||
{DB85E98A-E209-49D0-B6CF-6CDD5B8E20E3}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{DB85E98A-E209-49D0-B6CF-6CDD5B8E20E3}.Debug|x86.Build.0 = Debug|Any CPU
|
|
||||||
{DB85E98A-E209-49D0-B6CF-6CDD5B8E20E3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{DB85E98A-E209-49D0-B6CF-6CDD5B8E20E3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
|
||||||
{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
|
|
||||||
{4225D870-2CCB-4E6A-965C-AA005CB1C36C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{4225D870-2CCB-4E6A-965C-AA005CB1C36C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{4225D870-2CCB-4E6A-965C-AA005CB1C36C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{4225D870-2CCB-4E6A-965C-AA005CB1C36C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{4225D870-2CCB-4E6A-965C-AA005CB1C36C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
{4225D870-2CCB-4E6A-965C-AA005CB1C36C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||||
|
@ -558,6 +549,30 @@ Global
|
||||||
{4DDDB65C-0E40-4A69-8775-5B4152C3196D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
{4DDDB65C-0E40-4A69-8775-5B4152C3196D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||||
{4DDDB65C-0E40-4A69-8775-5B4152C3196D}.Release|x86.ActiveCfg = Release|Any CPU
|
{4DDDB65C-0E40-4A69-8775-5B4152C3196D}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{4DDDB65C-0E40-4A69-8775-5B4152C3196D}.Release|x86.Build.0 = Release|Any CPU
|
{4DDDB65C-0E40-4A69-8775-5B4152C3196D}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{23F584DB-EB5E-452D-B49F-7C1CABB713FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{23F584DB-EB5E-452D-B49F-7C1CABB713FF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{23F584DB-EB5E-452D-B49F-7C1CABB713FF}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||||
|
{23F584DB-EB5E-452D-B49F-7C1CABB713FF}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||||
|
{23F584DB-EB5E-452D-B49F-7C1CABB713FF}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{23F584DB-EB5E-452D-B49F-7C1CABB713FF}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{23F584DB-EB5E-452D-B49F-7C1CABB713FF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{23F584DB-EB5E-452D-B49F-7C1CABB713FF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{23F584DB-EB5E-452D-B49F-7C1CABB713FF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||||
|
{23F584DB-EB5E-452D-B49F-7C1CABB713FF}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||||
|
{23F584DB-EB5E-452D-B49F-7C1CABB713FF}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{23F584DB-EB5E-452D-B49F-7C1CABB713FF}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{DB85E98A-E209-49D0-B6CF-6CDD5B8E20E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{DB85E98A-E209-49D0-B6CF-6CDD5B8E20E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{DB85E98A-E209-49D0-B6CF-6CDD5B8E20E3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||||
|
{DB85E98A-E209-49D0-B6CF-6CDD5B8E20E3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||||
|
{DB85E98A-E209-49D0-B6CF-6CDD5B8E20E3}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{DB85E98A-E209-49D0-B6CF-6CDD5B8E20E3}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{DB85E98A-E209-49D0-B6CF-6CDD5B8E20E3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{DB85E98A-E209-49D0-B6CF-6CDD5B8E20E3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{DB85E98A-E209-49D0-B6CF-6CDD5B8E20E3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||||
|
{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
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|
|
@ -277,6 +277,7 @@
|
||||||
<Compile Include="Splash.Designer.cs">
|
<Compile Include="Splash.Designer.cs">
|
||||||
<DependentUpon>Splash.cs</DependentUpon>
|
<DependentUpon>Splash.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="TooltipDataPoint.cs" />
|
||||||
<Compile Include="TrafficDlg.cs">
|
<Compile Include="TrafficDlg.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
|
|
@ -49,6 +49,7 @@ namespace AirScout
|
||||||
|
|
||||||
private void FirstRunWizard_Load(object sender, EventArgs e)
|
private void FirstRunWizard_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
this.Text = "Welcome to AirScout - Aircraft Scatter Prediction V" + Application.ProductVersion + " (c) 2013-2020 DL2ALF";
|
||||||
Log.WriteMessage("Loading.");
|
Log.WriteMessage("Loading.");
|
||||||
// set initial settings for CoverageMap
|
// set initial settings for CoverageMap
|
||||||
GMap.NET.MapProviders.GMapProvider.UserAgent = "AirScout";
|
GMap.NET.MapProviders.GMapProvider.UserAgent = "AirScout";
|
||||||
|
@ -341,16 +342,19 @@ namespace AirScout
|
||||||
// estimate disk space needed = tilecount * tilesize * 150%
|
// estimate disk space needed = tilecount * tilesize * 150%
|
||||||
long spaceneeded = (long)tilecount * (long)(250 * 3 / 2);
|
long spaceneeded = (long)tilecount * (long)(250 * 3 / 2);
|
||||||
string rootdrive = Path.GetPathRoot(ElevationData.Database.DefaultDatabaseDirectory(ELEVATIONMODEL.GLOBE));
|
string rootdrive = Path.GetPathRoot(ElevationData.Database.DefaultDatabaseDirectory(ELEVATIONMODEL.GLOBE));
|
||||||
if (SupportFunctions.GetDriveAvailableFreeSpace(rootdrive) < spaceneeded)
|
long spaceavailable = SupportFunctions.GetDriveAvailableFreeSpace(rootdrive);
|
||||||
|
// check for available disk space, skip on zero (cannot determine)
|
||||||
|
if ((spaceavailable > 0) && (spaceavailable < spaceneeded))
|
||||||
{
|
{
|
||||||
// show message box
|
// show message box
|
||||||
MessageBox.Show("Not enough disk space for elevation database.\n\nAvailable: " + SupportFunctions.GetDriveAvailableFreeSpace(rootdrive) + " bytes.\nNeeded: " + spaceneeded + "bytes.\n\nUncheck this option or try to enlarge free space on disk.", "Not enough disk space");
|
MessageBox.Show("Not enough disk space for elevation database.\n\nAvailable: " + spaceavailable + " bytes.\nNeeded: " + spaceneeded + "bytes.\n\nUncheck this option or try to enlarge free space on disk.", "Not enough disk space");
|
||||||
wp_GLOBE.AllowNext = false;
|
wp_GLOBE.AllowNext = false;
|
||||||
}
|
}
|
||||||
if (SupportFunctions.GetDriveMaxFileSize(rootdrive) < spaceneeded)
|
long maxfilesize = SupportFunctions.GetDriveMaxFileSize(rootdrive);
|
||||||
|
if ((maxfilesize > 0) && (maxfilesize < spaceneeded))
|
||||||
{
|
{
|
||||||
// show message box
|
// show message box
|
||||||
MessageBox.Show("The elevation database will exceed maximum allowed filesize for this file system.\n\nAllowed: " + SupportFunctions.GetDriveMaxFileSize(rootdrive) + " bytes.\nNeeded: " + spaceneeded + "bytes.\n\nUncheck this option or change file system on disk.", "File size exceeded");
|
MessageBox.Show("The elevation database will exceed maximum allowed filesize for this file system.\n\nAllowed: " + maxfilesize + " bytes.\nNeeded: " + spaceneeded + "bytes.\n\nUncheck this option or change file system on disk.", "File size exceeded");
|
||||||
wp_GLOBE.AllowNext = false;
|
wp_GLOBE.AllowNext = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -491,16 +495,19 @@ namespace AirScout
|
||||||
// estimate disk space needed = tilecount * tilesize * 150%
|
// estimate disk space needed = tilecount * tilesize * 150%
|
||||||
long spaceneeded = (long)tilecount * (long)(10000 * 3 / 2);
|
long spaceneeded = (long)tilecount * (long)(10000 * 3 / 2);
|
||||||
string rootdrive = Path.GetPathRoot(ElevationData.Database.DefaultDatabaseDirectory(ELEVATIONMODEL.SRTM3));
|
string rootdrive = Path.GetPathRoot(ElevationData.Database.DefaultDatabaseDirectory(ELEVATIONMODEL.SRTM3));
|
||||||
if (SupportFunctions.GetDriveAvailableFreeSpace(rootdrive) < spaceneeded)
|
long spaceavailable = SupportFunctions.GetDriveAvailableFreeSpace(rootdrive);
|
||||||
|
// check for available disk space, skip on zero (cannot determine)
|
||||||
|
if ((spaceavailable > 0) && (spaceavailable < spaceneeded))
|
||||||
{
|
{
|
||||||
// show message box
|
// show message box
|
||||||
MessageBox.Show("Not enough disk space for elevation database.\n\nAvailable: " + SupportFunctions.GetDriveAvailableFreeSpace(rootdrive) + " bytes.\nNeeded: " + spaceneeded + "bytes.\n\nUncheck this option or try to enlarge free space on disk.", "Not enough disk space");
|
MessageBox.Show("Not enough disk space for elevation database.\n\nAvailable: " + spaceavailable + " bytes.\nNeeded: " + spaceneeded + "bytes.\n\nUncheck this option or try to enlarge free space on disk.", "Not enough disk space");
|
||||||
wp_SRTM3.AllowNext = false;
|
wp_SRTM3.AllowNext = false;
|
||||||
}
|
}
|
||||||
if (SupportFunctions.GetDriveMaxFileSize(rootdrive) < spaceneeded)
|
long maxfilesize = SupportFunctions.GetDriveMaxFileSize(rootdrive);
|
||||||
|
if ((maxfilesize > 0) && (maxfilesize < spaceneeded))
|
||||||
{
|
{
|
||||||
// show message box
|
// show message box
|
||||||
MessageBox.Show("The elevation database will exceed maximum allowed filesize for this file system.\n\nAllowed: " + SupportFunctions.GetDriveMaxFileSize(rootdrive) + " bytes.\nNeeded: " + spaceneeded + "bytes.\n\nUncheck this option or change file system on disk.", "File size exceeded");
|
MessageBox.Show("The elevation database will exceed maximum allowed filesize for this file system.\n\nAllowed: " + maxfilesize + " bytes.\nNeeded: " + spaceneeded + "bytes.\n\nUncheck this option or change file system on disk.", "File size exceeded");
|
||||||
wp_SRTM3.AllowNext = false;
|
wp_SRTM3.AllowNext = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -636,16 +643,19 @@ namespace AirScout
|
||||||
// estimate disk space needed = tilecount * tilesize * 150%
|
// estimate disk space needed = tilecount * tilesize * 150%
|
||||||
long spaceneeded = (long)tilecount * (long)(100000 * 3 / 2);
|
long spaceneeded = (long)tilecount * (long)(100000 * 3 / 2);
|
||||||
string rootdrive = Path.GetPathRoot(ElevationData.Database.DefaultDatabaseDirectory(ELEVATIONMODEL.SRTM1));
|
string rootdrive = Path.GetPathRoot(ElevationData.Database.DefaultDatabaseDirectory(ELEVATIONMODEL.SRTM1));
|
||||||
if (SupportFunctions.GetDriveAvailableFreeSpace(rootdrive) < spaceneeded)
|
long spaceavailable = SupportFunctions.GetDriveAvailableFreeSpace(rootdrive);
|
||||||
|
// check for available disk space, skip on zero (cannot determine)
|
||||||
|
if ((spaceavailable > 0) && (spaceavailable < spaceneeded))
|
||||||
{
|
{
|
||||||
// show message box
|
// show message box
|
||||||
MessageBox.Show("Not enough disk space for elevation database.\n\nAvailable: " + SupportFunctions.GetDriveAvailableFreeSpace(rootdrive) + " bytes.\nNeeded: " + spaceneeded + "bytes.\n\nUncheck this option or try to enlarge free space on disk.", "Not enough disk space");
|
MessageBox.Show("Not enough disk space for elevation database.\n\nAvailable: " + spaceavailable + " bytes.\nNeeded: " + spaceneeded + "bytes.\n\nUncheck this option or try to enlarge free space on disk.", "Not enough disk space");
|
||||||
wp_SRTM1.AllowNext = false;
|
wp_SRTM1.AllowNext = false;
|
||||||
}
|
}
|
||||||
if (SupportFunctions.GetDriveMaxFileSize(rootdrive) < spaceneeded)
|
long maxfilesize = SupportFunctions.GetDriveMaxFileSize(rootdrive);
|
||||||
|
if ((maxfilesize > 0) && (maxfilesize < spaceneeded))
|
||||||
{
|
{
|
||||||
// show message box
|
// show message box
|
||||||
MessageBox.Show("The elevation database will exceed maximum allowed filesize for this file system.\n\nAllowed: " + SupportFunctions.GetDriveMaxFileSize(rootdrive) + " bytes.\nNeeded: " + spaceneeded + "bytes.\n\nUncheck this option or change file system on disk.", "File size exceeded");
|
MessageBox.Show("The elevation database will exceed maximum allowed filesize for this file system.\n\nAllowed: " + maxfilesize + " bytes.\nNeeded: " + spaceneeded + "bytes.\n\nUncheck this option or change file system on disk.", "File size exceeded");
|
||||||
wp_SRTM1.AllowNext = false;
|
wp_SRTM1.AllowNext = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -770,7 +780,7 @@ namespace AirScout
|
||||||
}
|
}
|
||||||
if (GeographicalPoint.Check(tb_Latitude.Value, tb_Longitude.Value))
|
if (GeographicalPoint.Check(tb_Latitude.Value, tb_Longitude.Value))
|
||||||
{
|
{
|
||||||
// update locator text if not focusd
|
// update locator text if not focused
|
||||||
if (!tb_Locator.Focused)
|
if (!tb_Locator.Focused)
|
||||||
{
|
{
|
||||||
tb_Locator.SilentText = MaidenheadLocator.LocFromLatLon(tb_Latitude.Value, tb_Longitude.Value, Properties.Settings.Default.Locator_SmallLettersForSubsquares, (int)Properties.Settings.Default.Locator_MaxLength / 2, true);
|
tb_Locator.SilentText = MaidenheadLocator.LocFromLatLon(tb_Latitude.Value, tb_Longitude.Value, Properties.Settings.Default.Locator_SmallLettersForSubsquares, (int)Properties.Settings.Default.Locator_MaxLength / 2, true);
|
||||||
|
@ -813,12 +823,15 @@ namespace AirScout
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// check all values and enable/disable next button
|
// check all values and enable/disable next button
|
||||||
if (Callsign.Check(tb_Callsign.Text) && MaidenheadLocator.Check(tb_Locator.Text) && !double.IsNaN(tb_Latitude.Value) && !double.IsNaN(tb_Longitude.Value))
|
// save settings
|
||||||
{
|
if (Callsign.Check(tb_Callsign.Text))
|
||||||
// save settings
|
|
||||||
Properties.Settings.Default.MyCall = tb_Callsign.Text;
|
Properties.Settings.Default.MyCall = tb_Callsign.Text;
|
||||||
|
if (!double.IsNaN(tb_Latitude.Value))
|
||||||
Properties.Settings.Default.MyLat = tb_Latitude.Value;
|
Properties.Settings.Default.MyLat = tb_Latitude.Value;
|
||||||
|
if (!double.IsNaN(tb_Longitude.Value))
|
||||||
Properties.Settings.Default.MyLon = tb_Longitude.Value;
|
Properties.Settings.Default.MyLon = tb_Longitude.Value;
|
||||||
|
if (Callsign.Check(tb_Callsign.Text) && MaidenheadLocator.Check(tb_Locator.Text) && !double.IsNaN(tb_Longitude.Value) && !double.IsNaN(tb_Longitude.Value))
|
||||||
|
{
|
||||||
// StationData.Database.LocationInsertOrUpdateIfNewer(new LocationDesignator(tb_Callsign.Text, tb_Latitude.Value, tb_Longitude.Value, (MaidenheadLocator.IsPrecise(tb_Latitude.Value, tb_Longitude.Value, 3) ? GEOSOURCE.FROMUSER : GEOSOURCE.FROMLOC)));
|
// StationData.Database.LocationInsertOrUpdateIfNewer(new LocationDesignator(tb_Callsign.Text, tb_Latitude.Value, tb_Longitude.Value, (MaidenheadLocator.IsPrecise(tb_Latitude.Value, tb_Longitude.Value, 3) ? GEOSOURCE.FROMUSER : GEOSOURCE.FROMLOC)));
|
||||||
wp_UserDetails.AllowNext = true;
|
wp_UserDetails.AllowNext = true;
|
||||||
return true;
|
return true;
|
||||||
|
@ -844,6 +857,10 @@ namespace AirScout
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// clear properties
|
||||||
|
Properties.Settings.Default.MyLat = double.NaN;
|
||||||
|
Properties.Settings.Default.MyLon = double.NaN;
|
||||||
|
|
||||||
tb_Latitude.SilentValue = double.NaN;
|
tb_Latitude.SilentValue = double.NaN;
|
||||||
tb_Longitude.SilentValue = double.NaN;
|
tb_Longitude.SilentValue = double.NaN;
|
||||||
tb_Locator.SilentText = "";
|
tb_Locator.SilentText = "";
|
||||||
|
|
|
@ -260,6 +260,7 @@
|
||||||
this.tc_Map.SelectedIndex = 0;
|
this.tc_Map.SelectedIndex = 0;
|
||||||
this.tc_Map.Size = new System.Drawing.Size(852, 341);
|
this.tc_Map.Size = new System.Drawing.Size(852, 341);
|
||||||
this.tc_Map.TabIndex = 14;
|
this.tc_Map.TabIndex = 14;
|
||||||
|
this.tc_Map.Selecting += new System.Windows.Forms.TabControlCancelEventHandler(this.tc_Map_Selecting);
|
||||||
//
|
//
|
||||||
// tp_Map
|
// tp_Map
|
||||||
//
|
//
|
||||||
|
@ -375,6 +376,7 @@
|
||||||
this.tc_Main.TabIndex = 0;
|
this.tc_Main.TabIndex = 0;
|
||||||
this.tc_Main.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.tc_Main_DrawItem);
|
this.tc_Main.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.tc_Main_DrawItem);
|
||||||
this.tc_Main.SelectedIndexChanged += new System.EventHandler(this.tc_Main_SelectedIndexChanged);
|
this.tc_Main.SelectedIndexChanged += new System.EventHandler(this.tc_Main_SelectedIndexChanged);
|
||||||
|
this.tc_Main.Selecting += new System.Windows.Forms.TabControlCancelEventHandler(this.tc_Main_Selecting);
|
||||||
//
|
//
|
||||||
// tp_Elevation
|
// tp_Elevation
|
||||||
//
|
//
|
||||||
|
@ -1408,11 +1410,6 @@
|
||||||
this.cb_Planes_Filter_Min_Cat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
this.cb_Planes_Filter_Min_Cat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
this.cb_Planes_Filter_Min_Cat.Font = new System.Drawing.Font("Courier New", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.cb_Planes_Filter_Min_Cat.Font = new System.Drawing.Font("Courier New", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.cb_Planes_Filter_Min_Cat.FormattingEnabled = true;
|
this.cb_Planes_Filter_Min_Cat.FormattingEnabled = true;
|
||||||
this.cb_Planes_Filter_Min_Cat.Items.AddRange(new object[] {
|
|
||||||
"Light",
|
|
||||||
"Medium",
|
|
||||||
"Heavy",
|
|
||||||
"Super"});
|
|
||||||
this.cb_Planes_Filter_Min_Cat.Location = new System.Drawing.Point(59, 60);
|
this.cb_Planes_Filter_Min_Cat.Location = new System.Drawing.Point(59, 60);
|
||||||
this.cb_Planes_Filter_Min_Cat.Name = "cb_Planes_Filter_Min_Cat";
|
this.cb_Planes_Filter_Min_Cat.Name = "cb_Planes_Filter_Min_Cat";
|
||||||
this.cb_Planes_Filter_Min_Cat.Size = new System.Drawing.Size(77, 24);
|
this.cb_Planes_Filter_Min_Cat.Size = new System.Drawing.Size(77, 24);
|
||||||
|
@ -1519,6 +1516,7 @@
|
||||||
this.tc_Control.Size = new System.Drawing.Size(152, 404);
|
this.tc_Control.Size = new System.Drawing.Size(152, 404);
|
||||||
this.tc_Control.TabIndex = 60;
|
this.tc_Control.TabIndex = 60;
|
||||||
this.tc_Control.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.tc_Control_DrawItem);
|
this.tc_Control.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.tc_Control_DrawItem);
|
||||||
|
this.tc_Control.Selecting += new System.Windows.Forms.TabControlCancelEventHandler(this.tc_Control_Selecting);
|
||||||
//
|
//
|
||||||
// tp_Control_Single
|
// tp_Control_Single
|
||||||
//
|
//
|
||||||
|
@ -1738,8 +1736,10 @@
|
||||||
this.lv_Control_Watchlist.DrawColumnHeader += new System.Windows.Forms.DrawListViewColumnHeaderEventHandler(this.lv_Control_Watchlist_DrawColumnHeader);
|
this.lv_Control_Watchlist.DrawColumnHeader += new System.Windows.Forms.DrawListViewColumnHeaderEventHandler(this.lv_Control_Watchlist_DrawColumnHeader);
|
||||||
this.lv_Control_Watchlist.DrawItem += new System.Windows.Forms.DrawListViewItemEventHandler(this.lv_Control_Watchlist_DrawItem);
|
this.lv_Control_Watchlist.DrawItem += new System.Windows.Forms.DrawListViewItemEventHandler(this.lv_Control_Watchlist_DrawItem);
|
||||||
this.lv_Control_Watchlist.DrawSubItem += new System.Windows.Forms.DrawListViewSubItemEventHandler(this.lv_Control_Watchlist_DrawSubItem);
|
this.lv_Control_Watchlist.DrawSubItem += new System.Windows.Forms.DrawListViewSubItemEventHandler(this.lv_Control_Watchlist_DrawSubItem);
|
||||||
|
this.lv_Control_Watchlist.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.lv_Control_Watchlist_ItemCheck);
|
||||||
this.lv_Control_Watchlist.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.lv_Control_Watchlist_ItemChecked);
|
this.lv_Control_Watchlist.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.lv_Control_Watchlist_ItemChecked);
|
||||||
this.lv_Control_Watchlist.ItemMouseHover += new System.Windows.Forms.ListViewItemMouseHoverEventHandler(this.lv_Control_Watchlist_ItemMouseHover);
|
this.lv_Control_Watchlist.ItemMouseHover += new System.Windows.Forms.ListViewItemMouseHoverEventHandler(this.lv_Control_Watchlist_ItemMouseHover);
|
||||||
|
this.lv_Control_Watchlist.SelectedIndexChanged += new System.EventHandler(this.lv_Control_Watchlist_SelectedIndexChanged);
|
||||||
this.lv_Control_Watchlist.MouseMove += new System.Windows.Forms.MouseEventHandler(this.lv_Control_Watchlist_MouseMove);
|
this.lv_Control_Watchlist.MouseMove += new System.Windows.Forms.MouseEventHandler(this.lv_Control_Watchlist_MouseMove);
|
||||||
this.lv_Control_Watchlist.Resize += new System.EventHandler(this.lv_Control_Watchlist_Resize);
|
this.lv_Control_Watchlist.Resize += new System.EventHandler(this.lv_Control_Watchlist_Resize);
|
||||||
//
|
//
|
||||||
|
|
|
@ -71,6 +71,7 @@ using OxyPlot.Series;
|
||||||
using OxyPlot.Axes;
|
using OxyPlot.Axes;
|
||||||
using System.Data.SQLite;
|
using System.Data.SQLite;
|
||||||
using DeviceId;
|
using DeviceId;
|
||||||
|
using AirScout.Properties;
|
||||||
using AirScout.Core;
|
using AirScout.Core;
|
||||||
using AirScout.Aircrafts;
|
using AirScout.Aircrafts;
|
||||||
using AirScout.PlaneFeeds;
|
using AirScout.PlaneFeeds;
|
||||||
|
@ -276,6 +277,7 @@ namespace AirScout
|
||||||
sc_Main.SplitterDistance = value;
|
sc_Main.SplitterDistance = value;
|
||||||
else
|
else
|
||||||
sc_Main.SplitterDistance = this.Width - gb_Map_Info_DefaultWidth;
|
sc_Main.SplitterDistance = this.Width - gb_Map_Info_DefaultWidth;
|
||||||
|
Console.WriteLine("Setting MainSplitterDistance: " + this.Width + "--->" + sc_Main.SplitterDistance);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -294,6 +296,7 @@ namespace AirScout
|
||||||
sc_Map.SplitterDistance = value;
|
sc_Map.SplitterDistance = value;
|
||||||
else
|
else
|
||||||
sc_Map.SplitterDistance = this.Height - tc_Main_DefaultHeight;
|
sc_Map.SplitterDistance = this.Height - tc_Main_DefaultHeight;
|
||||||
|
Console.WriteLine("Setting MapSplitterDistance: " + this.Height + "--->" + sc_Map.SplitterDistance);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -310,9 +313,6 @@ namespace AirScout
|
||||||
|
|
||||||
DateTime CurrentTime = DateTime.UtcNow;
|
DateTime CurrentTime = DateTime.UtcNow;
|
||||||
|
|
||||||
public bool ForceClose = false;
|
|
||||||
|
|
||||||
|
|
||||||
// FlightRadar
|
// FlightRadar
|
||||||
PlaneInfoCache Planes = new PlaneInfoCache();
|
PlaneInfoCache Planes = new PlaneInfoCache();
|
||||||
SortedList<string, PlaneInfo> ActivePlanes = new SortedList<string, PlaneInfo>();
|
SortedList<string, PlaneInfo> ActivePlanes = new SortedList<string, PlaneInfo>();
|
||||||
|
@ -993,7 +993,13 @@ namespace AirScout
|
||||||
SplashDlg.Show();
|
SplashDlg.Show();
|
||||||
// bring window to front
|
// bring window to front
|
||||||
SplashDlg.BringToFront();
|
SplashDlg.BringToFront();
|
||||||
Application.DoEvents();
|
// wait for splash window is fully visible
|
||||||
|
while (SplashDlg.Opacity < 1)
|
||||||
|
{
|
||||||
|
Application.DoEvents();
|
||||||
|
}
|
||||||
|
// show AirScout main window
|
||||||
|
this.BringToFront();
|
||||||
// Check directories, complete it and create, if not exist
|
// Check directories, complete it and create, if not exist
|
||||||
SplashDlg.Status("Checking directories...");
|
SplashDlg.Status("Checking directories...");
|
||||||
CheckDirectories();
|
CheckDirectories();
|
||||||
|
@ -1322,15 +1328,6 @@ namespace AirScout
|
||||||
MessageBox.Show("An error occured during startup: " + ex.ToString() + "\n\nPress >OK< to close the application.", "AirScout", MessageBoxButtons.OK);
|
MessageBox.Show("An error occured during startup: " + ex.ToString() + "\n\nPress >OK< to close the application.", "AirScout", MessageBoxButtons.OK);
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void FinishStartup()
|
|
||||||
{
|
|
||||||
// finish startup
|
|
||||||
// close splash window
|
|
||||||
// set window layout
|
|
||||||
if (SplashDlg != null)
|
|
||||||
SplashDlg.Close();
|
|
||||||
// restore window size, state and location
|
// restore window size, state and location
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -1356,6 +1353,15 @@ namespace AirScout
|
||||||
Properties.Settings.Default.MainSplitter_Distance = -1;
|
Properties.Settings.Default.MainSplitter_Distance = -1;
|
||||||
Properties.Settings.Default.MapSplitter_Distance = -1;
|
Properties.Settings.Default.MapSplitter_Distance = -1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void FinishStartup()
|
||||||
|
{
|
||||||
|
// finish startup
|
||||||
|
// close splash window
|
||||||
|
// set window layout
|
||||||
|
if (SplashDlg != null)
|
||||||
|
SplashDlg.Close();
|
||||||
// restore splitter positions
|
// restore splitter positions
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -1367,8 +1373,8 @@ namespace AirScout
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// ignore window settings under Linux/Mono and always use default values
|
// ignore window settings under Linux/Mono and always use default values
|
||||||
sc_Map.SplitterDistance = -1;
|
MapSplitterDistance = -1;
|
||||||
sc_Main.SplitterDistance = -1;
|
MainSplitterDistance = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -1990,7 +1996,6 @@ namespace AirScout
|
||||||
|
|
||||||
private void UpdateAirports()
|
private void UpdateAirports()
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
if (!Properties.Settings.Default.Airports_Activate)
|
if (!Properties.Settings.Default.Airports_Activate)
|
||||||
return;
|
return;
|
||||||
if ((Airports == null) || (Airports.Count == 0))
|
if ((Airports == null) || (Airports.Count == 0))
|
||||||
|
@ -2011,8 +2016,7 @@ namespace AirScout
|
||||||
Log.WriteMessage(ex.ToString(), LogLevel.Error);
|
Log.WriteMessage(ex.ToString(), LogLevel.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// gm_Main.Refresh();
|
gm_Main.Refresh();
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ti_Startup_Tick(object sender, EventArgs e)
|
private void ti_Startup_Tick(object sender, EventArgs e)
|
||||||
|
@ -2193,11 +2197,6 @@ namespace AirScout
|
||||||
|
|
||||||
private void OnIdle(object sender, EventArgs args)
|
private void OnIdle(object sender, EventArgs args)
|
||||||
{
|
{
|
||||||
// close window if disagreed
|
|
||||||
if (ForceClose)
|
|
||||||
{
|
|
||||||
Application.Exit();
|
|
||||||
}
|
|
||||||
// enable/disable watchlist button
|
// enable/disable watchlist button
|
||||||
if (btn_Control_Manage_Watchlist.Enabled == Properties.Settings.Default.Watchlist_SyncWithKST)
|
if (btn_Control_Manage_Watchlist.Enabled == Properties.Settings.Default.Watchlist_SyncWithKST)
|
||||||
btn_Control_Manage_Watchlist.Enabled = !Properties.Settings.Default.Watchlist_SyncWithKST;
|
btn_Control_Manage_Watchlist.Enabled = !Properties.Settings.Default.Watchlist_SyncWithKST;
|
||||||
|
@ -2900,7 +2899,7 @@ namespace AirScout
|
||||||
#region Play & Pause
|
#region Play & Pause
|
||||||
|
|
||||||
private void Play()
|
private void Play()
|
||||||
{
|
{
|
||||||
PlayMode = AIRSCOUTPLAYMODE.FORWARD;
|
PlayMode = AIRSCOUTPLAYMODE.FORWARD;
|
||||||
// switch tab control according to path mode
|
// switch tab control according to path mode
|
||||||
if (PathMode == AIRSCOUTPATHMODE.SINGLE)
|
if (PathMode == AIRSCOUTPATHMODE.SINGLE)
|
||||||
|
@ -2909,6 +2908,8 @@ namespace AirScout
|
||||||
tc_Control.SelectedTab = tp_Control_Multi;
|
tc_Control.SelectedTab = tp_Control_Multi;
|
||||||
// update tab control
|
// update tab control
|
||||||
tc_Control.Refresh();
|
tc_Control.Refresh();
|
||||||
|
// refresh watch list
|
||||||
|
RefreshWatchlistView();
|
||||||
// update all current paths
|
// update all current paths
|
||||||
UpdatePaths();
|
UpdatePaths();
|
||||||
// clear spectrum
|
// clear spectrum
|
||||||
|
@ -2932,13 +2933,11 @@ namespace AirScout
|
||||||
cb_MyLoc.Enabled = false;
|
cb_MyLoc.Enabled = false;
|
||||||
cb_DXCall.Enabled = false;
|
cb_DXCall.Enabled = false;
|
||||||
cb_DXLoc.Enabled = false;
|
cb_DXLoc.Enabled = false;
|
||||||
tc_Control.Enabled = false;
|
// tc_Control.Enabled = false;
|
||||||
pa_Planes_Filter.Enabled = false;
|
pa_Planes_Filter.Enabled = false;
|
||||||
gb_Analysis_Controls.Enabled = false;
|
gb_Analysis_Controls.Enabled = false;
|
||||||
gb_Analysis_Database.Enabled = false;
|
gb_Analysis_Database.Enabled = false;
|
||||||
gb_Analysis_Player.Enabled = false;
|
gb_Analysis_Player.Enabled = false;
|
||||||
tc_Main.Enabled = false;
|
|
||||||
// tc_Map.Enabled = false;
|
|
||||||
//referesh main window
|
//referesh main window
|
||||||
this.Refresh();
|
this.Refresh();
|
||||||
}
|
}
|
||||||
|
@ -3686,6 +3685,8 @@ namespace AirScout
|
||||||
if ((ActivePlanes == null) || (ActivePlanes.Count == 0))
|
if ((ActivePlanes == null) || (ActivePlanes.Count == 0))
|
||||||
return;
|
return;
|
||||||
bool anyselected = false;
|
bool anyselected = false;
|
||||||
|
List<TooltipDataPoint> planes_hi = new List<TooltipDataPoint>();
|
||||||
|
List<TooltipDataPoint> planes_lo = new List<TooltipDataPoint>();
|
||||||
// draw all planes
|
// draw all planes
|
||||||
foreach (PlaneInfo plane in ActivePlanes.Values)
|
foreach (PlaneInfo plane in ActivePlanes.Values)
|
||||||
{
|
{
|
||||||
|
@ -3725,8 +3726,10 @@ namespace AirScout
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// count the planes drawed and update caption
|
// count the planes drawed and update caption, if not under Linux
|
||||||
tp_Map.Text = "Map [" + gmo_Planes.Markers.Count.ToString() + " plane(s)]";
|
// Linux/Mono is drawing the whole control again --> performance issue!
|
||||||
|
if (!SupportFunctions.IsMono)
|
||||||
|
tp_Map.Text = "Map [" + gmo_Planes.Markers.Count.ToString() + " plane(s)]";
|
||||||
// if selected: draw the thin path to crossing point if one
|
// if selected: draw the thin path to crossing point if one
|
||||||
if (isselected)
|
if (isselected)
|
||||||
{
|
{
|
||||||
|
@ -3767,6 +3770,7 @@ namespace AirScout
|
||||||
// calculate distance from mylat/mylon
|
// calculate distance from mylat/mylon
|
||||||
double dist = LatLon.Distance(Properties.Settings.Default.MyLat, Properties.Settings.Default.MyLon, plane.IntPoint.Lat, plane.IntPoint.Lon);
|
double dist = LatLon.Distance(Properties.Settings.Default.MyLat, Properties.Settings.Default.MyLon, plane.IntPoint.Lat, plane.IntPoint.Lon);
|
||||||
// add new data points
|
// add new data points
|
||||||
|
/*
|
||||||
if (plane.AltDiff > 0)
|
if (plane.AltDiff > 0)
|
||||||
{
|
{
|
||||||
Planes_Hi.Points.Add(new DataPoint(dist, plane.Alt_m));
|
Planes_Hi.Points.Add(new DataPoint(dist, plane.Alt_m));
|
||||||
|
@ -3775,10 +3779,29 @@ namespace AirScout
|
||||||
{
|
{
|
||||||
Planes_Lo.Points.Add(new DataPoint(dist, plane.Alt_m));
|
Planes_Lo.Points.Add(new DataPoint(dist, plane.Alt_m));
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
TooltipDataPoint p = new TooltipDataPoint(dist, plane.Alt_m,plane.Call);
|
||||||
|
if (plane.AltDiff > 0)
|
||||||
|
{
|
||||||
|
planes_hi.Add(p);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
planes_lo.Add(p);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// add planes to chart
|
||||||
|
Planes_Hi.ItemsSource = planes_hi;
|
||||||
|
Planes_Lo.ItemsSource = planes_lo;
|
||||||
|
|
||||||
|
// change tracker display
|
||||||
|
Planes_Hi.TrackerFormatString = "{Tooltip}";
|
||||||
|
Planes_Lo.TrackerFormatString = "{Tooltip}";
|
||||||
|
|
||||||
// invalidate chart
|
// invalidate chart
|
||||||
pm_Path.InvalidatePlot(true);
|
pm_Path.InvalidatePlot(true);
|
||||||
|
|
||||||
|
@ -3919,6 +3942,7 @@ namespace AirScout
|
||||||
// clear data points in chart
|
// clear data points in chart
|
||||||
Planes_Hi.Points.Clear();
|
Planes_Hi.Points.Clear();
|
||||||
Planes_Lo.Points.Clear();
|
Planes_Lo.Points.Clear();
|
||||||
|
pm_Path.Annotations.Clear();
|
||||||
|
|
||||||
// draw planes
|
// draw planes
|
||||||
DrawPlanes();
|
DrawPlanes();
|
||||||
|
@ -3994,7 +4018,10 @@ namespace AirScout
|
||||||
int topItemIndex = 0;
|
int topItemIndex = 0;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
topItemIndex = lv_Control_Watchlist.TopItem.Index;
|
if (PlayMode != AIRSCOUTPLAYMODE.FORWARD)
|
||||||
|
{
|
||||||
|
topItemIndex = lv_Control_Watchlist.TopItem.Index;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -4049,6 +4076,9 @@ namespace AirScout
|
||||||
|
|
||||||
private void ti_Progress_Tick(object sender, EventArgs e)
|
private void ti_Progress_Tick(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
// prevent timer tick from overflow when heavy loaded
|
||||||
|
// stop timer --> do update procedure --> start timer again
|
||||||
|
ti_Progress.Stop();
|
||||||
if (LifeMode == AIRSCOUTLIFEMODE.LIFE)
|
if (LifeMode == AIRSCOUTLIFEMODE.LIFE)
|
||||||
{
|
{
|
||||||
if (PlayMode == AIRSCOUTPLAYMODE.FORWARD)
|
if (PlayMode == AIRSCOUTPLAYMODE.FORWARD)
|
||||||
|
@ -4078,6 +4108,8 @@ namespace AirScout
|
||||||
UpdatePlanes();
|
UpdatePlanes();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// restart timer
|
||||||
|
ti_Progress.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sc_Main_SplitterMoved(object sender, SplitterEventArgs e)
|
private void sc_Main_SplitterMoved(object sender, SplitterEventArgs e)
|
||||||
|
@ -4321,6 +4353,8 @@ namespace AirScout
|
||||||
PathMode = AIRSCOUTPATHMODE.SINGLE;
|
PathMode = AIRSCOUTPATHMODE.SINGLE;
|
||||||
tc_Map.SelectedTab = tp_Map;
|
tc_Map.SelectedTab = tp_Map;
|
||||||
}
|
}
|
||||||
|
// update all info
|
||||||
|
UpdateStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void gb_Map_Info_MouseClick(object sender, MouseEventArgs e)
|
private void gb_Map_Info_MouseClick(object sender, MouseEventArgs e)
|
||||||
|
@ -4606,13 +4640,21 @@ namespace AirScout
|
||||||
PathMode = AIRSCOUTPATHMODE.MULTI;
|
PathMode = AIRSCOUTPATHMODE.MULTI;
|
||||||
tc_Map.SelectedTab = tp_Map;
|
tc_Map.SelectedTab = tp_Map;
|
||||||
}
|
}
|
||||||
|
tp_Control_Multi.Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void lv_Control_Watchlist_Resize(object sender, EventArgs e)
|
private void lv_Control_Watchlist_Resize(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
// list view resized
|
// list view resized
|
||||||
// resize locator column to fit the client size
|
// resize locator column to fit the client size
|
||||||
lv_Control_Watchlist.Columns[1].Width = lv_Control_Watchlist.ClientSize.Width - lv_Control_Watchlist.Columns[0].Width;
|
try
|
||||||
|
{
|
||||||
|
lv_Control_Watchlist.Columns[1].Width = lv_Control_Watchlist.ClientSize.Width - lv_Control_Watchlist.Columns[0].Width;
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
// do nothing, if resize fails
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void lv_Control_Watchlist_ColumnWidthChanged(object sender, ColumnWidthChangedEventArgs e)
|
private void lv_Control_Watchlist_ColumnWidthChanged(object sender, ColumnWidthChangedEventArgs e)
|
||||||
|
@ -4622,10 +4664,24 @@ namespace AirScout
|
||||||
{
|
{
|
||||||
// call sign column changed
|
// call sign column changed
|
||||||
// resize locator column to fit the client size
|
// resize locator column to fit the client size
|
||||||
lv_Control_Watchlist.Columns[1].Width = lv_Control_Watchlist.ClientSize.Width - lv_Control_Watchlist.Columns[0].Width;
|
try
|
||||||
|
{
|
||||||
|
lv_Control_Watchlist.Columns[1].Width = lv_Control_Watchlist.ClientSize.Width - lv_Control_Watchlist.Columns[0].Width;
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
// do nothing, if resize fails
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void lv_Control_Watchlist_ItemCheck(object sender, ItemCheckEventArgs e)
|
||||||
|
{
|
||||||
|
// ignore when in PLAY mode
|
||||||
|
if (!WatchlistUpdating && (PlayMode == AIRSCOUTPLAYMODE.FORWARD))
|
||||||
|
e.NewValue = e.CurrentValue;
|
||||||
|
}
|
||||||
|
|
||||||
private void lv_Control_Watchlist_ItemChecked(object sender, ItemCheckedEventArgs e)
|
private void lv_Control_Watchlist_ItemChecked(object sender, ItemCheckedEventArgs e)
|
||||||
{
|
{
|
||||||
// ignore event while populating list view
|
// ignore event while populating list view
|
||||||
|
@ -4659,6 +4715,9 @@ namespace AirScout
|
||||||
|
|
||||||
private void lv_Control_Watchlist_ColumnClick(object sender, ColumnClickEventArgs e)
|
private void lv_Control_Watchlist_ColumnClick(object sender, ColumnClickEventArgs e)
|
||||||
{
|
{
|
||||||
|
// ignore when in PLAY mode
|
||||||
|
if (PlayMode == AIRSCOUTPLAYMODE.FORWARD)
|
||||||
|
return;
|
||||||
WatchlistAllCheckedChanging = true;
|
WatchlistAllCheckedChanging = true;
|
||||||
if (!WatchlistAllChecked)
|
if (!WatchlistAllChecked)
|
||||||
{
|
{
|
||||||
|
@ -4720,14 +4779,13 @@ namespace AirScout
|
||||||
{
|
{
|
||||||
e.Item.BackColor = bkcolor;
|
e.Item.BackColor = bkcolor;
|
||||||
}
|
}
|
||||||
e.DrawBackground();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
e.Item.BackColor = Color.White;
|
e.Item.BackColor = Color.White;
|
||||||
e.DrawDefault = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
e.DrawDefault = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -4736,40 +4794,73 @@ namespace AirScout
|
||||||
e.DrawDefault = true;
|
e.DrawDefault = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btn_Control_Manage_Watchlist_Click(object sender, EventArgs e)
|
private void lv_Control_Watchlist_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
// synchronize station in SINGLE mode when selection changed in MULTI mode
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if ((lv_Control_Watchlist.SelectedItems != null) && (lv_Control_Watchlist.SelectedItems.Count == 1))
|
||||||
|
{
|
||||||
|
string call = lv_Control_Watchlist.SelectedItems[0].Text;
|
||||||
|
string loc = lv_Control_Watchlist.SelectedItems[0].SubItems[1].Text;
|
||||||
|
double lat = MaidenheadLocator.LatFromLoc(loc);
|
||||||
|
double lon = MaidenheadLocator.LonFromLoc(loc);
|
||||||
|
LocationDesignator ld = StationData.Database.LocationFind(call, loc);
|
||||||
|
if (ld != null)
|
||||||
|
{
|
||||||
|
// update lat/lon from database if found
|
||||||
|
lat = ld.Lat;
|
||||||
|
lon = ld.Lon;
|
||||||
|
}
|
||||||
|
Properties.Settings.Default.DXCall = call;
|
||||||
|
Properties.Settings.Default.DXLat = lat;
|
||||||
|
Properties.Settings.Default.DXLon = lon;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Log.WriteMessage(ex.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btn_Control_Manage_Watchlist_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();
|
WatchlistDlg Dlg = new WatchlistDlg();
|
||||||
if (Dlg.ShowDialog() == DialogResult.OK)
|
if (Dlg.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
// sync watchlist
|
// clear watch list
|
||||||
foreach (WatchlistItem item in Properties.Settings.Default.Watchlist)
|
Properties.Settings.Default.Watchlist.Clear();
|
||||||
|
foreach (DataGridViewRow row in Dlg.dgv_Watchlist_Selected.Rows)
|
||||||
{
|
{
|
||||||
// nasty!! Should never be null!
|
string call = row.Cells[0].Value.ToString();
|
||||||
if (item == null)
|
string loc = row.Cells[1].Value.ToString();
|
||||||
continue;
|
bool oor = true;
|
||||||
item.Remove = true;
|
// try to get the location from database
|
||||||
}
|
LocationDesignator dxloc = StationData.Database.LocationFind(call, loc);
|
||||||
foreach (ListViewItem lvi in Dlg.lv_Watchlist_Selected.Items)
|
if (dxloc != null)
|
||||||
{
|
|
||||||
// search item in watchlist
|
|
||||||
int index = Properties.Settings.Default.Watchlist.IndexOf(lvi.Text);
|
|
||||||
// reset remove flag if found, create and add new entry if not
|
|
||||||
if (index >= 0)
|
|
||||||
Properties.Settings.Default.Watchlist[index].Remove = false;
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
// try to find last recent locator from database and add to watchlist
|
oor = LatLon.Distance(Properties.Settings.Default.MyLat, Properties.Settings.Default.MyLon, dxloc.Lat, dxloc.Lon) > Properties.Settings.Default.Path_MaxLength;
|
||||||
LocationDesignator dxcall = StationData.Database.LocationFindLastRecent(lvi.Text);
|
|
||||||
if (dxcall != null)
|
|
||||||
{
|
|
||||||
double qrb = LatLon.Distance(Properties.Settings.Default.MyLat, Properties.Settings.Default.MyLon, dxcall.Lat, dxcall.Lon);
|
|
||||||
Properties.Settings.Default.Watchlist.Add(new WatchlistItem(dxcall.Call, dxcall.Loc, qrb > Properties.Settings.Default.Path_MaxLength));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// add call to watch list
|
||||||
|
WatchlistItem item = new WatchlistItem(call, loc, oor);
|
||||||
|
Properties.Settings.Default.Watchlist.Add(item);
|
||||||
}
|
}
|
||||||
// remove the rest of items
|
// reselect previously selected
|
||||||
Properties.Settings.Default.Watchlist.RemoveAll(item => item.Remove);
|
foreach (string checkedcall in checkedcalls)
|
||||||
// refersh watchlist view
|
{
|
||||||
|
int index = Properties.Settings.Default.Watchlist.IndexOf(checkedcall);
|
||||||
|
if (index >= 0)
|
||||||
|
Properties.Settings.Default.Watchlist[index].Checked = true;
|
||||||
|
}
|
||||||
|
// refresh watchlist view
|
||||||
RefreshWatchlistView();
|
RefreshWatchlistView();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5749,7 +5840,7 @@ namespace AirScout
|
||||||
int mins = 0;
|
int mins = 0;
|
||||||
if (planeinfo.Speed > 0)
|
if (planeinfo.Speed > 0)
|
||||||
mins = (int)(planeinfo.IntQRB / (double)planeinfo.Speed / 1.852 * 60.0);
|
mins = (int)(planeinfo.IntQRB / (double)planeinfo.Speed / 1.852 * 60.0);
|
||||||
planes = planes + planeinfo.Call + "," + planeinfo.Category + "," + ((int)planeinfo.IntQRB).ToString() + "," + planeinfo.Potential.ToString() + "," + mins.ToString() + ",";
|
planes = planes + planeinfo.Call + "," + PlaneCategories.GetShortStringValue(planeinfo.Category) + "," + ((int)planeinfo.IntQRB).ToString() + "," + planeinfo.Potential.ToString() + "," + mins.ToString() + ",";
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6557,6 +6648,8 @@ namespace AirScout
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// stop background thread
|
||||||
|
bw_NewsFeed.CancelAsync();
|
||||||
// report website changes
|
// report website changes
|
||||||
DateTime dt = (DateTime)e.UserState;
|
DateTime dt = (DateTime)e.UserState;
|
||||||
if (!SupportFunctions.IsMono)
|
if (!SupportFunctions.IsMono)
|
||||||
|
@ -6568,31 +6661,24 @@ namespace AirScout
|
||||||
if (wb_News != null)
|
if (wb_News != null)
|
||||||
wb_News.Refresh();
|
wb_News.Refresh();
|
||||||
tc_Map.SelectedTab = tp_News;
|
tc_Map.SelectedTab = tp_News;
|
||||||
// save time to settings
|
|
||||||
Properties.Settings.Default.News_LastUpdate = dt;
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
// do nothing if wb_News fails to refresh
|
// do nothing if wb_News fails to refresh
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// save time to settings
|
||||||
|
Properties.Settings.Default.News_LastUpdate = dt;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (MessageBox.Show("There are news on the website. Latest update: " + dt.ToString() + "\n Do you want to read it now?\n\n Under Linux/Mono open web browser of your choice and goto: \n" + Properties.Settings.Default.News_URL + "\n\n", "Website News", MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes)
|
MessageBox.Show("There are news on the website. Latest update: " + dt.ToString() + "\n Do you want to read it now?\n\n Under Linux/Mono open web browser of your choice and goto: \n" + Properties.Settings.Default.News_URL + "\n\n", "Website News", MessageBoxButtons.YesNo);
|
||||||
{
|
// save time to settings
|
||||||
try
|
Properties.Settings.Default.News_LastUpdate = dt;
|
||||||
{
|
|
||||||
// save time to settings
|
|
||||||
Properties.Settings.Default.News_LastUpdate = dt;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
// do nothing if wb_News fails to refresh
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// restart background thread
|
||||||
|
bw_NewsFeed.RunWorkerAsync();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7540,6 +7626,28 @@ namespace AirScout
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void tc_Main_Selecting(object sender, TabControlCancelEventArgs e)
|
||||||
|
{
|
||||||
|
// cancel tab change when in PLAY mode
|
||||||
|
if (PlayMode == AIRSCOUTPLAYMODE.FORWARD)
|
||||||
|
e.Cancel = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void tc_Map_Selecting(object sender, TabControlCancelEventArgs e)
|
||||||
|
{
|
||||||
|
// cancel tab change when in PLAY mode
|
||||||
|
if (PlayMode == AIRSCOUTPLAYMODE.FORWARD)
|
||||||
|
e.Cancel = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void tc_Control_Selecting(object sender, TabControlCancelEventArgs e)
|
||||||
|
{
|
||||||
|
// cancel tab change when in PLAY mode
|
||||||
|
if (PlayMode == AIRSCOUTPLAYMODE.FORWARD)
|
||||||
|
e.Cancel = true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -125,7 +125,7 @@
|
||||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACc
|
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACc
|
||||||
DQAAAk1TRnQBSQFMAgEBAwEAATgBCwE4AQsBIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
DQAAAk1TRnQBSQFMAgEBAwEAAWgBCwFoAQsBIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||||
AwABgAMAASADAAEBAQABCAYAARAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
AwABgAMAASADAAEBAQABCAYAARAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||||
|
@ -340,7 +340,7 @@
|
||||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACM
|
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACM
|
||||||
DAAAAk1TRnQBSQFMAwEBAAGgAQkBoAEJASABAAEgAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA
|
DAAAAk1TRnQBSQFMAwEBAAHQAQkB0AEJASABAAEgAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA
|
||||||
AYADAAEgAwABAQEAAQgGAAEQGAABgAIAAYADAAKAAQABgAMAAYABAAGAAQACgAIAA8ABAAHAAdwBwAEA
|
AYADAAEgAwABAQEAAQgGAAEQGAABgAIAAYADAAKAAQABgAMAAYABAAGAAQACgAIAA8ABAAHAAdwBwAEA
|
||||||
AfABygGmAQABMwUAATMBAAEzAQABMwEAAjMCAAMWAQADHAEAAyIBAAMpAQADVQEAA00BAANCAQADOQEA
|
AfABygGmAQABMwUAATMBAAEzAQABMwEAAjMCAAMWAQADHAEAAyIBAAMpAQADVQEAA00BAANCAQADOQEA
|
||||||
AYABfAH/AQACUAH/AQABkwEAAdYBAAH/AewBzAEAAcYB1gHvAQAB1gLnAQABkAGpAa0CAAH/ATMDAAFm
|
AYABfAH/AQACUAH/AQABkwEAAdYBAAH/AewBzAEAAcYB1gHvAQAB1gLnAQABkAGpAa0CAAH/ATMDAAFm
|
||||||
|
|
Plik diff jest za duży
Load Diff
|
@ -235,32 +235,41 @@ namespace AirScout
|
||||||
|
|
||||||
private void btn_Options_Watchlist_Manage_Click(object sender, EventArgs e)
|
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();
|
WatchlistDlg Dlg = new WatchlistDlg();
|
||||||
if (Dlg.ShowDialog() == DialogResult.OK)
|
if (Dlg.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
// sync watchlist
|
// clear watch list
|
||||||
foreach (WatchlistItem item in Properties.Settings.Default.Watchlist)
|
Properties.Settings.Default.Watchlist.Clear();
|
||||||
item.Remove = true;
|
foreach (DataGridViewRow row in Dlg.dgv_Watchlist_Selected.Rows)
|
||||||
foreach (ListViewItem lvi in Dlg.lv_Watchlist_Selected.Items)
|
|
||||||
{
|
{
|
||||||
// search item in watchlist
|
string call = row.Cells[0].Value.ToString();
|
||||||
int index = Properties.Settings.Default.Watchlist.IndexOf(lvi.Text);
|
string loc = row.Cells[1].Value.ToString();
|
||||||
// reset remove flag if found, create and add new entry if not
|
bool oor = true;
|
||||||
if (index >= 0)
|
// try to get the location from database
|
||||||
Properties.Settings.Default.Watchlist[index].Remove = false;
|
LocationDesignator dxloc = StationData.Database.LocationFind(call, loc);
|
||||||
else
|
if (dxloc != null)
|
||||||
{
|
{
|
||||||
// try to find last recent locator from database and add to watchlist
|
oor = LatLon.Distance(Properties.Settings.Default.MyLat, Properties.Settings.Default.MyLon, dxloc.Lat, dxloc.Lon) > Properties.Settings.Default.Path_MaxLength;
|
||||||
LocationDesignator dxcall = StationData.Database.LocationFindLastRecent(lvi.Text);
|
|
||||||
if (dxcall != null)
|
|
||||||
{
|
|
||||||
double qrb = LatLon.Distance(Properties.Settings.Default.MyLat, Properties.Settings.Default.MyLon, dxcall.Lat, dxcall.Lon);
|
|
||||||
Properties.Settings.Default.Watchlist.Add(new WatchlistItem(dxcall.Call, dxcall.Loc, qrb > 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;
|
||||||
}
|
}
|
||||||
// remove the rest of items
|
|
||||||
Properties.Settings.Default.Watchlist.RemoveAll(item => item.Remove);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2058,19 +2067,32 @@ namespace AirScout
|
||||||
|
|
||||||
private void tab_Options_Info_Enter(object sender, EventArgs e)
|
private void tab_Options_Info_Enter(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
// populate link labels
|
try
|
||||||
lbl_Options_Version.Text = "Version: " + Application.ProductVersion;
|
{
|
||||||
lbl_Options_Map.Text = "GMap.NET Copyright (c) 2008 - 2011 Universe";
|
// clear links first
|
||||||
lbl_Options_Map.Links.Add(0, 8, "http://greatmaps.codeplex.com/");
|
lbl_Options_Map.Links.Clear();
|
||||||
lbl_Options_Spherical.Text = "http://www.movable-type.co.uk/scripts/latlong.html";
|
lbl_Options_Spherical.Links.Clear();
|
||||||
lbl_Options_Spherical.Links.Add(0, lbl_Options_Spherical.Text.Length - 1, "http://www.movable-type.co.uk/scripts/latlong.html");
|
lbl_Options_Elevation_GLOBE.Links.Clear();
|
||||||
lbl_Options_Elevation_GLOBE.Text = "1km based Elevation Data from GLOBE - Project";
|
lbl_Options_Elevation_SRTM3.Links.Clear();
|
||||||
lbl_Options_Elevation_GLOBE.Links.Add(30, 5, "http://www.ngdc.noaa.gov/mgg/topo/globe.html");
|
lbl_Options_Elevation_SRTM1.Links.Clear();
|
||||||
lbl_Options_Elevation_SRTM3.Text = "3arsec (90m x 90m) Elevation Data from SRTM - Project";
|
// populate link labels
|
||||||
lbl_Options_Elevation_SRTM3.Links.Add(40, 14, "http://srtm.usgs.gov/");
|
lbl_Options_Version.Text = "Version: " + Application.ProductVersion;
|
||||||
lbl_Options_Elevation_SRTM1.Text = "1arsec (30m x 30m) Elevation Data from SRTM - Project and ASTER";
|
lbl_Options_Map.Text = "GMap.NET Copyright (c) 2008 - 2011 Universe";
|
||||||
lbl_Options_Elevation_SRTM1.Links.Add(40, 14, "http://srtm.usgs.gov");
|
lbl_Options_Map.Links.Add(0, 8, "http://greatmaps.codeplex.com/");
|
||||||
lbl_Options_Elevation_SRTM1.Links.Add(58, 6, "http://asterweb.jpl.nasa.gov/index.asp");
|
lbl_Options_Spherical.Text = "http://www.movable-type.co.uk/scripts/latlong.html";
|
||||||
|
lbl_Options_Spherical.Links.Add(0, lbl_Options_Spherical.Text.Length - 1, "http://www.movable-type.co.uk/scripts/latlong.html");
|
||||||
|
lbl_Options_Elevation_GLOBE.Text = "1km based Elevation Data from GLOBE - Project";
|
||||||
|
lbl_Options_Elevation_GLOBE.Links.Add(30, 5, "http://www.ngdc.noaa.gov/mgg/topo/globe.html");
|
||||||
|
lbl_Options_Elevation_SRTM3.Text = "3arsec (90m x 90m) Elevation Data from SRTM - Project";
|
||||||
|
lbl_Options_Elevation_SRTM3.Links.Add(40, 14, "http://srtm.usgs.gov/");
|
||||||
|
lbl_Options_Elevation_SRTM1.Text = "1arsec (30m x 30m) Elevation Data from SRTM - Project and ASTER";
|
||||||
|
lbl_Options_Elevation_SRTM1.Links.Add(40, 14, "http://srtm.usgs.gov");
|
||||||
|
lbl_Options_Elevation_SRTM1.Links.Add(58, 6, "http://asterweb.jpl.nasa.gov/index.asp");
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Log.WriteMessage(ex.ToString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||||
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
|
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
|
||||||
// übernehmen, indem Sie "*" eingeben:
|
// übernehmen, indem Sie "*" eingeben:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.3.0.7")]
|
[assembly: AssemblyVersion("1.3.1.0")]
|
||||||
[assembly: AssemblyFileVersion("1.3.0.7")]
|
[assembly: AssemblyFileVersion("1.3.1.0")]
|
||||||
|
|
|
@ -41,6 +41,8 @@ To get ist running on your system, please follow the steps below
|
||||||
- Settings upgrade from previous versions do not work, always use default settings when upgrading
|
- Settings upgrade from previous versions do not work, always use default settings when upgrading
|
||||||
- database view for maintenance does not work --> SQLite-DataAdapter issues
|
- database view for maintenance does not work --> SQLite-DataAdapter issues
|
||||||
- Program sometimes does not close properly, stops working while saving settings to disk
|
- Program sometimes does not close properly, stops working while saving settings to disk
|
||||||
|
- dropdowns for callsigns and locators disappear on startup on some configurations (seems to be a graphics issue) --> try to resize window to get them back
|
||||||
|
- filling the watch list ith calsigns is taking ages.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -28,8 +28,11 @@
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
|
this.components = new System.ComponentModel.Container();
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Splash));
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Splash));
|
||||||
this.pb_Main = new System.Windows.Forms.PictureBox();
|
this.pb_Main = new System.Windows.Forms.PictureBox();
|
||||||
|
this.ti_Close = new System.Windows.Forms.Timer(this.components);
|
||||||
|
this.ti_Animation = new System.Windows.Forms.Timer(this.components);
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pb_Main)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.pb_Main)).BeginInit();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
|
@ -43,6 +46,19 @@
|
||||||
this.pb_Main.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
this.pb_Main.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||||
this.pb_Main.TabIndex = 0;
|
this.pb_Main.TabIndex = 0;
|
||||||
this.pb_Main.TabStop = false;
|
this.pb_Main.TabStop = false;
|
||||||
|
this.pb_Main.Paint += new System.Windows.Forms.PaintEventHandler(this.pb_Main_Paint);
|
||||||
|
//
|
||||||
|
// ti_Close
|
||||||
|
//
|
||||||
|
this.ti_Close.Enabled = true;
|
||||||
|
this.ti_Close.Interval = 60000;
|
||||||
|
this.ti_Close.Tick += new System.EventHandler(this.ti_Close_Tick);
|
||||||
|
//
|
||||||
|
// ti_Animation
|
||||||
|
//
|
||||||
|
this.ti_Animation.Enabled = true;
|
||||||
|
this.ti_Animation.Interval = 20;
|
||||||
|
this.ti_Animation.Tick += new System.EventHandler(this.ti_Animation_Tick);
|
||||||
//
|
//
|
||||||
// Splash
|
// Splash
|
||||||
//
|
//
|
||||||
|
@ -59,6 +75,7 @@
|
||||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
this.Text = "Splash";
|
this.Text = "Splash";
|
||||||
|
this.TopMost = true;
|
||||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Splash_FormClosing);
|
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Splash_FormClosing);
|
||||||
this.Load += new System.EventHandler(this.Splash_Load);
|
this.Load += new System.EventHandler(this.Splash_Load);
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pb_Main)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.pb_Main)).EndInit();
|
||||||
|
@ -69,5 +86,7 @@
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private System.Windows.Forms.PictureBox pb_Main;
|
private System.Windows.Forms.PictureBox pb_Main;
|
||||||
|
private System.Windows.Forms.Timer ti_Close;
|
||||||
|
private System.Windows.Forms.Timer ti_Animation;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -13,6 +13,7 @@ namespace AirScout
|
||||||
{
|
{
|
||||||
public partial class Splash : Form
|
public partial class Splash : Form
|
||||||
{
|
{
|
||||||
|
Label version;
|
||||||
Label status;
|
Label status;
|
||||||
|
|
||||||
// Define the CS_DROPSHADOW constant
|
// Define the CS_DROPSHADOW constant
|
||||||
|
@ -26,8 +27,10 @@ namespace AirScout
|
||||||
CreateParams cp = base.CreateParams;
|
CreateParams cp = base.CreateParams;
|
||||||
// change window style to dropshadow
|
// change window style to dropshadow
|
||||||
// does not work under Linux/Mono
|
// does not work under Linux/Mono
|
||||||
|
/*
|
||||||
if (!SupportFunctions.IsMono)
|
if (!SupportFunctions.IsMono)
|
||||||
cp.ClassStyle |= CS_DROPSHADOW;
|
cp.ClassStyle |= CS_DROPSHADOW;
|
||||||
|
*/
|
||||||
return cp;
|
return cp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,6 +44,7 @@ namespace AirScout
|
||||||
FormBorderStyle = FormBorderStyle.None;
|
FormBorderStyle = FormBorderStyle.None;
|
||||||
else
|
else
|
||||||
FormBorderStyle = FormBorderStyle.FixedSingle;
|
FormBorderStyle = FormBorderStyle.FixedSingle;
|
||||||
|
// initialize status label
|
||||||
status = new Label();
|
status = new Label();
|
||||||
status.Parent = pb_Main;
|
status.Parent = pb_Main;
|
||||||
status.BackColor = Color.Transparent;
|
status.BackColor = Color.Transparent;
|
||||||
|
@ -50,6 +54,8 @@ namespace AirScout
|
||||||
status.Width = 350;
|
status.Width = 350;
|
||||||
status.Font = new System.Drawing.Font(this.Font, FontStyle.Italic);
|
status.Font = new System.Drawing.Font(this.Font, FontStyle.Italic);
|
||||||
status.TextAlign = ContentAlignment.MiddleCenter;
|
status.TextAlign = ContentAlignment.MiddleCenter;
|
||||||
|
// set to full transparent view at first;
|
||||||
|
Opacity = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Status(string s)
|
public void Status(string s)
|
||||||
|
@ -67,10 +73,43 @@ namespace AirScout
|
||||||
|
|
||||||
private void Splash_Load(object sender, EventArgs e)
|
private void Splash_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
// start close timer
|
||||||
|
ti_Close.Start();
|
||||||
|
// start animation timer
|
||||||
|
ti_Animation.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Splash_FormClosing(object sender, FormClosingEventArgs e)
|
private void Splash_FormClosing(object sender, FormClosingEventArgs e)
|
||||||
{
|
{
|
||||||
|
// stop timers
|
||||||
|
ti_Animation.Stop();
|
||||||
|
ti_Close.Stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ti_Close_Tick(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
// close form immediately if not closed by main form
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ti_Animation_Tick(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (this.Opacity < 1)
|
||||||
|
{
|
||||||
|
this.Opacity += 0.01;
|
||||||
|
ti_Animation.Start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void pb_Main_Paint(object sender, PaintEventArgs e)
|
||||||
|
{
|
||||||
|
// show Version
|
||||||
|
string text = "Version " + Application.ProductVersion;
|
||||||
|
using (Font myFont = new System.Drawing.Font(this.Font.FontFamily, 24, FontStyle.Bold | FontStyle.Italic))
|
||||||
|
{
|
||||||
|
e.Graphics.DrawString(text, myFont, Brushes.DimGray, new Point(140, 10));
|
||||||
|
e.Graphics.DrawString(text, myFont, Brushes.White, new Point(140-2, 10-2));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,6 +117,12 @@
|
||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
|
<metadata name="ti_Close.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="ti_Animation.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>110, 17</value>
|
||||||
|
</metadata>
|
||||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using OxyPlot;
|
||||||
|
|
||||||
|
namespace AirScout
|
||||||
|
{
|
||||||
|
public class TooltipDataPoint : IDataPointProvider
|
||||||
|
{
|
||||||
|
public double X { get; set; }
|
||||||
|
public double Y { get; set; }
|
||||||
|
public string Tooltip { get; set; }
|
||||||
|
public DataPoint GetDataPoint() => new DataPoint(X, Y);
|
||||||
|
|
||||||
|
public TooltipDataPoint(double x, double y, string tooltip)
|
||||||
|
{
|
||||||
|
X = x;
|
||||||
|
Y = y;
|
||||||
|
Tooltip = tooltip;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -170,7 +170,7 @@ Initial Version
|
||||||
- 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: 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)
|
- Bugfix: Calculation of elevation angle is wrong, always showing abt. 0°, tracking not working --> fixed (tnx IN3UPQ)
|
||||||
|
|
||||||
2020-xx-xx: V1.3.0.7
|
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: The AirScout_clean.cmd does not work properly when trying to cleanup files (database files are locked) --> fixed
|
||||||
|
@ -178,11 +178,34 @@ Initial Version
|
||||||
- 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: 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
|
- 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: 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 DF9IC)
|
- 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: 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 DF9IC)
|
- 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)
|
- 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)
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ namespace AirScout
|
||||||
}
|
}
|
||||||
|
|
||||||
public WatchlistItem(string call, string loc, bool oor) : this(call, loc, oor, false, false) { }
|
public WatchlistItem(string call, string loc, bool oor) : this(call, loc, oor, false, false) { }
|
||||||
public WatchlistItem(string call, string loc, bool check, bool oor, bool selected )
|
public WatchlistItem(string call, string loc, bool oor, bool check, bool selected )
|
||||||
{
|
{
|
||||||
Call = call;
|
Call = call;
|
||||||
Loc = loc;
|
Loc = loc;
|
||||||
|
|
|
@ -29,10 +29,8 @@
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.components = new System.ComponentModel.Container();
|
this.components = new System.ComponentModel.Container();
|
||||||
this.lv_Watchlist_Callsigns = new System.Windows.Forms.ListView();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
this.ch_Watchlist_Callsgings_Call = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
this.lv_Watchlist_Selected = new System.Windows.Forms.ListView();
|
|
||||||
this.ch_Watchlist_Selected_Calls = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
|
||||||
this.ss_Watchlist_Main = new System.Windows.Forms.StatusStrip();
|
this.ss_Watchlist_Main = new System.Windows.Forms.StatusStrip();
|
||||||
this.tsl_Watchlist_Main = new System.Windows.Forms.ToolStripStatusLabel();
|
this.tsl_Watchlist_Main = new System.Windows.Forms.ToolStripStatusLabel();
|
||||||
this.btn_Watchlist_Add = new System.Windows.Forms.Button();
|
this.btn_Watchlist_Add = new System.Windows.Forms.Button();
|
||||||
|
@ -42,57 +40,25 @@
|
||||||
this.btn_Watchlist_Cancel = new System.Windows.Forms.Button();
|
this.btn_Watchlist_Cancel = new System.Windows.Forms.Button();
|
||||||
this.btn_Watchlist_OK = new System.Windows.Forms.Button();
|
this.btn_Watchlist_OK = new System.Windows.Forms.Button();
|
||||||
this.label1 = new System.Windows.Forms.Label();
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.tb_Watchlist_Callsigns = new System.Windows.Forms.TextBox();
|
||||||
|
this.tb_Watchlist_Selected = new System.Windows.Forms.TextBox();
|
||||||
|
this.bw_Watchlist_Fill = new System.ComponentModel.BackgroundWorker();
|
||||||
|
this.dgv_Watchlist_Callsigns = new System.Windows.Forms.DataGridView();
|
||||||
|
this.dgv_Watchlist_Selected = new System.Windows.Forms.DataGridView();
|
||||||
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
|
this.label3 = new System.Windows.Forms.Label();
|
||||||
this.ss_Watchlist_Main.SuspendLayout();
|
this.ss_Watchlist_Main.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dgv_Watchlist_Callsigns)).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dgv_Watchlist_Selected)).BeginInit();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// lv_Watchlist_Callsigns
|
|
||||||
//
|
|
||||||
this.lv_Watchlist_Callsigns.AutoArrange = false;
|
|
||||||
this.lv_Watchlist_Callsigns.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
|
||||||
this.ch_Watchlist_Callsgings_Call});
|
|
||||||
this.lv_Watchlist_Callsigns.FullRowSelect = true;
|
|
||||||
this.lv_Watchlist_Callsigns.Location = new System.Drawing.Point(12, 50);
|
|
||||||
this.lv_Watchlist_Callsigns.Name = "lv_Watchlist_Callsigns";
|
|
||||||
this.lv_Watchlist_Callsigns.ShowGroups = false;
|
|
||||||
this.lv_Watchlist_Callsigns.Size = new System.Drawing.Size(140, 300);
|
|
||||||
this.lv_Watchlist_Callsigns.TabIndex = 2;
|
|
||||||
this.lv_Watchlist_Callsigns.UseCompatibleStateImageBehavior = false;
|
|
||||||
this.lv_Watchlist_Callsigns.View = System.Windows.Forms.View.Details;
|
|
||||||
this.lv_Watchlist_Callsigns.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.lv_Watchlist_Callsigns_MouseDoubleClick);
|
|
||||||
//
|
|
||||||
// ch_Watchlist_Callsgings_Call
|
|
||||||
//
|
|
||||||
this.ch_Watchlist_Callsgings_Call.Text = "Available Callsigns";
|
|
||||||
this.ch_Watchlist_Callsgings_Call.Width = 118;
|
|
||||||
//
|
|
||||||
// lv_Watchlist_Selected
|
|
||||||
//
|
|
||||||
this.lv_Watchlist_Selected.AutoArrange = false;
|
|
||||||
this.lv_Watchlist_Selected.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
|
||||||
this.ch_Watchlist_Selected_Calls});
|
|
||||||
this.lv_Watchlist_Selected.FullRowSelect = true;
|
|
||||||
this.lv_Watchlist_Selected.Location = new System.Drawing.Point(318, 50);
|
|
||||||
this.lv_Watchlist_Selected.Name = "lv_Watchlist_Selected";
|
|
||||||
this.lv_Watchlist_Selected.ShowGroups = false;
|
|
||||||
this.lv_Watchlist_Selected.Size = new System.Drawing.Size(140, 300);
|
|
||||||
this.lv_Watchlist_Selected.Sorting = System.Windows.Forms.SortOrder.Ascending;
|
|
||||||
this.lv_Watchlist_Selected.TabIndex = 3;
|
|
||||||
this.lv_Watchlist_Selected.UseCompatibleStateImageBehavior = false;
|
|
||||||
this.lv_Watchlist_Selected.View = System.Windows.Forms.View.Details;
|
|
||||||
this.lv_Watchlist_Selected.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.lv_Watchlist_Selected_MouseDoubleClick);
|
|
||||||
//
|
|
||||||
// ch_Watchlist_Selected_Calls
|
|
||||||
//
|
|
||||||
this.ch_Watchlist_Selected_Calls.Text = "Selected Callsigns";
|
|
||||||
this.ch_Watchlist_Selected_Calls.Width = 118;
|
|
||||||
//
|
|
||||||
// ss_Watchlist_Main
|
// ss_Watchlist_Main
|
||||||
//
|
//
|
||||||
this.ss_Watchlist_Main.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
this.ss_Watchlist_Main.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
this.tsl_Watchlist_Main});
|
this.tsl_Watchlist_Main});
|
||||||
this.ss_Watchlist_Main.Location = new System.Drawing.Point(0, 400);
|
this.ss_Watchlist_Main.Location = new System.Drawing.Point(0, 435);
|
||||||
this.ss_Watchlist_Main.Name = "ss_Watchlist_Main";
|
this.ss_Watchlist_Main.Name = "ss_Watchlist_Main";
|
||||||
this.ss_Watchlist_Main.Size = new System.Drawing.Size(487, 22);
|
this.ss_Watchlist_Main.Size = new System.Drawing.Size(484, 22);
|
||||||
this.ss_Watchlist_Main.TabIndex = 4;
|
this.ss_Watchlist_Main.TabIndex = 4;
|
||||||
//
|
//
|
||||||
// tsl_Watchlist_Main
|
// tsl_Watchlist_Main
|
||||||
|
@ -103,10 +69,11 @@
|
||||||
//
|
//
|
||||||
// btn_Watchlist_Add
|
// btn_Watchlist_Add
|
||||||
//
|
//
|
||||||
|
this.btn_Watchlist_Add.Enabled = false;
|
||||||
this.btn_Watchlist_Add.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.btn_Watchlist_Add.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.btn_Watchlist_Add.Location = new System.Drawing.Point(201, 131);
|
this.btn_Watchlist_Add.Location = new System.Drawing.Point(207, 176);
|
||||||
this.btn_Watchlist_Add.Name = "btn_Watchlist_Add";
|
this.btn_Watchlist_Add.Name = "btn_Watchlist_Add";
|
||||||
this.btn_Watchlist_Add.Size = new System.Drawing.Size(69, 29);
|
this.btn_Watchlist_Add.Size = new System.Drawing.Size(70, 30);
|
||||||
this.btn_Watchlist_Add.TabIndex = 5;
|
this.btn_Watchlist_Add.TabIndex = 5;
|
||||||
this.btn_Watchlist_Add.Text = ">";
|
this.btn_Watchlist_Add.Text = ">";
|
||||||
this.tt_Watchlist_Main.SetToolTip(this.btn_Watchlist_Add, "Add selected call to watchlist.");
|
this.tt_Watchlist_Main.SetToolTip(this.btn_Watchlist_Add, "Add selected call to watchlist.");
|
||||||
|
@ -115,10 +82,11 @@
|
||||||
//
|
//
|
||||||
// btn_Watchlist_Remove
|
// btn_Watchlist_Remove
|
||||||
//
|
//
|
||||||
|
this.btn_Watchlist_Remove.Enabled = false;
|
||||||
this.btn_Watchlist_Remove.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.btn_Watchlist_Remove.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.btn_Watchlist_Remove.Location = new System.Drawing.Point(201, 181);
|
this.btn_Watchlist_Remove.Location = new System.Drawing.Point(207, 226);
|
||||||
this.btn_Watchlist_Remove.Name = "btn_Watchlist_Remove";
|
this.btn_Watchlist_Remove.Name = "btn_Watchlist_Remove";
|
||||||
this.btn_Watchlist_Remove.Size = new System.Drawing.Size(69, 29);
|
this.btn_Watchlist_Remove.Size = new System.Drawing.Size(70, 30);
|
||||||
this.btn_Watchlist_Remove.TabIndex = 6;
|
this.btn_Watchlist_Remove.TabIndex = 6;
|
||||||
this.btn_Watchlist_Remove.Text = "<";
|
this.btn_Watchlist_Remove.Text = "<";
|
||||||
this.tt_Watchlist_Main.SetToolTip(this.btn_Watchlist_Remove, "Remove selected call from watchlist.");
|
this.tt_Watchlist_Main.SetToolTip(this.btn_Watchlist_Remove, "Remove selected call from watchlist.");
|
||||||
|
@ -127,10 +95,11 @@
|
||||||
//
|
//
|
||||||
// btn_Watchlist_RemoveAll
|
// btn_Watchlist_RemoveAll
|
||||||
//
|
//
|
||||||
|
this.btn_Watchlist_RemoveAll.Enabled = false;
|
||||||
this.btn_Watchlist_RemoveAll.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.btn_Watchlist_RemoveAll.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.btn_Watchlist_RemoveAll.Location = new System.Drawing.Point(201, 229);
|
this.btn_Watchlist_RemoveAll.Location = new System.Drawing.Point(207, 274);
|
||||||
this.btn_Watchlist_RemoveAll.Name = "btn_Watchlist_RemoveAll";
|
this.btn_Watchlist_RemoveAll.Name = "btn_Watchlist_RemoveAll";
|
||||||
this.btn_Watchlist_RemoveAll.Size = new System.Drawing.Size(69, 29);
|
this.btn_Watchlist_RemoveAll.Size = new System.Drawing.Size(70, 30);
|
||||||
this.btn_Watchlist_RemoveAll.TabIndex = 7;
|
this.btn_Watchlist_RemoveAll.TabIndex = 7;
|
||||||
this.btn_Watchlist_RemoveAll.Text = "<<";
|
this.btn_Watchlist_RemoveAll.Text = "<<";
|
||||||
this.tt_Watchlist_Main.SetToolTip(this.btn_Watchlist_RemoveAll, "Remove all calls from watchlist.");
|
this.tt_Watchlist_Main.SetToolTip(this.btn_Watchlist_RemoveAll, "Remove all calls from watchlist.");
|
||||||
|
@ -140,7 +109,7 @@
|
||||||
// btn_Watchlist_Cancel
|
// btn_Watchlist_Cancel
|
||||||
//
|
//
|
||||||
this.btn_Watchlist_Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
this.btn_Watchlist_Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||||
this.btn_Watchlist_Cancel.Location = new System.Drawing.Point(161, 365);
|
this.btn_Watchlist_Cancel.Location = new System.Drawing.Point(147, 402);
|
||||||
this.btn_Watchlist_Cancel.Name = "btn_Watchlist_Cancel";
|
this.btn_Watchlist_Cancel.Name = "btn_Watchlist_Cancel";
|
||||||
this.btn_Watchlist_Cancel.Size = new System.Drawing.Size(75, 23);
|
this.btn_Watchlist_Cancel.Size = new System.Drawing.Size(75, 23);
|
||||||
this.btn_Watchlist_Cancel.TabIndex = 8;
|
this.btn_Watchlist_Cancel.TabIndex = 8;
|
||||||
|
@ -150,7 +119,8 @@
|
||||||
// btn_Watchlist_OK
|
// btn_Watchlist_OK
|
||||||
//
|
//
|
||||||
this.btn_Watchlist_OK.DialogResult = System.Windows.Forms.DialogResult.OK;
|
this.btn_Watchlist_OK.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||||
this.btn_Watchlist_OK.Location = new System.Drawing.Point(242, 365);
|
this.btn_Watchlist_OK.Enabled = false;
|
||||||
|
this.btn_Watchlist_OK.Location = new System.Drawing.Point(237, 402);
|
||||||
this.btn_Watchlist_OK.Name = "btn_Watchlist_OK";
|
this.btn_Watchlist_OK.Name = "btn_Watchlist_OK";
|
||||||
this.btn_Watchlist_OK.Size = new System.Drawing.Size(75, 23);
|
this.btn_Watchlist_OK.Size = new System.Drawing.Size(75, 23);
|
||||||
this.btn_Watchlist_OK.TabIndex = 9;
|
this.btn_Watchlist_OK.TabIndex = 9;
|
||||||
|
@ -161,19 +131,129 @@
|
||||||
//
|
//
|
||||||
this.label1.AutoSize = true;
|
this.label1.AutoSize = true;
|
||||||
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.label1.Location = new System.Drawing.Point(43, 20);
|
this.label1.Location = new System.Drawing.Point(43, 13);
|
||||||
this.label1.Name = "label1";
|
this.label1.Name = "label1";
|
||||||
this.label1.Size = new System.Drawing.Size(406, 16);
|
this.label1.Size = new System.Drawing.Size(406, 16);
|
||||||
this.label1.TabIndex = 10;
|
this.label1.TabIndex = 10;
|
||||||
this.label1.Text = "You can select callsigns from database and set them on a watchlist.";
|
this.label1.Text = "You can select callsigns from database and set them on a watchlist.";
|
||||||
//
|
//
|
||||||
|
// tb_Watchlist_Callsigns
|
||||||
|
//
|
||||||
|
this.tb_Watchlist_Callsigns.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
|
||||||
|
this.tb_Watchlist_Callsigns.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
this.tb_Watchlist_Callsigns.Location = new System.Drawing.Point(15, 75);
|
||||||
|
this.tb_Watchlist_Callsigns.Name = "tb_Watchlist_Callsigns";
|
||||||
|
this.tb_Watchlist_Callsigns.Size = new System.Drawing.Size(180, 20);
|
||||||
|
this.tb_Watchlist_Callsigns.TabIndex = 11;
|
||||||
|
this.tb_Watchlist_Callsigns.TextChanged += new System.EventHandler(this.tb_Watchlist_Callsigns_TextChanged);
|
||||||
|
//
|
||||||
|
// tb_Watchlist_Selected
|
||||||
|
//
|
||||||
|
this.tb_Watchlist_Selected.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
|
||||||
|
this.tb_Watchlist_Selected.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
this.tb_Watchlist_Selected.Location = new System.Drawing.Point(288, 75);
|
||||||
|
this.tb_Watchlist_Selected.Name = "tb_Watchlist_Selected";
|
||||||
|
this.tb_Watchlist_Selected.Size = new System.Drawing.Size(180, 20);
|
||||||
|
this.tb_Watchlist_Selected.TabIndex = 12;
|
||||||
|
this.tb_Watchlist_Selected.TextChanged += new System.EventHandler(this.tb_Watchlist_Selected_TextChanged);
|
||||||
|
//
|
||||||
|
// bw_Watchlist_Fill
|
||||||
|
//
|
||||||
|
this.bw_Watchlist_Fill.WorkerReportsProgress = true;
|
||||||
|
this.bw_Watchlist_Fill.WorkerSupportsCancellation = true;
|
||||||
|
this.bw_Watchlist_Fill.DoWork += new System.ComponentModel.DoWorkEventHandler(this.bw_Watchlist_Fill_DoWork);
|
||||||
|
this.bw_Watchlist_Fill.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.bw_Watchlist_Fill_ProgressChanged);
|
||||||
|
this.bw_Watchlist_Fill.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.bw_Watchlist_Fill_RunWorkerCompleted);
|
||||||
|
//
|
||||||
|
// dgv_Watchlist_Callsigns
|
||||||
|
//
|
||||||
|
this.dgv_Watchlist_Callsigns.AllowUserToAddRows = false;
|
||||||
|
this.dgv_Watchlist_Callsigns.AllowUserToDeleteRows = false;
|
||||||
|
this.dgv_Watchlist_Callsigns.AllowUserToResizeColumns = false;
|
||||||
|
this.dgv_Watchlist_Callsigns.AllowUserToResizeRows = false;
|
||||||
|
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;
|
||||||
|
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.RowHeadersVisible = false;
|
||||||
|
this.dgv_Watchlist_Callsigns.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||||
|
this.dgv_Watchlist_Callsigns.Size = new System.Drawing.Size(180, 280);
|
||||||
|
this.dgv_Watchlist_Callsigns.TabIndex = 13;
|
||||||
|
this.dgv_Watchlist_Callsigns.CellContentDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgv_Watchlist_Callsigns_CellContentDoubleClick);
|
||||||
|
this.dgv_Watchlist_Callsigns.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(this.dgv_Watchlist_Callsigns_CellPainting);
|
||||||
|
//
|
||||||
|
// dgv_Watchlist_Selected
|
||||||
|
//
|
||||||
|
this.dgv_Watchlist_Selected.AllowUserToAddRows = false;
|
||||||
|
this.dgv_Watchlist_Selected.AllowUserToDeleteRows = false;
|
||||||
|
this.dgv_Watchlist_Selected.AllowUserToResizeColumns = false;
|
||||||
|
this.dgv_Watchlist_Selected.AllowUserToResizeRows = false;
|
||||||
|
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;
|
||||||
|
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";
|
||||||
|
this.dgv_Watchlist_Selected.RowHeadersVisible = false;
|
||||||
|
this.dgv_Watchlist_Selected.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||||
|
this.dgv_Watchlist_Selected.Size = new System.Drawing.Size(180, 280);
|
||||||
|
this.dgv_Watchlist_Selected.TabIndex = 14;
|
||||||
|
this.dgv_Watchlist_Selected.CellContentDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgv_Watchlist_Selected_CellContentDoubleClick);
|
||||||
|
this.dgv_Watchlist_Selected.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(this.dgv_Watchlist_Selected_CellPainting);
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
this.label2.BackColor = System.Drawing.Color.Khaki;
|
||||||
|
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
this.label2.Location = new System.Drawing.Point(15, 42);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(180, 25);
|
||||||
|
this.label2.TabIndex = 15;
|
||||||
|
this.label2.Text = "Availbale Callsigns";
|
||||||
|
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||||
|
//
|
||||||
|
// label3
|
||||||
|
//
|
||||||
|
this.label3.BackColor = System.Drawing.Color.PaleGreen;
|
||||||
|
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
this.label3.Location = new System.Drawing.Point(288, 42);
|
||||||
|
this.label3.Name = "label3";
|
||||||
|
this.label3.Size = new System.Drawing.Size(180, 25);
|
||||||
|
this.label3.TabIndex = 16;
|
||||||
|
this.label3.Text = "Selected Callsigns";
|
||||||
|
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||||
|
//
|
||||||
// WatchlistDlg
|
// WatchlistDlg
|
||||||
//
|
//
|
||||||
this.AcceptButton = this.btn_Watchlist_OK;
|
this.AcceptButton = this.btn_Watchlist_OK;
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.CancelButton = this.btn_Watchlist_Cancel;
|
this.CancelButton = this.btn_Watchlist_Cancel;
|
||||||
this.ClientSize = new System.Drawing.Size(487, 422);
|
this.ClientSize = new System.Drawing.Size(484, 457);
|
||||||
|
this.Controls.Add(this.label3);
|
||||||
|
this.Controls.Add(this.label2);
|
||||||
|
this.Controls.Add(this.dgv_Watchlist_Selected);
|
||||||
|
this.Controls.Add(this.dgv_Watchlist_Callsigns);
|
||||||
|
this.Controls.Add(this.tb_Watchlist_Selected);
|
||||||
|
this.Controls.Add(this.tb_Watchlist_Callsigns);
|
||||||
this.Controls.Add(this.label1);
|
this.Controls.Add(this.label1);
|
||||||
this.Controls.Add(this.btn_Watchlist_OK);
|
this.Controls.Add(this.btn_Watchlist_OK);
|
||||||
this.Controls.Add(this.btn_Watchlist_Cancel);
|
this.Controls.Add(this.btn_Watchlist_Cancel);
|
||||||
|
@ -181,24 +261,20 @@
|
||||||
this.Controls.Add(this.btn_Watchlist_Remove);
|
this.Controls.Add(this.btn_Watchlist_Remove);
|
||||||
this.Controls.Add(this.btn_Watchlist_Add);
|
this.Controls.Add(this.btn_Watchlist_Add);
|
||||||
this.Controls.Add(this.ss_Watchlist_Main);
|
this.Controls.Add(this.ss_Watchlist_Main);
|
||||||
this.Controls.Add(this.lv_Watchlist_Selected);
|
|
||||||
this.Controls.Add(this.lv_Watchlist_Callsigns);
|
|
||||||
this.Name = "WatchlistDlg";
|
this.Name = "WatchlistDlg";
|
||||||
this.Text = "Manage Watchlist";
|
this.Text = "Manage Watchlist";
|
||||||
this.Load += new System.EventHandler(this.WatchlistDlg_Load);
|
this.Load += new System.EventHandler(this.WatchlistDlg_Load);
|
||||||
this.Shown += new System.EventHandler(this.WatchlistDlg_Shown);
|
this.Shown += new System.EventHandler(this.WatchlistDlg_Shown);
|
||||||
this.ss_Watchlist_Main.ResumeLayout(false);
|
this.ss_Watchlist_Main.ResumeLayout(false);
|
||||||
this.ss_Watchlist_Main.PerformLayout();
|
this.ss_Watchlist_Main.PerformLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dgv_Watchlist_Callsigns)).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dgv_Watchlist_Selected)).EndInit();
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
private System.Windows.Forms.ColumnHeader ch_Watchlist_Callsgings_Call;
|
|
||||||
private System.Windows.Forms.ColumnHeader ch_Watchlist_Selected_Calls;
|
|
||||||
public System.Windows.Forms.ListView lv_Watchlist_Callsigns;
|
|
||||||
public System.Windows.Forms.ListView lv_Watchlist_Selected;
|
|
||||||
private System.Windows.Forms.StatusStrip ss_Watchlist_Main;
|
private System.Windows.Forms.StatusStrip ss_Watchlist_Main;
|
||||||
private System.Windows.Forms.ToolStripStatusLabel tsl_Watchlist_Main;
|
private System.Windows.Forms.ToolStripStatusLabel tsl_Watchlist_Main;
|
||||||
private System.Windows.Forms.Button btn_Watchlist_Add;
|
private System.Windows.Forms.Button btn_Watchlist_Add;
|
||||||
|
@ -208,5 +284,12 @@
|
||||||
private System.Windows.Forms.Button btn_Watchlist_Cancel;
|
private System.Windows.Forms.Button btn_Watchlist_Cancel;
|
||||||
private System.Windows.Forms.Button btn_Watchlist_OK;
|
private System.Windows.Forms.Button btn_Watchlist_OK;
|
||||||
private System.Windows.Forms.Label label1;
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.TextBox tb_Watchlist_Callsigns;
|
||||||
|
private System.Windows.Forms.TextBox tb_Watchlist_Selected;
|
||||||
|
private System.ComponentModel.BackgroundWorker bw_Watchlist_Fill;
|
||||||
|
private System.Windows.Forms.DataGridView dgv_Watchlist_Callsigns;
|
||||||
|
public System.Windows.Forms.DataGridView dgv_Watchlist_Selected;
|
||||||
|
private System.Windows.Forms.Label label2;
|
||||||
|
private System.Windows.Forms.Label label3;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -13,9 +13,20 @@ namespace AirScout
|
||||||
{
|
{
|
||||||
public partial class WatchlistDlg : Form
|
public partial class WatchlistDlg : Form
|
||||||
{
|
{
|
||||||
|
List<LocationDesignator> AllLocations = new List<LocationDesignator>();
|
||||||
|
|
||||||
|
DataTable AllCallsigns = new DataTable();
|
||||||
|
DataTable SelectedCallsigns = new DataTable();
|
||||||
|
|
||||||
public WatchlistDlg()
|
public WatchlistDlg()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
AllCallsigns.Columns.Add("Call");
|
||||||
|
AllCallsigns.Columns.Add("Locator");
|
||||||
|
AllCallsigns.DefaultView.Sort = "Call ASC";
|
||||||
|
SelectedCallsigns.Columns.Add("Call");
|
||||||
|
SelectedCallsigns.Columns.Add("Locator");
|
||||||
|
SelectedCallsigns.DefaultView.Sort = "Call ASC";
|
||||||
}
|
}
|
||||||
|
|
||||||
private void WatchlistDlg_Load(object sender, EventArgs e)
|
private void WatchlistDlg_Load(object sender, EventArgs e)
|
||||||
|
@ -25,76 +36,209 @@ namespace AirScout
|
||||||
|
|
||||||
private void WatchlistDlg_Shown(object sender, EventArgs e)
|
private void WatchlistDlg_Shown(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
tsl_Watchlist_Main.Text = "Please wait while lists are being populated...";
|
// initially fill tables
|
||||||
ss_Watchlist_Main.Refresh();
|
bw_Watchlist_Fill.RunWorkerAsync();
|
||||||
List<LocationDesignator> l = StationData.Database.LocationGetAll();
|
}
|
||||||
lv_Watchlist_Callsigns.BeginUpdate();
|
|
||||||
foreach (LocationDesignator ld in l)
|
private void FillCallsigns (string filter)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
ListViewItem item = new ListViewItem(ld.Call);
|
AllCallsigns.Rows.Clear();
|
||||||
item.Name = ld.Call;
|
dgv_Watchlist_Callsigns.DataSource = null;
|
||||||
lv_Watchlist_Callsigns.Items.Add(item);
|
foreach (LocationDesignator ld in AllLocations)
|
||||||
|
{
|
||||||
|
DataRow row = AllCallsigns.NewRow();
|
||||||
|
row[0] = ld.Call;
|
||||||
|
row[1] = ld.Loc;
|
||||||
|
AllCallsigns.Rows.Add(row);
|
||||||
|
}
|
||||||
|
dgv_Watchlist_Callsigns.DataSource = AllCallsigns;
|
||||||
}
|
}
|
||||||
lv_Watchlist_Callsigns.EndUpdate();
|
catch (Exception ex)
|
||||||
lv_Watchlist_Selected.BeginUpdate();
|
|
||||||
lv_Watchlist_Selected.Items.Clear();
|
|
||||||
foreach (WatchlistItem item in Properties.Settings.Default.Watchlist)
|
|
||||||
{
|
{
|
||||||
ListViewItem lvi = new ListViewItem(item.Call);
|
Console.WriteLine("Watchlist.FillItems: " + ex.ToString());
|
||||||
lvi.SubItems.Add(new ListViewItem.ListViewSubItem(lvi, item.Loc));
|
}
|
||||||
if (item.Checked)
|
}
|
||||||
lvi.Checked = true;
|
|
||||||
if (item.Selected)
|
private void FillSelected(string filter)
|
||||||
lvi.Selected = true;
|
{
|
||||||
lv_Watchlist_Selected.Items.Add(lvi);
|
try
|
||||||
lv_Watchlist_Selected.Sort();
|
{
|
||||||
|
SelectedCallsigns.Rows.Clear();
|
||||||
|
dgv_Watchlist_Selected.DataSource = null;
|
||||||
|
foreach (WatchlistItem item in Properties.Settings.Default.Watchlist)
|
||||||
|
{
|
||||||
|
DataRow row = SelectedCallsigns.NewRow();
|
||||||
|
row[0] = item.Call;
|
||||||
|
row[1] = item.Loc;
|
||||||
|
SelectedCallsigns.Rows.Add(row);
|
||||||
|
}
|
||||||
|
dgv_Watchlist_Selected.DataSource = SelectedCallsigns;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Watchlist.FillItems: " + ex.ToString());
|
||||||
}
|
}
|
||||||
lv_Watchlist_Selected.EndUpdate();
|
|
||||||
tsl_Watchlist_Main.Text = "";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btn_Watchlist_Add_Click(object sender, EventArgs e)
|
private void btn_Watchlist_Add_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if(lv_Watchlist_Callsigns.SelectedItems.Count > 0)
|
try
|
||||||
{
|
{
|
||||||
foreach (ListViewItem item in lv_Watchlist_Callsigns.SelectedItems)
|
if (dgv_Watchlist_Callsigns.SelectedRows != null)
|
||||||
{
|
{
|
||||||
ListViewItem newitem = new ListViewItem(item.Name);
|
foreach (DataGridViewRow selectedrow in dgv_Watchlist_Callsigns.SelectedRows)
|
||||||
newitem.Name = item.Name;
|
{
|
||||||
lv_Watchlist_Selected.Items.Add(newitem);
|
// search row content in selected calls first
|
||||||
|
string sql = "Call = '" + selectedrow.Cells[0].Value.ToString() + "' AND Locator = '" + selectedrow.Cells[1].Value.ToString() + "'";
|
||||||
|
DataRow[] result = SelectedCallsigns.Select(sql);
|
||||||
|
if ((result == null) || (result.Length == 0))
|
||||||
|
{
|
||||||
|
DataRow row = SelectedCallsigns.NewRow();
|
||||||
|
row[0] = selectedrow.Cells[0].Value;
|
||||||
|
row[1] = selectedrow.Cells[1].Value;
|
||||||
|
SelectedCallsigns.Rows.Add(row);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btn_Watchlist_Remove_Click(object sender, EventArgs e)
|
private void btn_Watchlist_Remove_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (lv_Watchlist_Selected.SelectedItems.Count > 0)
|
try
|
||||||
{
|
{
|
||||||
foreach (ListViewItem item in lv_Watchlist_Selected.SelectedItems)
|
if (dgv_Watchlist_Selected.SelectedRows != null)
|
||||||
{
|
{
|
||||||
try
|
// keep the selected rows in a separate List as the selection changes dynamically when deleting rows from table
|
||||||
|
List<DataRow> SelectedRows = new List<DataRow>();
|
||||||
|
foreach (DataGridViewRow selectedrow in dgv_Watchlist_Selected.SelectedRows)
|
||||||
{
|
{
|
||||||
lv_Watchlist_Selected.Items.RemoveByKey(item.Name);
|
DataRow row = SelectedCallsigns.NewRow();
|
||||||
|
row[0] = selectedrow.Cells[0].Value.ToString();
|
||||||
|
row[1] = selectedrow.Cells[1].Value.ToString();
|
||||||
|
SelectedRows.Add(row);
|
||||||
}
|
}
|
||||||
catch
|
SelectedCallsigns.AcceptChanges();
|
||||||
|
foreach (DataRow selectedrow in SelectedRows)
|
||||||
{
|
{
|
||||||
|
foreach (DataRow row in SelectedCallsigns.Rows)
|
||||||
|
{
|
||||||
|
if ((row[0].ToString() == selectedrow[0].ToString()) && (row[1].ToString() == selectedrow[1].ToString()))
|
||||||
|
{
|
||||||
|
// row found --> delete row in table, commit changes immediately and exit iteration
|
||||||
|
row.Delete();
|
||||||
|
SelectedCallsigns.AcceptChanges();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btn_Watchlist_RemoveAll_Click(object sender, EventArgs e)
|
private void btn_Watchlist_RemoveAll_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
lv_Watchlist_Selected.Items.Clear();
|
SelectedCallsigns.Rows.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void lv_Watchlist_Callsigns_MouseDoubleClick(object sender, MouseEventArgs e)
|
private void tb_Watchlist_Callsigns_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
AllCallsigns.DefaultView.RowFilter = "[Call] LIKE '" + tb_Watchlist_Callsigns.Text + "%'";
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void tb_Watchlist_Selected_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
SelectedCallsigns.DefaultView.RowFilter = "[Call] LIKE '" + tb_Watchlist_Selected.Text + "%'";
|
||||||
|
}
|
||||||
|
|
||||||
|
private void bw_Watchlist_Fill_DoWork(object sender, DoWorkEventArgs e)
|
||||||
|
{
|
||||||
|
bw_Watchlist_Fill.ReportProgress(0, "Lists are being populated. Please wait...");
|
||||||
|
// get all available callsigns from database
|
||||||
|
lock (AllLocations)
|
||||||
|
{
|
||||||
|
AllLocations = StationData.Database.LocationGetAll(bw_Watchlist_Fill, Properties.Settings.Default.MinLat, Properties.Settings.Default.MinLon, Properties.Settings.Default.MaxLat, Properties.Settings.Default.MaxLon);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void bw_Watchlist_Fill_ProgressChanged(object sender, ProgressChangedEventArgs e)
|
||||||
|
{
|
||||||
|
// report message
|
||||||
|
if (e.ProgressPercentage <= 0)
|
||||||
|
{
|
||||||
|
tsl_Watchlist_Main.Text = (string)e.UserState;
|
||||||
|
ss_Watchlist_Main.Refresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void bw_Watchlist_Fill_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
|
||||||
|
{
|
||||||
|
tsl_Watchlist_Main.Text = "Adding callsigns to list. Please wait...";
|
||||||
|
ss_Watchlist_Main.Refresh();
|
||||||
|
FillCallsigns(tb_Watchlist_Callsigns.Text);
|
||||||
|
FillSelected(tb_Watchlist_Selected.Text);
|
||||||
|
tsl_Watchlist_Main.Text = "";
|
||||||
|
btn_Watchlist_Add.Enabled = true;
|
||||||
|
btn_Watchlist_Remove.Enabled = true;
|
||||||
|
btn_Watchlist_RemoveAll.Enabled = true;
|
||||||
|
btn_Watchlist_OK.Enabled = true;
|
||||||
|
tsl_Watchlist_Main.Text = "Ready.";
|
||||||
|
ss_Watchlist_Main.Refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void dgv_Watchlist_Callsigns_CellPainting(object sender, DataGridViewCellPaintingEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.ColumnIndex < 0)
|
||||||
|
return;
|
||||||
|
if (e.RowIndex < 0)
|
||||||
|
return;
|
||||||
|
e.Paint(e.CellBounds, DataGridViewPaintParts.All);
|
||||||
|
var r = e.CellBounds;
|
||||||
|
e.Graphics.DrawLine(Pens.LightGray, r.Left, r.Top, r.Right, r.Top);
|
||||||
|
e.Graphics.DrawLine(Pens.LightGray, r.Left, r.Top, r.Left, r.Bottom);
|
||||||
|
e.Graphics.DrawLine(Pens.LightGray, r.Left, r.Bottom, r.Right, r.Bottom);
|
||||||
|
e.Graphics.DrawLine(Pens.LightGray, r.Right, r.Top, r.Right, r.Bottom);
|
||||||
|
e.Handled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void dgv_Watchlist_Selected_CellPainting(object sender, DataGridViewCellPaintingEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.ColumnIndex < 0)
|
||||||
|
return;
|
||||||
|
if (e.RowIndex < 0)
|
||||||
|
return;
|
||||||
|
e.Paint(e.CellBounds, DataGridViewPaintParts.All);
|
||||||
|
var r = e.CellBounds;
|
||||||
|
e.Graphics.DrawLine(Pens.LightGray, r.Left, r.Top, r.Right, r.Top);
|
||||||
|
e.Graphics.DrawLine(Pens.LightGray, r.Left, r.Top, r.Left, r.Bottom);
|
||||||
|
e.Graphics.DrawLine(Pens.LightGray, r.Left, r.Bottom, r.Right, r.Bottom);
|
||||||
|
e.Graphics.DrawLine(Pens.LightGray, r.Right, r.Top, r.Right, r.Bottom);
|
||||||
|
e.Handled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void dgv_Watchlist_Callsigns_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
|
||||||
{
|
{
|
||||||
btn_Watchlist_Add_Click(this, null);
|
btn_Watchlist_Add_Click(this, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void lv_Watchlist_Selected_MouseDoubleClick(object sender, MouseEventArgs e)
|
private void dgv_Watchlist_Selected_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
|
||||||
{
|
{
|
||||||
btn_Watchlist_Remove_Click(this, null);
|
btn_Watchlist_Remove_Click(this, null);
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,4 +123,10 @@
|
||||||
<metadata name="tt_Watchlist_Main.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<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>
|
<value>167, 17</value>
|
||||||
</metadata>
|
</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>
|
||||||
</root>
|
</root>
|
|
@ -300,7 +300,14 @@ namespace ScoutBase.Core
|
||||||
string[] files = Directory.GetFiles(dir, filter);
|
string[] files = Directory.GetFiles(dir, filter);
|
||||||
foreach (string file in files)
|
foreach (string file in files)
|
||||||
{
|
{
|
||||||
File.Delete(file);
|
try
|
||||||
|
{
|
||||||
|
File.Delete(file);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("DeleteFilesFromDirectory: " + ex.ToString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -315,7 +322,14 @@ namespace ScoutBase.Core
|
||||||
string[] files = filters.SelectMany(f => Directory.GetFiles(dir, f)).ToArray();
|
string[] files = filters.SelectMany(f => Directory.GetFiles(dir, f)).ToArray();
|
||||||
foreach (string file in files)
|
foreach (string file in files)
|
||||||
{
|
{
|
||||||
File.Delete(file);
|
try
|
||||||
|
{
|
||||||
|
File.Delete(file);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("DeleteFilesFromDirectory: " + ex.ToString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -288,6 +288,7 @@ namespace ScoutBase.Elevation
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
SupportFunctions.DeleteFilesFromDirectory(TmpDirectory, new string[] { "*.tmp", "*.PendingOverwrite" });
|
SupportFunctions.DeleteFilesFromDirectory(TmpDirectory, new string[] { "*.tmp", "*.PendingOverwrite" });
|
||||||
|
SupportFunctions.DeleteFilesFromDirectory(ElevationData.Database.DefaultDatabaseDirectory(StartOptions.Model), new string[] { "*.tmp", "*.PendingOverwrite" });
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
|
@ -559,7 +559,7 @@ namespace ScoutBase.Stations
|
||||||
if (caller.WorkerSupportsCancellation && caller.CancellationPending)
|
if (caller.WorkerSupportsCancellation && caller.CancellationPending)
|
||||||
return new List<LocationDesignator>();
|
return new List<LocationDesignator>();
|
||||||
if (caller.WorkerReportsProgress && (i % 1000 == 0))
|
if (caller.WorkerReportsProgress && (i % 1000 == 0))
|
||||||
caller.ReportProgress(0, "Getting location " + i.ToString() + " of");
|
caller.ReportProgress(0, "Getting location " + i.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
reader.Close();
|
reader.Close();
|
||||||
|
@ -612,7 +612,7 @@ namespace ScoutBase.Stations
|
||||||
if (caller.WorkerSupportsCancellation && caller.CancellationPending)
|
if (caller.WorkerSupportsCancellation && caller.CancellationPending)
|
||||||
return new List<LocationDesignator>();
|
return new List<LocationDesignator>();
|
||||||
if (caller.WorkerReportsProgress && (i % 1000 == 0))
|
if (caller.WorkerReportsProgress && (i % 1000 == 0))
|
||||||
caller.ReportProgress(0, "Getting location " + i.ToString() + " of");
|
caller.ReportProgress(0, "Getting location " + i.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
reader.Close();
|
reader.Close();
|
||||||
|
|
Ładowanie…
Reference in New Issue