diff --git a/AirScout/AirScout.csproj b/AirScout/AirScout.csproj
index 6b6dd4b..cfc9a56 100644
--- a/AirScout/AirScout.csproj
+++ b/AirScout/AirScout.csproj
@@ -136,6 +136,12 @@
+
+ Form
+
+
+ DeleteSingleStationDlg.cs
+
@@ -339,6 +345,9 @@
DatabaseMaintenanceDlg.cs
+
+ DeleteSingleStationDlg.cs
+
ElevationCopyrightDlg.cs
diff --git a/AirScout/DeleteSingleStationDlg.Designer.cs b/AirScout/DeleteSingleStationDlg.Designer.cs
new file mode 100644
index 0000000..9f71800
--- /dev/null
+++ b/AirScout/DeleteSingleStationDlg.Designer.cs
@@ -0,0 +1,140 @@
+namespace AirScout
+{
+ partial class DeleteSingleStationDlg
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DeleteSingleStationDlg));
+ this.label1 = new System.Windows.Forms.Label();
+ this.cb_Call = new System.Windows.Forms.ComboBox();
+ this.cb_Locator = new System.Windows.Forms.ComboBox();
+ this.label2 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.btn_Delete = new System.Windows.Forms.Button();
+ this.btn_Cancel = new System.Windows.Forms.Button();
+ this.SuspendLayout();
+ //
+ // label1
+ //
+ 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(12, 19);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(464, 92);
+ this.label1.TabIndex = 0;
+ this.label1.Text = resources.GetString("label1.Text");
+ //
+ // cb_Call
+ //
+ this.cb_Call.FormattingEnabled = true;
+ this.cb_Call.Location = new System.Drawing.Point(55, 132);
+ this.cb_Call.Name = "cb_Call";
+ this.cb_Call.Size = new System.Drawing.Size(121, 21);
+ this.cb_Call.TabIndex = 1;
+ this.cb_Call.DropDown += new System.EventHandler(this.cb_Call_DropDown);
+ this.cb_Call.SelectedIndexChanged += new System.EventHandler(this.cb_Call_SelectedIndexChanged);
+ this.cb_Call.TextChanged += new System.EventHandler(this.cb_Call_TextChanged);
+ this.cb_Call.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.cb_Call_KeyPress);
+ //
+ // cb_Locator
+ //
+ this.cb_Locator.FormattingEnabled = true;
+ this.cb_Locator.Location = new System.Drawing.Point(279, 132);
+ this.cb_Locator.Name = "cb_Locator";
+ this.cb_Locator.Size = new System.Drawing.Size(121, 21);
+ this.cb_Locator.TabIndex = 2;
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Location = new System.Drawing.Point(22, 135);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(27, 13);
+ this.label2.TabIndex = 3;
+ this.label2.Text = "Call:";
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(223, 135);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(46, 13);
+ this.label3.TabIndex = 4;
+ this.label3.Text = "Locator:";
+ //
+ // btn_Delete
+ //
+ this.btn_Delete.BackColor = System.Drawing.Color.Tomato;
+ this.btn_Delete.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.btn_Delete.ForeColor = System.Drawing.Color.White;
+ this.btn_Delete.Location = new System.Drawing.Point(55, 173);
+ this.btn_Delete.Name = "btn_Delete";
+ this.btn_Delete.Size = new System.Drawing.Size(121, 35);
+ this.btn_Delete.TabIndex = 5;
+ this.btn_Delete.Text = "Delete";
+ this.btn_Delete.UseVisualStyleBackColor = false;
+ //
+ // btn_Cancel
+ //
+ this.btn_Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.btn_Cancel.Location = new System.Drawing.Point(279, 173);
+ this.btn_Cancel.Name = "btn_Cancel";
+ this.btn_Cancel.Size = new System.Drawing.Size(121, 35);
+ this.btn_Cancel.TabIndex = 6;
+ this.btn_Cancel.Text = "Cancel";
+ this.btn_Cancel.UseVisualStyleBackColor = true;
+ //
+ // DeleteSingleStationDlg
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.CancelButton = this.btn_Cancel;
+ this.ClientSize = new System.Drawing.Size(485, 220);
+ this.Controls.Add(this.btn_Cancel);
+ this.Controls.Add(this.btn_Delete);
+ this.Controls.Add(this.label3);
+ this.Controls.Add(this.label2);
+ this.Controls.Add(this.cb_Locator);
+ this.Controls.Add(this.cb_Call);
+ this.Controls.Add(this.label1);
+ this.Name = "DeleteSingleStationDlg";
+ this.Text = "Delete Single Station";
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.ComboBox cb_Call;
+ private System.Windows.Forms.ComboBox cb_Locator;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.Button btn_Delete;
+ private System.Windows.Forms.Button btn_Cancel;
+ }
+}
\ No newline at end of file
diff --git a/AirScout/DeleteSingleStationDlg.cs b/AirScout/DeleteSingleStationDlg.cs
new file mode 100644
index 0000000..425f14e
--- /dev/null
+++ b/AirScout/DeleteSingleStationDlg.cs
@@ -0,0 +1,71 @@
+using ScoutBase.Stations;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+
+namespace AirScout
+{
+ public partial class DeleteSingleStationDlg : Form
+ {
+ bool SelectionChanged = false;
+
+ public DeleteSingleStationDlg()
+ {
+ InitializeComponent();
+ }
+
+ private void cb_Call_TextChanged(object sender, EventArgs e)
+ {
+ if (!SelectionChanged)
+ {
+ int start = cb_Call.SelectionStart;
+ int len = cb_Call.SelectionLength;
+ string text = cb_Call.Text.ToUpper().Trim();
+ if (cb_Call.Text != text)
+ cb_Call.Text = text;
+ cb_Call.SelectionStart = start;
+ cb_Call.SelectionLength = len;
+ }
+ SelectionChanged = false;
+ }
+
+ private void cb_Call_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ // suppress handling on text input
+ if (!cb_Call.DroppedDown)
+ return;
+ if (cb_Call.SelectedItem != null)
+ {
+ SelectionChanged = true;
+ cb_Call.Text = (string)cb_Call.SelectedItem;
+ }
+ }
+
+ private void cb_Call_KeyPress(object sender, KeyPressEventArgs e)
+ {
+ }
+
+ private void cb_Call_DropDown(object sender, EventArgs e)
+ {
+ if (!cb_Call.DroppedDown && (cb_Call.Text.Length >= 2))
+ {
+ List l = StationData.Database.LocationGetAll("%" + cb_Call.Text + "%");
+ if (l != null)
+ {
+ cb_Call.Items.Clear();
+ cb_Locator.Items.Clear();
+ foreach (LocationDesignator ld in l)
+ {
+ cb_Call.Items.Add(ld.Call);
+ cb_Locator.Items.Add(ld.Loc);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/AirScout/DeleteSingleStationDlg.resx b/AirScout/DeleteSingleStationDlg.resx
new file mode 100644
index 0000000..3b49f55
--- /dev/null
+++ b/AirScout/DeleteSingleStationDlg.resx
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Use this dialog to find and remove a single station/locator combination from the local station database.
+CAUTION: You can only remove own entries permanently. If a station/locator combination is part of the global database it would be re-inserted on next update.
+
+
\ No newline at end of file
diff --git a/AirScout/FirstRunWizard.Designer.cs b/AirScout/FirstRunWizard.Designer.cs
index 0d442f4..0da9c82 100644
--- a/AirScout/FirstRunWizard.Designer.cs
+++ b/AirScout/FirstRunWizard.Designer.cs
@@ -46,6 +46,8 @@
this.ud_MinLon = new System.Windows.Forms.NumericUpDown();
this.gm_Coverage = new GMap.NET.WindowsForms.GMapControl();
this.wp_ElevationModel = new AeroWizard.WizardPage();
+ this.cb_ASTER1 = new System.Windows.Forms.CheckBox();
+ this.cb_ASTER3 = new System.Windows.Forms.CheckBox();
this.richTextBox2 = new System.Windows.Forms.RichTextBox();
this.cb_SRTM1 = new System.Windows.Forms.CheckBox();
this.cb_SRTM3 = new System.Windows.Forms.CheckBox();
@@ -65,6 +67,16 @@
this.label7 = new System.Windows.Forms.Label();
this.cb_SRTM1_EnableCache = new System.Windows.Forms.CheckBox();
this.gm_SRTM1 = new GMap.NET.WindowsForms.GMapControl();
+ this.wp_ASTER3 = new AeroWizard.WizardPage();
+ this.lbl_ASTER3_Status = new System.Windows.Forms.Label();
+ this.label23 = new System.Windows.Forms.Label();
+ this.cb_ASTER3_EnableCache = new System.Windows.Forms.CheckBox();
+ this.gm_ASTER3 = new GMap.NET.WindowsForms.GMapControl();
+ this.wp_ASTER1 = new AeroWizard.WizardPage();
+ this.lbl_ASTER1_Status = new System.Windows.Forms.Label();
+ this.label25 = new System.Windows.Forms.Label();
+ this.cb_ASTER1_EnableCache = new System.Windows.Forms.CheckBox();
+ this.gm_ASTER1 = new GMap.NET.WindowsForms.GMapControl();
this.wp_UserDetails = new AeroWizard.WizardPage();
this.label19 = new System.Windows.Forms.Label();
this.label18 = new System.Windows.Forms.Label();
@@ -98,6 +110,8 @@
this.bw_SRTM1_MapUpdater = new System.ComponentModel.BackgroundWorker();
this.ss_Main = new System.Windows.Forms.StatusStrip();
this.tsl_Status = new System.Windows.Forms.ToolStripStatusLabel();
+ this.bw_ASTER3_MapUpdater = new System.ComponentModel.BackgroundWorker();
+ this.bw_ASTER1_MapUpdater = new System.ComponentModel.BackgroundWorker();
((System.ComponentModel.ISupportInitialize)(this.sw_FirstRun)).BeginInit();
this.wp_TermsAndConditions.SuspendLayout();
this.wp_GeneralCoverage.SuspendLayout();
@@ -109,6 +123,8 @@
this.wp_GLOBE.SuspendLayout();
this.wp_SRTM3.SuspendLayout();
this.wp_SRTM1.SuspendLayout();
+ this.wp_ASTER3.SuspendLayout();
+ this.wp_ASTER1.SuspendLayout();
this.wp_UserDetails.SuspendLayout();
this.wp_PlaneFeeds.SuspendLayout();
this.wp_Finish.SuspendLayout();
@@ -128,6 +144,8 @@
this.sw_FirstRun.Pages.Add(this.wp_GLOBE);
this.sw_FirstRun.Pages.Add(this.wp_SRTM3);
this.sw_FirstRun.Pages.Add(this.wp_SRTM1);
+ this.sw_FirstRun.Pages.Add(this.wp_ASTER3);
+ this.sw_FirstRun.Pages.Add(this.wp_ASTER1);
this.sw_FirstRun.Pages.Add(this.wp_UserDetails);
this.sw_FirstRun.Pages.Add(this.wp_PlaneFeeds);
this.sw_FirstRun.Pages.Add(this.wp_Finish);
@@ -341,6 +359,7 @@
this.gm_Coverage.MouseWheelZoomType = GMap.NET.MouseWheelZoomType.MousePositionAndCenter;
this.gm_Coverage.Name = "gm_Coverage";
this.gm_Coverage.NegativeMode = false;
+ this.gm_Coverage.Opacity = 1D;
this.gm_Coverage.PolygonsEnabled = true;
this.gm_Coverage.RetryLoadTile = 0;
this.gm_Coverage.RoutesEnabled = true;
@@ -353,6 +372,8 @@
//
// wp_ElevationModel
//
+ this.wp_ElevationModel.Controls.Add(this.cb_ASTER1);
+ this.wp_ElevationModel.Controls.Add(this.cb_ASTER3);
this.wp_ElevationModel.Controls.Add(this.richTextBox2);
this.wp_ElevationModel.Controls.Add(this.cb_SRTM1);
this.wp_ElevationModel.Controls.Add(this.cb_SRTM3);
@@ -364,6 +385,30 @@
this.wp_ElevationModel.Text = "Elevation Model";
this.wp_ElevationModel.Enter += new System.EventHandler(this.wp_ElevationModel_Enter);
//
+ // cb_ASTER1
+ //
+ this.cb_ASTER1.AutoSize = true;
+ this.cb_ASTER1.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.cb_ASTER1.Location = new System.Drawing.Point(85, 355);
+ this.cb_ASTER1.Name = "cb_ASTER1";
+ this.cb_ASTER1.Size = new System.Drawing.Size(332, 25);
+ this.cb_ASTER1.TabIndex = 6;
+ this.cb_ASTER1.Text = "Use ASTER1 Elevation Model (experimental)";
+ this.cb_ASTER1.UseVisualStyleBackColor = true;
+ this.cb_ASTER1.CheckedChanged += new System.EventHandler(this.cb_ASTER1_CheckedChanged);
+ //
+ // cb_ASTER3
+ //
+ this.cb_ASTER3.AutoSize = true;
+ this.cb_ASTER3.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.cb_ASTER3.Location = new System.Drawing.Point(85, 329);
+ this.cb_ASTER3.Name = "cb_ASTER3";
+ this.cb_ASTER3.Size = new System.Drawing.Size(332, 25);
+ this.cb_ASTER3.TabIndex = 5;
+ this.cb_ASTER3.Text = "Use ASTER3 Elevation Model (experimental)";
+ this.cb_ASTER3.UseVisualStyleBackColor = true;
+ this.cb_ASTER3.CheckedChanged += new System.EventHandler(this.cb_ASTER3_CheckedChanged);
+ //
// richTextBox2
//
this.richTextBox2.BackColor = System.Drawing.Color.White;
@@ -475,6 +520,7 @@
this.gm_GLOBE.MouseWheelZoomType = GMap.NET.MouseWheelZoomType.MousePositionAndCenter;
this.gm_GLOBE.Name = "gm_GLOBE";
this.gm_GLOBE.NegativeMode = false;
+ this.gm_GLOBE.Opacity = 1D;
this.gm_GLOBE.PolygonsEnabled = true;
this.gm_GLOBE.RetryLoadTile = 0;
this.gm_GLOBE.RoutesEnabled = true;
@@ -546,6 +592,7 @@
this.gm_SRTM3.MouseWheelZoomType = GMap.NET.MouseWheelZoomType.MousePositionAndCenter;
this.gm_SRTM3.Name = "gm_SRTM3";
this.gm_SRTM3.NegativeMode = false;
+ this.gm_SRTM3.Opacity = 1D;
this.gm_SRTM3.PolygonsEnabled = true;
this.gm_SRTM3.RetryLoadTile = 0;
this.gm_SRTM3.RoutesEnabled = true;
@@ -617,6 +664,7 @@
this.gm_SRTM1.MouseWheelZoomType = GMap.NET.MouseWheelZoomType.MousePositionAndCenter;
this.gm_SRTM1.Name = "gm_SRTM1";
this.gm_SRTM1.NegativeMode = false;
+ this.gm_SRTM1.Opacity = 1D;
this.gm_SRTM1.PolygonsEnabled = true;
this.gm_SRTM1.RetryLoadTile = 0;
this.gm_SRTM1.RoutesEnabled = true;
@@ -626,6 +674,150 @@
this.gm_SRTM1.TabIndex = 9;
this.gm_SRTM1.Zoom = 0D;
//
+ // wp_ASTER3
+ //
+ this.wp_ASTER3.Controls.Add(this.lbl_ASTER3_Status);
+ this.wp_ASTER3.Controls.Add(this.label23);
+ this.wp_ASTER3.Controls.Add(this.cb_ASTER3_EnableCache);
+ this.wp_ASTER3.Controls.Add(this.gm_ASTER3);
+ this.wp_ASTER3.Name = "wp_ASTER3";
+ this.wp_ASTER3.Size = new System.Drawing.Size(586, 398);
+ this.sw_FirstRun.SetStepText(this.wp_ASTER3, "ASTER3");
+ this.wp_ASTER3.TabIndex = 12;
+ this.wp_ASTER3.Text = "ASTER3";
+ this.wp_ASTER3.Enter += new System.EventHandler(this.wp_ASTER3_Enter);
+ this.wp_ASTER3.Leave += new System.EventHandler(this.wp_ASTER3_Leave);
+ //
+ // lbl_ASTER3_Status
+ //
+ this.lbl_ASTER3_Status.AutoSize = true;
+ this.lbl_ASTER3_Status.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lbl_ASTER3_Status.Location = new System.Drawing.Point(54, 60);
+ this.lbl_ASTER3_Status.Name = "lbl_ASTER3_Status";
+ this.lbl_ASTER3_Status.Size = new System.Drawing.Size(40, 15);
+ this.lbl_ASTER3_Status.TabIndex = 9;
+ this.lbl_ASTER3_Status.Text = "Status";
+ //
+ // label23
+ //
+ this.label23.AutoSize = true;
+ this.label23.Font = new System.Drawing.Font("Segoe UI Semibold", 10F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))));
+ this.label23.ForeColor = System.Drawing.Color.SteelBlue;
+ this.label23.Location = new System.Drawing.Point(53, 8);
+ this.label23.Name = "label23";
+ this.label23.Size = new System.Drawing.Size(459, 19);
+ this.label23.TabIndex = 8;
+ this.label23.Text = "(A)dvanced (S)paceborne (T)hermal (E)mission and (R)eflection 3 arcsec";
+ //
+ // cb_ASTER3_EnableCache
+ //
+ this.cb_ASTER3_EnableCache.AutoSize = true;
+ this.cb_ASTER3_EnableCache.Checked = global::AirScout.Properties.Settings.Default.Elevation_SRTM3_EnableCache;
+ this.cb_ASTER3_EnableCache.DataBindings.Add(new System.Windows.Forms.Binding("Checked", global::AirScout.Properties.Settings.Default, "Elevation_SRTM3_EnableCache", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
+ this.cb_ASTER3_EnableCache.Location = new System.Drawing.Point(57, 38);
+ this.cb_ASTER3_EnableCache.Name = "cb_ASTER3_EnableCache";
+ this.cb_ASTER3_EnableCache.Size = new System.Drawing.Size(243, 19);
+ this.cb_ASTER3_EnableCache.TabIndex = 7;
+ this.cb_ASTER3_EnableCache.Text = "Keep downloaded elevation tiles in cache";
+ this.cb_ASTER3_EnableCache.UseVisualStyleBackColor = true;
+ //
+ // gm_ASTER3
+ //
+ this.gm_ASTER3.Bearing = 0F;
+ this.gm_ASTER3.CanDragMap = true;
+ this.gm_ASTER3.EmptyTileColor = System.Drawing.Color.Navy;
+ this.gm_ASTER3.GrayScaleMode = false;
+ this.gm_ASTER3.HelperLineOption = GMap.NET.WindowsForms.HelperLineOptions.DontShow;
+ this.gm_ASTER3.LevelsKeepInMemmory = 5;
+ this.gm_ASTER3.Location = new System.Drawing.Point(53, 79);
+ this.gm_ASTER3.MarkersEnabled = true;
+ this.gm_ASTER3.MaxZoom = 2;
+ this.gm_ASTER3.MinZoom = 2;
+ this.gm_ASTER3.MouseWheelZoomType = GMap.NET.MouseWheelZoomType.MousePositionAndCenter;
+ this.gm_ASTER3.Name = "gm_ASTER3";
+ this.gm_ASTER3.NegativeMode = false;
+ this.gm_ASTER3.Opacity = 1D;
+ this.gm_ASTER3.PolygonsEnabled = true;
+ this.gm_ASTER3.RetryLoadTile = 0;
+ this.gm_ASTER3.RoutesEnabled = true;
+ this.gm_ASTER3.SelectedAreaFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(65)))), ((int)(((byte)(105)))), ((int)(((byte)(225)))));
+ this.gm_ASTER3.ShowTileGridLines = false;
+ this.gm_ASTER3.Size = new System.Drawing.Size(480, 311);
+ this.gm_ASTER3.TabIndex = 6;
+ this.gm_ASTER3.Zoom = 0D;
+ //
+ // wp_ASTER1
+ //
+ this.wp_ASTER1.Controls.Add(this.lbl_ASTER1_Status);
+ this.wp_ASTER1.Controls.Add(this.label25);
+ this.wp_ASTER1.Controls.Add(this.cb_ASTER1_EnableCache);
+ this.wp_ASTER1.Controls.Add(this.gm_ASTER1);
+ this.wp_ASTER1.Name = "wp_ASTER1";
+ this.wp_ASTER1.Size = new System.Drawing.Size(586, 398);
+ this.sw_FirstRun.SetStepText(this.wp_ASTER1, "ASTER1");
+ this.wp_ASTER1.TabIndex = 13;
+ this.wp_ASTER1.Text = "ASTER1";
+ this.wp_ASTER1.Enter += new System.EventHandler(this.wp_ASTER1_Enter);
+ this.wp_ASTER1.Leave += new System.EventHandler(this.wp_ASTER1_Leave);
+ //
+ // lbl_ASTER1_Status
+ //
+ this.lbl_ASTER1_Status.AutoSize = true;
+ this.lbl_ASTER1_Status.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lbl_ASTER1_Status.Location = new System.Drawing.Point(54, 60);
+ this.lbl_ASTER1_Status.Name = "lbl_ASTER1_Status";
+ this.lbl_ASTER1_Status.Size = new System.Drawing.Size(40, 15);
+ this.lbl_ASTER1_Status.TabIndex = 9;
+ this.lbl_ASTER1_Status.Text = "Status";
+ //
+ // label25
+ //
+ this.label25.AutoSize = true;
+ this.label25.Font = new System.Drawing.Font("Segoe UI Semibold", 10F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))));
+ this.label25.ForeColor = System.Drawing.Color.SteelBlue;
+ this.label25.Location = new System.Drawing.Point(53, 8);
+ this.label25.Name = "label25";
+ this.label25.Size = new System.Drawing.Size(458, 19);
+ this.label25.TabIndex = 8;
+ this.label25.Text = "(A)dvanced (S)paceborne (T)hermal (E)mission and (R)eflection 1 arcsec";
+ //
+ // cb_ASTER1_EnableCache
+ //
+ this.cb_ASTER1_EnableCache.AutoSize = true;
+ this.cb_ASTER1_EnableCache.Checked = global::AirScout.Properties.Settings.Default.Elevation_SRTM3_EnableCache;
+ this.cb_ASTER1_EnableCache.DataBindings.Add(new System.Windows.Forms.Binding("Checked", global::AirScout.Properties.Settings.Default, "Elevation_SRTM3_EnableCache", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
+ this.cb_ASTER1_EnableCache.Location = new System.Drawing.Point(57, 38);
+ this.cb_ASTER1_EnableCache.Name = "cb_ASTER1_EnableCache";
+ this.cb_ASTER1_EnableCache.Size = new System.Drawing.Size(243, 19);
+ this.cb_ASTER1_EnableCache.TabIndex = 7;
+ this.cb_ASTER1_EnableCache.Text = "Keep downloaded elevation tiles in cache";
+ this.cb_ASTER1_EnableCache.UseVisualStyleBackColor = true;
+ //
+ // gm_ASTER1
+ //
+ this.gm_ASTER1.Bearing = 0F;
+ this.gm_ASTER1.CanDragMap = true;
+ this.gm_ASTER1.EmptyTileColor = System.Drawing.Color.Navy;
+ this.gm_ASTER1.GrayScaleMode = false;
+ this.gm_ASTER1.HelperLineOption = GMap.NET.WindowsForms.HelperLineOptions.DontShow;
+ this.gm_ASTER1.LevelsKeepInMemmory = 5;
+ this.gm_ASTER1.Location = new System.Drawing.Point(53, 79);
+ this.gm_ASTER1.MarkersEnabled = true;
+ this.gm_ASTER1.MaxZoom = 2;
+ this.gm_ASTER1.MinZoom = 2;
+ this.gm_ASTER1.MouseWheelZoomType = GMap.NET.MouseWheelZoomType.MousePositionAndCenter;
+ this.gm_ASTER1.Name = "gm_ASTER1";
+ this.gm_ASTER1.NegativeMode = false;
+ this.gm_ASTER1.Opacity = 1D;
+ this.gm_ASTER1.PolygonsEnabled = true;
+ this.gm_ASTER1.RetryLoadTile = 0;
+ this.gm_ASTER1.RoutesEnabled = true;
+ this.gm_ASTER1.SelectedAreaFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(65)))), ((int)(((byte)(105)))), ((int)(((byte)(225)))));
+ this.gm_ASTER1.ShowTileGridLines = false;
+ this.gm_ASTER1.Size = new System.Drawing.Size(480, 311);
+ this.gm_ASTER1.TabIndex = 6;
+ this.gm_ASTER1.Zoom = 0D;
+ //
// wp_UserDetails
//
this.wp_UserDetails.Controls.Add(this.label19);
@@ -767,6 +959,7 @@
this.gm_Callsign.MouseWheelZoomType = GMap.NET.MouseWheelZoomType.MousePositionAndCenter;
this.gm_Callsign.Name = "gm_Callsign";
this.gm_Callsign.NegativeMode = false;
+ this.gm_Callsign.Opacity = 1D;
this.gm_Callsign.PolygonsEnabled = true;
this.gm_Callsign.RetryLoadTile = 0;
this.gm_Callsign.RoutesEnabled = true;
@@ -996,6 +1189,22 @@
this.tsl_Status.Size = new System.Drawing.Size(42, 17);
this.tsl_Status.Text = "Status.";
//
+ // bw_ASTER3_MapUpdater
+ //
+ this.bw_ASTER3_MapUpdater.WorkerReportsProgress = true;
+ this.bw_ASTER3_MapUpdater.WorkerSupportsCancellation = true;
+ this.bw_ASTER3_MapUpdater.DoWork += new System.ComponentModel.DoWorkEventHandler(this.bw_ASTER3_MapUpdater_DoWork);
+ this.bw_ASTER3_MapUpdater.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.bw_ASTER3_MapUpdater_ProgressChanged);
+ this.bw_ASTER3_MapUpdater.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.bw_ASTER3_MapUpdater_RunWorkerCompleted);
+ //
+ // bw_ASTER1_MapUpdater
+ //
+ this.bw_ASTER1_MapUpdater.WorkerReportsProgress = true;
+ this.bw_ASTER1_MapUpdater.WorkerSupportsCancellation = true;
+ this.bw_ASTER1_MapUpdater.DoWork += new System.ComponentModel.DoWorkEventHandler(this.bw_ASTER1_MapUpdater_DoWork);
+ this.bw_ASTER1_MapUpdater.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.bw_ASTER1_MapUpdater_ProgressChanged);
+ this.bw_ASTER1_MapUpdater.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.bw_ASTER1_MapUpdater_RunWorkerCompleted);
+ //
// FirstRunWizard
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -1027,6 +1236,10 @@
this.wp_SRTM3.PerformLayout();
this.wp_SRTM1.ResumeLayout(false);
this.wp_SRTM1.PerformLayout();
+ this.wp_ASTER3.ResumeLayout(false);
+ this.wp_ASTER3.PerformLayout();
+ this.wp_ASTER1.ResumeLayout(false);
+ this.wp_ASTER1.PerformLayout();
this.wp_UserDetails.ResumeLayout(false);
this.wp_UserDetails.PerformLayout();
this.wp_PlaneFeeds.ResumeLayout(false);
@@ -1110,5 +1323,19 @@
private System.Windows.Forms.Label label7;
private System.Windows.Forms.CheckBox cb_SRTM1_EnableCache;
private System.Windows.Forms.Label label6;
+ private AeroWizard.WizardPage wp_ASTER3;
+ private System.Windows.Forms.Label lbl_ASTER3_Status;
+ private System.Windows.Forms.Label label23;
+ private System.Windows.Forms.CheckBox cb_ASTER3_EnableCache;
+ private GMap.NET.WindowsForms.GMapControl gm_ASTER3;
+ private AeroWizard.WizardPage wp_ASTER1;
+ private System.Windows.Forms.Label lbl_ASTER1_Status;
+ private System.Windows.Forms.Label label25;
+ private System.Windows.Forms.CheckBox cb_ASTER1_EnableCache;
+ private GMap.NET.WindowsForms.GMapControl gm_ASTER1;
+ private System.ComponentModel.BackgroundWorker bw_ASTER3_MapUpdater;
+ private System.ComponentModel.BackgroundWorker bw_ASTER1_MapUpdater;
+ private System.Windows.Forms.CheckBox cb_ASTER1;
+ private System.Windows.Forms.CheckBox cb_ASTER3;
}
}
\ No newline at end of file
diff --git a/AirScout/FirstRunWizard.cs b/AirScout/FirstRunWizard.cs
index 2369dbc..bc00dfa 100644
--- a/AirScout/FirstRunWizard.cs
+++ b/AirScout/FirstRunWizard.cs
@@ -30,6 +30,8 @@ namespace AirScout
GMapOverlay GLOBEpolygons = new GMapOverlay("GLOBEpolygons");
GMapOverlay SRTM3polygons = new GMapOverlay("SRTM3polygons");
GMapOverlay SRTM1polygons = new GMapOverlay("SRTM1polygons");
+ GMapOverlay ASTER3polygons = new GMapOverlay("ASTER3polygons");
+ GMapOverlay ASTER1polygons = new GMapOverlay("ASTER1polygons");
GMapOverlay Callsignpolygons = new GMapOverlay("Callsignpolygons");
GMapOverlay Callsignspositions = new GMapOverlay("Callsignpositions");
@@ -119,6 +121,40 @@ namespace AirScout
gm_SRTM1.MapScaleInfoEnabled = true;
gm_SRTM1.Overlays.Add(SRTM1polygons);
+ // set initial settings for ASTER3Map
+ GMap.NET.MapProviders.GMapProvider.UserAgent = "AirScout";
+ // clearing referrer URL issue 2019-12-14
+ gm_ASTER3.MapProvider.RefererUrl = "";
+ gm_ASTER3.MapProvider = GMapProviders.Find(Properties.Settings.Default.Map_Provider);
+ gm_ASTER3.IgnoreMarkerOnMouseWheel = true;
+ gm_ASTER3.MinZoom = 0;
+ gm_ASTER3.MaxZoom = 20;
+ gm_ASTER3.Zoom = 1;
+ gm_ASTER3.DragButton = System.Windows.Forms.MouseButtons.Left;
+ gm_ASTER3.CanDragMap = true;
+ gm_ASTER3.ScalePen = new Pen(Color.Black, 3);
+ gm_ASTER3.HelperLinePen = null;
+ gm_ASTER3.SelectionPen = null;
+ gm_ASTER3.MapScaleInfoEnabled = true;
+ gm_ASTER3.Overlays.Add(ASTER3polygons);
+
+ // set initial settings for ASTER1Map
+ GMap.NET.MapProviders.GMapProvider.UserAgent = "AirScout";
+ // clearing referrer URL issue 2019-12-14
+ gm_ASTER1.MapProvider.RefererUrl = "";
+ gm_ASTER1.MapProvider = GMapProviders.Find(Properties.Settings.Default.Map_Provider);
+ gm_ASTER1.IgnoreMarkerOnMouseWheel = true;
+ gm_ASTER1.MinZoom = 0;
+ gm_ASTER1.MaxZoom = 20;
+ gm_ASTER1.Zoom = 1;
+ gm_ASTER1.DragButton = System.Windows.Forms.MouseButtons.Left;
+ gm_ASTER1.CanDragMap = true;
+ gm_ASTER1.ScalePen = new Pen(Color.Black, 3);
+ gm_ASTER1.HelperLinePen = null;
+ gm_ASTER1.SelectionPen = null;
+ gm_ASTER1.MapScaleInfoEnabled = true;
+ gm_ASTER1.Overlays.Add(ASTER1polygons);
+
// set initial settings for user details
GMap.NET.MapProviders.GMapProvider.UserAgent = "AirScout";
// clearing referrer URL issue 2019-12-14
@@ -257,12 +293,25 @@ namespace AirScout
#endregion
+ #region wp_ElevationModel
+ private void wp_ElevationModel_Enter(object sender, EventArgs e)
+ {
+ cb_GLOBE.Checked = Properties.Settings.Default.Elevation_GLOBE_Enabled;
+ cb_SRTM3.Checked = Properties.Settings.Default.Elevation_SRTM3_Enabled;
+ cb_SRTM1.Checked = Properties.Settings.Default.Elevation_SRTM1_Enabled;
+ cb_ASTER3.Checked = Properties.Settings.Default.Elevation_ASTER3_Enabled;
+ cb_ASTER1.Checked = Properties.Settings.Default.Elevation_ASTER1_Enabled;
+ UpdateElevationPages();
+ }
+
private void UpdateElevationPages()
{
wp_GLOBE.Suppress = !cb_GLOBE.Checked;
wp_SRTM3.Suppress = !cb_SRTM3.Checked;
wp_SRTM1.Suppress = !cb_SRTM1.Checked;
- wp_ElevationModel.AllowNext = cb_GLOBE.Checked || cb_SRTM3.Checked || cb_SRTM1.Checked;
+ wp_ASTER3.Suppress = !cb_ASTER3.Checked;
+ wp_ASTER1.Suppress = !cb_ASTER1.Checked;
+ wp_ElevationModel.AllowNext = cb_GLOBE.Checked || cb_SRTM3.Checked || cb_SRTM1.Checked || cb_ASTER3.Checked || cb_ASTER1.Checked;
this.Refresh();
}
@@ -284,14 +333,19 @@ namespace AirScout
UpdateElevationPages();
}
- #region wp_ElevationModel
- private void wp_ElevationModel_Enter(object sender, EventArgs e)
+
+ private void cb_ASTER3_CheckedChanged(object sender, EventArgs e)
{
- cb_GLOBE.Checked = Properties.Settings.Default.Elevation_GLOBE_Enabled;
- cb_SRTM3.Checked = Properties.Settings.Default.Elevation_SRTM3_Enabled;
- cb_SRTM1.Checked = Properties.Settings.Default.Elevation_SRTM1_Enabled;
+ Properties.Settings.Default.Elevation_ASTER3_Enabled = cb_ASTER3.Checked;
UpdateElevationPages();
}
+
+ private void cb_ASTER1_CheckedChanged(object sender, EventArgs e)
+ {
+ Properties.Settings.Default.Elevation_ASTER1_Enabled = cb_ASTER1.Checked;
+ UpdateElevationPages();
+ }
+
#endregion
#region wp_GLOBE
@@ -643,7 +697,7 @@ namespace AirScout
// estimate disk space needed = tilecount * tilesize * 150%
long spaceneeded = (long)tilecount * (long)(100000 * 3 / 2);
string rootdrive = Path.GetPathRoot(ElevationData.Database.DefaultDatabaseDirectory(ELEVATIONMODEL.SRTM1));
- long spaceavailable = SupportFunctions.GetDriveAvailableFreeSpace(rootdrive);
+ long spaceavailable = SupportFunctions.GetDriveAvailableFreeSpace(rootdrive);
// check for available disk space, skip on zero (cannot determine)
if ((spaceavailable > 0) && (spaceavailable < spaceneeded))
{
@@ -743,6 +797,302 @@ namespace AirScout
#endregion
+ #region wp_ASTER3
+
+ private void bw_ASTER3_MapUpdater_DoWork(object sender, DoWorkEventArgs e)
+ {
+ bw_ASTER3_MapUpdater.ReportProgress(0, "Creating elevation tile catalogue (please wait)...");
+ // get all locs needed for covered area
+ ElevationCatalogue availabletiles = ElevationData.Database.ElevationCatalogueCreateCheckBoundsAndLastModified(bw_ASTER3_MapUpdater, ELEVATIONMODEL.ASTER3, Properties.Settings.Default.MinLat, Properties.Settings.Default.MinLon, Properties.Settings.Default.MaxLat, Properties.Settings.Default.MaxLon);
+ bw_ASTER3_MapUpdater.ReportProgress(0, "Processing tiles...");
+ // report tile count
+ bw_ASTER3_MapUpdater.ReportProgress(2, availabletiles.Files.Keys.Count);
+ int missing = 0;
+ int found = 0;
+ foreach (string tilename in availabletiles.Files.Keys)
+ {
+ if (ElevationData.Database.ElevationTileExists(tilename.Substring(0, 6), ELEVATIONMODEL.ASTER3))
+ {
+ bw_ASTER3_MapUpdater.ReportProgress(1, tilename);
+ found++;
+ }
+ else
+ {
+ bw_ASTER3_MapUpdater.ReportProgress(-1, tilename);
+ missing++;
+ }
+ if (bw_ASTER3_MapUpdater.CancellationPending)
+ {
+ bw_ASTER3_MapUpdater.ReportProgress(0, "Processing cancelled...");
+ return;
+ }
+ }
+ bw_ASTER3_MapUpdater.ReportProgress(0, found.ToString() + " tile(s) found, " + missing.ToString() + " more tile(s) available and missing.");
+ }
+
+ private void bw_ASTER3_MapUpdater_ProgressChanged(object sender, ProgressChangedEventArgs e)
+ {
+ if (e.ProgressPercentage == 2)
+ {
+ try
+ {
+ wp_ASTER3.AllowNext = true;
+ // get tile count = available tiles - tiles already in data base
+ long tilecount = (int)e.UserState - ElevationData.Database.ElevationTileCount(ELEVATIONMODEL.ASTER3);
+ if (tilecount < 0)
+ tilecount = 0;
+ // check available disk space and file system
+ // estimate disk space needed = tilecount * tilesize * 150%
+ long spaceneeded = (long)tilecount * (long)(10000 * 3 / 2);
+ string rootdrive = Path.GetPathRoot(ElevationData.Database.DefaultDatabaseDirectory(ELEVATIONMODEL.ASTER3));
+ long spaceavailable = SupportFunctions.GetDriveAvailableFreeSpace(rootdrive);
+ // check for available disk space, skip on zero (cannot determine)
+ if ((spaceavailable > 0) && (spaceavailable < spaceneeded))
+ {
+ // show message box
+ 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_ASTER3.AllowNext = false;
+ }
+ long maxfilesize = SupportFunctions.GetDriveMaxFileSize(rootdrive);
+ if ((maxfilesize > 0) && (maxfilesize < spaceneeded))
+ {
+ // show message box
+ 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_ASTER3.AllowNext = false;
+ }
+ }
+ catch (Exception ex)
+ {
+ Log.WriteMessage(ex.ToString(), LogLevel.Error);
+ }
+ }
+ else if (e.ProgressPercentage == 1)
+ {
+ // add a tile found in database to map polygons
+ double baselat;
+ double baselon;
+ MaidenheadLocator.LatLonFromLoc(((string)e.UserState).Substring(0, 6), PositionInRectangle.BottomLeft, out baselat, out baselon);
+ List l = new List();
+ l.Add(new PointLatLng((decimal)baselat, (decimal)baselon));
+ l.Add(new PointLatLng((decimal)(baselat + 1 / 24.0), (decimal)baselon));
+ l.Add(new PointLatLng((decimal)(baselat + 1 / 24.0), (decimal)(baselon + 2 / 24.0)));
+ l.Add(new PointLatLng((decimal)baselat, (decimal)(baselon + 2 / 24.0)));
+ GMapPolygon p = new GMapPolygon(l, (string)e.UserState);
+ p.Stroke = new Pen(Color.FromArgb(50, Color.Green));
+ p.Fill = new SolidBrush(Color.FromArgb(50, Color.Green));
+ ASTER3polygons.Polygons.Add(p);
+ }
+ else if (e.ProgressPercentage == -1)
+ {
+ // add missing tile to map polygons
+ double baselat;
+ double baselon;
+ MaidenheadLocator.LatLonFromLoc(((string)e.UserState).Substring(0, 6), PositionInRectangle.BottomLeft, out baselat, out baselon);
+ List l = new List();
+ l.Add(new PointLatLng((decimal)baselat, (decimal)baselon));
+ l.Add(new PointLatLng((decimal)(baselat + 1 / 24.0), (decimal)baselon));
+ l.Add(new PointLatLng((decimal)(baselat + 1 / 24.0), (decimal)(baselon + 2 / 24.0)));
+ l.Add(new PointLatLng((decimal)baselat, (decimal)(baselon + 2 / 24.0)));
+ GMapPolygon p = new GMapPolygon(l, (string)e.UserState);
+ p.Stroke = new Pen(Color.FromArgb(50, Color.Red));
+ p.Fill = new SolidBrush(Color.FromArgb(50, Color.Red));
+ ASTER3polygons.Polygons.Add(p);
+ }
+ else
+ {
+ lbl_ASTER3_Status.Text = (string)e.UserState;
+ }
+ }
+
+ private void bw_ASTER3_MapUpdater_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
+ {
+ }
+
+ private void wp_ASTER3_Enter(object sender, EventArgs e)
+ {
+ wp_ASTER3.AllowNext = false;
+ // clear map polygons
+ ASTER3polygons.Clear();
+ // add coverage to map polygons
+ List cl = new List();
+ cl.Add(new PointLatLng(Properties.Settings.Default.MinLat, Properties.Settings.Default.MinLon));
+ cl.Add(new PointLatLng(Properties.Settings.Default.MinLat, Properties.Settings.Default.MaxLon));
+ cl.Add(new PointLatLng(Properties.Settings.Default.MaxLat, Properties.Settings.Default.MaxLon));
+ cl.Add(new PointLatLng(Properties.Settings.Default.MaxLat, Properties.Settings.Default.MinLon));
+ GMapPolygon c = new GMapPolygon(cl, "Coverage");
+ c.Stroke = new Pen(Color.FromArgb(255, Color.Magenta), 3);
+ c.Fill = new SolidBrush(Color.FromArgb(0, Color.Magenta));
+ ASTER3polygons.Polygons.Add(c);
+ // zoom the map initally
+ gm_ASTER3.SetZoomToFitRect(RectLatLng.FromLTRB(Properties.Settings.Default.MinLon, Properties.Settings.Default.MaxLat, Properties.Settings.Default.MaxLon, Properties.Settings.Default.MinLat));
+ // start map updater
+ if (!bw_ASTER3_MapUpdater.IsBusy)
+ bw_ASTER3_MapUpdater.RunWorkerAsync();
+ // zoom the map
+ gm_ASTER3.SetZoomToFitRect(RectLatLng.FromLTRB(Properties.Settings.Default.MinLon - 1, Properties.Settings.Default.MaxLat + 1, Properties.Settings.Default.MaxLon + 1, Properties.Settings.Default.MinLat - 1));
+ }
+
+ private void wp_ASTER3_Leave(object sender, EventArgs e)
+ {
+ // stop map updater
+ bw_ASTER3_MapUpdater.CancelAsync();
+ // clear map polygons
+ ASTER3polygons.Clear();
+ // do garbage collection
+ GC.Collect();
+ lbl_ASTER3_Status.Text = "";
+ }
+
+ #endregion
+
+ #region wp_ASTER1
+
+ private void bw_ASTER1_MapUpdater_DoWork(object sender, DoWorkEventArgs e)
+ {
+ bw_ASTER1_MapUpdater.ReportProgress(0, "Creating elevation tile catalogue (please wait)...");
+ // get all locs needed for covered area
+ ElevationCatalogue availabletiles = ElevationData.Database.ElevationCatalogueCreateCheckBoundsAndLastModified(bw_ASTER1_MapUpdater, ELEVATIONMODEL.ASTER1, Properties.Settings.Default.MinLat, Properties.Settings.Default.MinLon, Properties.Settings.Default.MaxLat, Properties.Settings.Default.MaxLon);
+ bw_ASTER1_MapUpdater.ReportProgress(0, "Processing tiles...");
+ // report tile count
+ bw_ASTER1_MapUpdater.ReportProgress(2, availabletiles.Files.Keys.Count);
+ int missing = 0;
+ int found = 0;
+ foreach (string tilename in availabletiles.Files.Keys)
+ {
+ if (ElevationData.Database.ElevationTileExists(tilename.Substring(0, 6), ELEVATIONMODEL.ASTER1))
+ {
+ bw_ASTER1_MapUpdater.ReportProgress(1, tilename);
+ found++;
+ }
+ else
+ {
+ bw_ASTER1_MapUpdater.ReportProgress(-1, tilename);
+ missing++;
+ }
+ if (bw_ASTER1_MapUpdater.CancellationPending)
+ {
+ bw_ASTER1_MapUpdater.ReportProgress(0, "Processing cancelled...");
+ return;
+ }
+ }
+ bw_ASTER1_MapUpdater.ReportProgress(0, found.ToString() + " tile(s) found, " + missing.ToString() + " more tile(s) available and missing.");
+ }
+
+ private void bw_ASTER1_MapUpdater_ProgressChanged(object sender, ProgressChangedEventArgs e)
+ {
+ if (e.ProgressPercentage == 2)
+ {
+ try
+ {
+ wp_ASTER1.AllowNext = true;
+ // get tile count = available tiles - tiles already in data base
+ long tilecount = (int)e.UserState - ElevationData.Database.ElevationTileCount(ELEVATIONMODEL.ASTER1);
+ if (tilecount < 0)
+ tilecount = 0;
+ // check available disk space and file system
+ // estimate disk space needed = tilecount * tilesize * 150%
+ long spaceneeded = (long)tilecount * (long)(100000 * 3 / 2);
+ string rootdrive = Path.GetPathRoot(ElevationData.Database.DefaultDatabaseDirectory(ELEVATIONMODEL.ASTER1));
+ long spaceavailable = SupportFunctions.GetDriveAvailableFreeSpace(rootdrive);
+ // check for available disk space, skip on zero (cannot determine)
+ if ((spaceavailable > 0) && (spaceavailable < spaceneeded))
+ {
+ // show message box
+ 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_ASTER1.AllowNext = false;
+ }
+ long maxfilesize = SupportFunctions.GetDriveMaxFileSize(rootdrive);
+ if ((maxfilesize > 0) && (maxfilesize < spaceneeded))
+ {
+ // show message box
+ 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_ASTER1.AllowNext = false;
+ }
+ }
+ catch (Exception ex)
+ {
+ Log.WriteMessage(ex.ToString(), LogLevel.Error);
+ }
+ }
+ else if (e.ProgressPercentage == 1)
+ {
+ // add a tile found in database to map polygons
+ double baselat;
+ double baselon;
+ MaidenheadLocator.LatLonFromLoc(((string)e.UserState).Substring(0, 6), PositionInRectangle.BottomLeft, out baselat, out baselon);
+ List l = new List();
+ l.Add(new PointLatLng((decimal)baselat, (decimal)baselon));
+ l.Add(new PointLatLng((decimal)(baselat + 1 / 24.0), (decimal)baselon));
+ l.Add(new PointLatLng((decimal)(baselat + 1 / 24.0), (decimal)(baselon + 2 / 24.0)));
+ l.Add(new PointLatLng((decimal)baselat, (decimal)(baselon + 2 / 24.0)));
+ GMapPolygon p = new GMapPolygon(l, (string)e.UserState);
+ p.Stroke = new Pen(Color.FromArgb(50, Color.Green));
+ p.Fill = new SolidBrush(Color.FromArgb(50, Color.Green));
+ ASTER1polygons.Polygons.Add(p);
+ }
+ else if (e.ProgressPercentage == -1)
+ {
+ // add missing tile to map polygons
+ double baselat;
+ double baselon;
+ MaidenheadLocator.LatLonFromLoc(((string)e.UserState).Substring(0, 6), PositionInRectangle.BottomLeft, out baselat, out baselon);
+ List l = new List();
+ l.Add(new PointLatLng((decimal)baselat, (decimal)baselon));
+ l.Add(new PointLatLng((decimal)(baselat + 1 / 24.0), (decimal)baselon));
+ l.Add(new PointLatLng((decimal)(baselat + 1 / 24.0), (decimal)(baselon + 2 / 24.0)));
+ l.Add(new PointLatLng((decimal)baselat, (decimal)(baselon + 2 / 24.0)));
+ GMapPolygon p = new GMapPolygon(l, (string)e.UserState);
+ p.Stroke = new Pen(Color.FromArgb(50, Color.Red));
+ p.Fill = new SolidBrush(Color.FromArgb(50, Color.Red));
+ ASTER1polygons.Polygons.Add(p);
+ }
+ else
+ {
+ lbl_ASTER1_Status.Text = (string)e.UserState;
+ }
+ }
+
+ private void bw_ASTER1_MapUpdater_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
+ {
+ }
+
+ private void wp_ASTER1_Enter(object sender, EventArgs e)
+ {
+ wp_ASTER1.AllowNext = false;
+ // clear map polygons
+ ASTER1polygons.Clear();
+ // add coverage to map polygons
+ List cl = new List();
+ cl.Add(new PointLatLng(Properties.Settings.Default.MinLat, Properties.Settings.Default.MinLon));
+ cl.Add(new PointLatLng(Properties.Settings.Default.MinLat, Properties.Settings.Default.MaxLon));
+ cl.Add(new PointLatLng(Properties.Settings.Default.MaxLat, Properties.Settings.Default.MaxLon));
+ cl.Add(new PointLatLng(Properties.Settings.Default.MaxLat, Properties.Settings.Default.MinLon));
+ GMapPolygon c = new GMapPolygon(cl, "Coverage");
+ c.Stroke = new Pen(Color.FromArgb(255, Color.Magenta), 3);
+ c.Fill = new SolidBrush(Color.FromArgb(0, Color.Magenta));
+ ASTER1polygons.Polygons.Add(c);
+ // zoom the map initally
+ gm_ASTER1.SetZoomToFitRect(RectLatLng.FromLTRB(Properties.Settings.Default.MinLon, Properties.Settings.Default.MaxLat, Properties.Settings.Default.MaxLon, Properties.Settings.Default.MinLat));
+ // start map updater
+ if (!bw_ASTER1_MapUpdater.IsBusy)
+ bw_ASTER1_MapUpdater.RunWorkerAsync();
+ // zoom the map
+ gm_ASTER1.SetZoomToFitRect(RectLatLng.FromLTRB(Properties.Settings.Default.MinLon - 1, Properties.Settings.Default.MaxLat + 1, Properties.Settings.Default.MaxLon + 1, Properties.Settings.Default.MinLat - 1));
+ }
+
+ private void wp_ASTER1_Leave(object sender, EventArgs e)
+ {
+ // stop map updater
+ bw_ASTER1_MapUpdater.CancelAsync();
+ // clear map polygons
+ ASTER1polygons.Clear();
+ // do garbage collection
+ GC.Collect();
+ lbl_ASTER1_Status.Text = "";
+ }
+
+ #endregion
+
#region wp_Finish
private void wp_Finish_Enter(object sender, EventArgs e)
{
@@ -1268,6 +1618,7 @@ namespace AirScout
while (bw_SRTM1_MapUpdater.IsBusy)
Application.DoEvents();
}
+
}
diff --git a/AirScout/FirstRunWizard.resx b/AirScout/FirstRunWizard.resx
index 04653f7..3213330 100644
--- a/AirScout/FirstRunWizard.resx
+++ b/AirScout/FirstRunWizard.resx
@@ -154,11 +154,13 @@ To view complete license information please refer to "Options/Info".
Elevation models are essential for work with AirScout. They are needed for calculating radio horizons and propagation paths.
-The software can handle the three most common models available for the public:
+The software can handle the most common models available for the public:
GLOBE: 1km x 1km resolution, covers whole earth
-SRTM3: 90m x 90m resolution, covers only -60° ... +60°
+SRTM3: 90m x 90m resolution, covers only -60° ... +60° (with some inoffical extensions to Norh)
SRTM1: 30m x 30m resolution, covers only -60° ... +60°
+ASTER3: 90m x 90m resolution, covers -83° ... +83° (aggregated from ASTER1, very raw data )
+ASTER1: 30m x 30m resolution, covers -83° ... +83° (very raw data)
Elevation data are provided in files. AirScout is trying to download and stores them locally. If you have them already somewhere on your computer, you can select a user specific path.
@@ -7399,6 +7401,12 @@ Please enter at least one plane feed to continue.
481, 17
+
+ 575, 17
+
+
+ 763, 17
+
50
diff --git a/AirScout/GMapLocatorPolygon.cs b/AirScout/GMapLocatorPolygon.cs
new file mode 100644
index 0000000..7657e6f
--- /dev/null
+++ b/AirScout/GMapLocatorPolygon.cs
@@ -0,0 +1,121 @@
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Drawing.Text;
+using System.Linq;
+using System.Runtime.Serialization;
+using System.Text;
+using GMap.NET;
+using GMap.NET.WindowsForms;
+
+namespace AirScout
+{
+ public class GMapLocatorPolygon : GMapPolygon
+ {
+ public GMapLocatorPolygon(List points, string name) : base(points, name)
+ {
+ }
+
+ protected GMapLocatorPolygon(SerializationInfo info, StreamingContext context) : base(info, context)
+ {
+ }
+
+ private int PolygonWidth()
+ {
+ if (this.LocalPoints == null)
+ return 0;
+
+ long min = int.MaxValue;
+ long max = int.MinValue;
+ foreach (GPoint p in this.LocalPoints)
+ {
+ if (p.X < min)
+ min = p.X;
+ if (p.X > max)
+ max = p.X;
+ }
+ return (int)(max - min);
+ }
+
+ private int PolygonHeight()
+ {
+ if (this.LocalPoints == null)
+ return 0;
+
+ long min = int.MaxValue;
+ long max = int.MinValue;
+ foreach (GPoint p in this.LocalPoints)
+ {
+ if (p.Y < min)
+ min = p.Y;
+ if (p.Y > max)
+ max = p.Y;
+ }
+ return (int)(max - min);
+ }
+
+ private Rectangle PolygonRect()
+ {
+ if (this.LocalPoints == null)
+ return new Rectangle(0,0,0,0);
+
+ long minX = int.MaxValue;
+ long maxX = int.MinValue;
+ foreach (GPoint p in this.LocalPoints)
+ {
+ if (p.X < minX)
+ minX = p.X;
+ if (p.X > maxX)
+ maxX = p.X;
+ }
+ long minY = int.MaxValue;
+ long maxY = int.MinValue;
+ foreach (GPoint p in this.LocalPoints)
+ {
+ if (p.Y < minY)
+ minY = p.Y;
+ if (p.Y > maxY)
+ maxY = p.Y;
+ }
+
+ return new Rectangle((int)minX, (int)minY, (int)(maxX - minX), (int)(maxY - minY));
+ }
+ public override void OnRender(Graphics g)
+ {
+ base.OnRender(g);
+
+ // render Tag on top of polygon, if it is a regular rectangle and contains a string as tag
+ if (this.Points == null)
+ return;
+ if (this.Points.Count == 0)
+ return;
+ if (this.Tag == null)
+ return;
+ if (this.Tag.GetType() != typeof(string))
+ return;
+
+ // keep old graphics settings
+ SmoothingMode oldsmoothingmode = g.SmoothingMode;
+ TextRenderingHint oldtextrenderinghint = g.TextRenderingHint;
+
+ // get polygon extension in pixels
+ Rectangle polyrect = PolygonRect();
+
+ g.SmoothingMode = SmoothingMode.AntiAlias;
+ g.TextRenderingHint = TextRenderingHint.SingleBitPerPixelGridFit;
+ Font font = new Font("Arial", polyrect.Height / 10);
+ StringFormat format = new StringFormat();
+ format.LineAlignment = StringAlignment.Center;
+ format.Alignment = StringAlignment.Center;
+ g.DrawString((string)this.Tag, font, new SolidBrush(this.Stroke.Color), polyrect, format);
+ g.Flush();
+ font.Dispose();
+
+ // restore old graphics settings
+ g.SmoothingMode = oldsmoothingmode;
+ g.TextRenderingHint = oldtextrenderinghint;
+ }
+ }
+
+}
diff --git a/AirScout/OptionsDlg.Designer.cs b/AirScout/OptionsDlg.Designer.cs
index ab78318..a184705 100644
--- a/AirScout/OptionsDlg.Designer.cs
+++ b/AirScout/OptionsDlg.Designer.cs
@@ -7162,6 +7162,18 @@
this.bw_StationDataUpdater.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.bw_StationDataUpdater_ProgressChanged);
this.bw_StationDataUpdater.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.bw_StationDataUpdater_RunWorkerCompleted);
//
+ // btn_DeleteSingleStation
+ //
+ this.btn_DeleteSingleStation.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.btn_DeleteSingleStation.Location = new System.Drawing.Point(165, 48);
+ this.btn_DeleteSingleStation.Name = "btn_DeleteSingleStation";
+ this.btn_DeleteSingleStation.Size = new System.Drawing.Size(122, 23);
+ this.btn_DeleteSingleStation.TabIndex = 3;
+ this.btn_DeleteSingleStation.Text = "Delete Single Station";
+ this.tt_Options.SetToolTip(this.btn_DeleteSingleStation, "Deletes all cached map tiles from database");
+ this.btn_DeleteSingleStation.UseVisualStyleBackColor = true;
+ this.btn_DeleteSingleStation.Click += new System.EventHandler(this.btn_DeleteSingleStation_Click);
+ //
// bw_ASTER3_MapUpdater
//
this.bw_ASTER3_MapUpdater.WorkerReportsProgress = true;
@@ -7822,6 +7834,7 @@
private System.Windows.Forms.CheckBox cb_Options_Elevation_ASTER1_EnableCache;
private System.Windows.Forms.CheckBox cb_Options_Elevation_ASTER1;
private System.Windows.Forms.Button btn_Options_Path_Export;
+ private System.Windows.Forms.Button btn_DeleteSingleStation;
private System.Windows.Forms.Label label147;
private System.Windows.Forms.Label label148;
private PercentageControl ud_Options_Map_Opacity;
diff --git a/AirScout/OptionsDlg.cs b/AirScout/OptionsDlg.cs
index 8f4067c..dce604f 100644
--- a/AirScout/OptionsDlg.cs
+++ b/AirScout/OptionsDlg.cs
@@ -397,6 +397,12 @@ namespace AirScout
MapData.Database.TileDeleteAll();
}
+ private void btn_DeleteSingleStation_Click(object sender, EventArgs e)
+ {
+ DeleteSingleStationDlg Dlg = new DeleteSingleStationDlg();
+ Dlg.ShowDialog();
+ }
+
private void btn_Options_ScoutBase_Database_Maintenance_Click(object sender, EventArgs e)
{
DatabaseMaintenanceDlg Dlg = new DatabaseMaintenanceDlg(StationData.Database);
diff --git a/AirScout/Properties/Settings.Designer.cs b/AirScout/Properties/Settings.Designer.cs
index 0df2f54..89008ac 100644
--- a/AirScout/Properties/Settings.Designer.cs
+++ b/AirScout/Properties/Settings.Designer.cs
@@ -2683,5 +2683,17 @@ Digital data base on the World Wide Web (URL: http://www.ngdc.noaa.gov/mgg/topo/
this["Map_ShowDistances"] = value;
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]
+ public string StationsMap_OverlayElevation {
+ get {
+ return ((string)(this["StationsMap_OverlayElevation"]));
+ }
+ set {
+ this["StationsMap_OverlayElevation"] = value;
+ }
+ }
}
}
diff --git a/AirScout/Requirements.txt b/AirScout/Requirements.txt
index 69bf623..bfcac3b 100644
--- a/AirScout/Requirements.txt
+++ b/AirScout/Requirements.txt
@@ -1,5 +1,12 @@
***************** AirScout Requirements **************************
+- GreatCircle, distance and locator layer on map (DJ5AR)
- Snooze button for alarm on main window, clickable in PLAY mode ()
+- Calculate Doppler
+
+* watch list
+- Add/remove call sign from Multi View tab over UDP command
+- add stations to watchlist based on DXCC, Loc, QTF range from QTF1 to QTF2
+
diff --git a/AirScout/Watchlist.cs b/AirScout/Watchlist.cs
index 857e7d2..9ce349e 100644
--- a/AirScout/Watchlist.cs
+++ b/AirScout/Watchlist.cs
@@ -27,8 +27,7 @@ namespace AirScout
Remove = false;
}
- public WatchlistItem(string call, string loc, bool oor) : this(call, loc, oor, false, false) { }
- public WatchlistItem(string call, string loc, bool oor, bool check, bool selected)
+ public WatchlistItem(string call, string loc, bool oor, bool check = false, bool selected = false)
{
Call = call;
Loc = loc;
diff --git a/WinTest/WinTest.cs b/WinTest/WinTest.cs
index 0ef5b90..f649ce9 100644
--- a/WinTest/WinTest.cs
+++ b/WinTest/WinTest.cs
@@ -12,6 +12,8 @@ namespace WinTest
PKTRCVD = 2,
SETAZIMUTH = 100,
SETELEVATION = 101,
+ ASADDWATCH = 247,
+ ASREMOVEWATCH = 248,
ASWATCHLIST = 249,
ASSETPATH = 252,
ASSHOWPATH = 253,
@@ -83,6 +85,8 @@ namespace WinTest
text = text.Remove(0, text.IndexOf(" ") + 1);
// Clean up the message --> scrub last byte
text = text.Substring(0, text.Length - 1).Replace("\"", "");
+ // clean up newer messages with 2 placeholders
+ text = text.TrimEnd('?');
// convert bytes coded in UTF8 to text
Data = text.Substring(0, text.Length);
// get checksum
diff --git a/WinTestSimulator/MainDlg.Designer.cs b/WinTestSimulator/MainDlg.Designer.cs
new file mode 100644
index 0000000..6cb2a8f
--- /dev/null
+++ b/WinTestSimulator/MainDlg.Designer.cs
@@ -0,0 +1,194 @@
+namespace WinTestSimulator
+{
+ partial class MainDlg
+ {
+ ///
+ /// Erforderliche Designervariable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Verwendete Ressourcen bereinigen.
+ ///
+ /// True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Vom Windows Form-Designer generierter Code
+
+ ///
+ /// Erforderliche Methode für die Designerunterstützung.
+ /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
+ ///
+ private void InitializeComponent()
+ {
+ this.label1 = new System.Windows.Forms.Label();
+ this.btn_Send = new System.Windows.Forms.Button();
+ this.label2 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.label4 = new System.Windows.Forms.Label();
+ this.tb_To = new System.Windows.Forms.TextBox();
+ this.ud_Port = new System.Windows.Forms.NumericUpDown();
+ this.tb_From = new System.Windows.Forms.TextBox();
+ this.tb_Message = new System.Windows.Forms.TextBox();
+ this.label5 = new System.Windows.Forms.Label();
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ ((System.ComponentModel.ISupportInitialize)(this.ud_Port)).BeginInit();
+ this.SuspendLayout();
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(12, 41);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(53, 13);
+ this.label1.TabIndex = 1;
+ this.label1.Text = "Message:";
+ //
+ // btn_Send
+ //
+ this.btn_Send.Location = new System.Drawing.Point(498, 86);
+ this.btn_Send.Name = "btn_Send";
+ this.btn_Send.Size = new System.Drawing.Size(243, 23);
+ this.btn_Send.TabIndex = 2;
+ this.btn_Send.Text = "Send";
+ this.btn_Send.UseVisualStyleBackColor = true;
+ this.btn_Send.Click += new System.EventHandler(this.btn_Send_Click);
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Location = new System.Drawing.Point(176, 93);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(33, 13);
+ this.label2.TabIndex = 5;
+ this.label2.Text = "From:";
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(25, 91);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(29, 13);
+ this.label3.TabIndex = 6;
+ this.label3.Text = "Port:";
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(324, 91);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(23, 13);
+ this.label4.TabIndex = 8;
+ this.label4.Text = "To:";
+ //
+ // tb_To
+ //
+ this.tb_To.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::WinTestSimulator.Properties.Settings.Default, "To", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
+ this.tb_To.Location = new System.Drawing.Point(363, 88);
+ this.tb_To.Name = "tb_To";
+ this.tb_To.Size = new System.Drawing.Size(100, 20);
+ this.tb_To.TabIndex = 7;
+ this.tb_To.Text = global::WinTestSimulator.Properties.Settings.Default.To;
+ //
+ // ud_Port
+ //
+ this.ud_Port.DataBindings.Add(new System.Windows.Forms.Binding("Value", global::WinTestSimulator.Properties.Settings.Default, "Port", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
+ this.ud_Port.Location = new System.Drawing.Point(71, 89);
+ this.ud_Port.Maximum = new decimal(new int[] {
+ 65535,
+ 0,
+ 0,
+ 0});
+ this.ud_Port.Minimum = new decimal(new int[] {
+ 1,
+ 0,
+ 0,
+ 0});
+ this.ud_Port.Name = "ud_Port";
+ this.ud_Port.Size = new System.Drawing.Size(61, 20);
+ this.ud_Port.TabIndex = 4;
+ this.ud_Port.Value = global::WinTestSimulator.Properties.Settings.Default.Port;
+ //
+ // tb_From
+ //
+ this.tb_From.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::WinTestSimulator.Properties.Settings.Default, "From", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
+ this.tb_From.Location = new System.Drawing.Point(215, 89);
+ this.tb_From.Name = "tb_From";
+ this.tb_From.Size = new System.Drawing.Size(75, 20);
+ this.tb_From.TabIndex = 3;
+ this.tb_From.Text = global::WinTestSimulator.Properties.Settings.Default.From;
+ //
+ // tb_Message
+ //
+ this.tb_Message.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::WinTestSimulator.Properties.Settings.Default, "Message", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
+ this.tb_Message.Location = new System.Drawing.Point(71, 38);
+ this.tb_Message.Name = "tb_Message";
+ this.tb_Message.Size = new System.Drawing.Size(107, 20);
+ this.tb_Message.TabIndex = 0;
+ this.tb_Message.Text = global::WinTestSimulator.Properties.Settings.Default.Message;
+ //
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.Location = new System.Drawing.Point(196, 41);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(33, 13);
+ this.label5.TabIndex = 10;
+ this.label5.Text = "Data:";
+ //
+ // textBox1
+ //
+ this.textBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::WinTestSimulator.Properties.Settings.Default, "Data", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
+ this.textBox1.Location = new System.Drawing.Point(255, 38);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(486, 20);
+ this.textBox1.TabIndex = 9;
+ this.textBox1.Text = global::WinTestSimulator.Properties.Settings.Default.Data;
+ //
+ // MainDlg
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(774, 146);
+ this.Controls.Add(this.label5);
+ this.Controls.Add(this.textBox1);
+ this.Controls.Add(this.label4);
+ this.Controls.Add(this.tb_To);
+ this.Controls.Add(this.label3);
+ this.Controls.Add(this.label2);
+ this.Controls.Add(this.ud_Port);
+ this.Controls.Add(this.tb_From);
+ this.Controls.Add(this.btn_Send);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.tb_Message);
+ this.Name = "MainDlg";
+ this.Text = "WinTest Message Simulator";
+ ((System.ComponentModel.ISupportInitialize)(this.ud_Port)).EndInit();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TextBox tb_Message;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Button btn_Send;
+ private System.Windows.Forms.TextBox tb_From;
+ private System.Windows.Forms.NumericUpDown ud_Port;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.TextBox tb_To;
+ private System.Windows.Forms.Label label5;
+ private System.Windows.Forms.TextBox textBox1;
+ }
+}
+
diff --git a/WinTestSimulator/MainDlg.cs b/WinTestSimulator/MainDlg.cs
new file mode 100644
index 0000000..ea99823
--- /dev/null
+++ b/WinTestSimulator/MainDlg.cs
@@ -0,0 +1,43 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Net;
+using System.Net.Sockets;
+using System.Text;
+using System.Windows.Forms;
+using WinTest;
+
+namespace WinTestSimulator
+{
+ public partial class MainDlg : Form
+ {
+ public MainDlg()
+ {
+ InitializeComponent();
+ }
+
+ private void btn_Send_Click(object sender, EventArgs e)
+ {
+ WTMESSAGES msg = WTMESSAGES.NONE;
+ Enum.TryParse(Properties.Settings.Default.Message.ToUpper().Trim(), out msg);
+ wtMessage SendMsg = new wtMessage(msg,
+ Properties.Settings.Default.From,
+ Properties.Settings.Default.To,
+ Properties.Settings.Default.Data);
+ SendMsg.HasChecksum = true;
+ // send message
+ UdpClient client = new UdpClient();
+ client.Client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, 1);
+ client.Client.ReceiveTimeout = 10000; // 10s Receive timeout
+ IPEndPoint groupEp = new IPEndPoint(IPAddress.Broadcast, (int)Properties.Settings.Default.Port);
+ client.Connect(groupEp);
+ byte[] b = SendMsg.ToBytes();
+ client.Send(b, b.Length);
+ client.Close();
+
+ }
+ }
+}
diff --git a/WinTestSimulator/MainDlg.resx b/WinTestSimulator/MainDlg.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/WinTestSimulator/MainDlg.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/WinTestSimulator/Program.cs b/WinTestSimulator/Program.cs
new file mode 100644
index 0000000..6759f4c
--- /dev/null
+++ b/WinTestSimulator/Program.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Windows.Forms;
+
+namespace WinTestSimulator
+{
+ internal static class Program
+ {
+ ///
+ /// Der Haupteinstiegspunkt für die Anwendung.
+ ///
+ [STAThread]
+ static void Main()
+ {
+ Application.EnableVisualStyles();
+ Application.SetCompatibleTextRenderingDefault(false);
+ Application.Run(new MainDlg());
+ }
+ }
+}
diff --git a/WinTestSimulator/Properties/AssemblyInfo.cs b/WinTestSimulator/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..5c48995
--- /dev/null
+++ b/WinTestSimulator/Properties/AssemblyInfo.cs
@@ -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("WinTestSimulator")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("WinTestSimulator")]
+[assembly: AssemblyCopyright("Copyright © 2021")]
+[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("b7b00b6b-4288-4562-9773-116556607857")]
+
+// 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.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/WinTestSimulator/Properties/Resources.Designer.cs b/WinTestSimulator/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..ff442cf
--- /dev/null
+++ b/WinTestSimulator/Properties/Resources.Designer.cs
@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+//
+// Dieser Code wurde von einem Tool generiert.
+// Laufzeitversion: 4.0.30319.42000
+//
+// Änderungen an dieser Datei können fehlerhaftes Verhalten verursachen und gehen verloren, wenn
+// der Code neu generiert wird.
+//
+//------------------------------------------------------------------------------
+
+namespace WinTestSimulator.Properties
+{
+
+
+ ///
+ /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
+ ///
+ // Diese Klasse wurde von der StronglyTypedResourceBuilder-Klasse
+ // über ein Tool wie ResGen oder Visual Studio automatisch generiert.
+ // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
+ // mit der Option /str erneut aus, oder erstellen Sie Ihr VS-Projekt neu.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources
+ {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources()
+ {
+ }
+
+ ///
+ /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager
+ {
+ get
+ {
+ if ((resourceMan == null))
+ {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WinTestSimulator.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
+ /// Ressourcenlookups, die diese stark typisierte Ressourcenklasse verwenden.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture
+ {
+ get
+ {
+ return resourceCulture;
+ }
+ set
+ {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/WinTestSimulator/Properties/Resources.resx b/WinTestSimulator/Properties/Resources.resx
new file mode 100644
index 0000000..af7dbeb
--- /dev/null
+++ b/WinTestSimulator/Properties/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/WinTestSimulator/Properties/Settings.Designer.cs b/WinTestSimulator/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..d48239b
--- /dev/null
+++ b/WinTestSimulator/Properties/Settings.Designer.cs
@@ -0,0 +1,86 @@
+//------------------------------------------------------------------------------
+//
+// 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.
+//
+//------------------------------------------------------------------------------
+
+namespace WinTestSimulator.Properties {
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.3.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;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("ASADDWATCH")]
+ public string Message {
+ get {
+ return ((string)(this["Message"]));
+ }
+ set {
+ this["Message"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("Test")]
+ public string From {
+ get {
+ return ((string)(this["From"]));
+ }
+ set {
+ this["From"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("9872")]
+ public decimal Port {
+ get {
+ return ((decimal)(this["Port"]));
+ }
+ set {
+ this["Port"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("AS")]
+ public string To {
+ get {
+ return ((string)(this["To"]));
+ }
+ set {
+ this["To"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("")]
+ public string Data {
+ get {
+ return ((string)(this["Data"]));
+ }
+ set {
+ this["Data"] = value;
+ }
+ }
+ }
+}
diff --git a/WinTestSimulator/Properties/Settings.settings b/WinTestSimulator/Properties/Settings.settings
new file mode 100644
index 0000000..1700bb4
--- /dev/null
+++ b/WinTestSimulator/Properties/Settings.settings
@@ -0,0 +1,21 @@
+
+
+
+
+
+ ASADDWATCH
+
+
+ Test
+
+
+ 9872
+
+
+ AS
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WinTestSimulator/WinTestSimulator.csproj b/WinTestSimulator/WinTestSimulator.csproj
new file mode 100644
index 0000000..3b7f29e
--- /dev/null
+++ b/WinTestSimulator/WinTestSimulator.csproj
@@ -0,0 +1,85 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {B7B00B6B-4288-4562-9773-116556607857}
+ WinExe
+ WinTestSimulator
+ WinTestSimulator
+ v4.0
+ 512
+ true
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Form
+
+
+ MainDlg.cs
+
+
+
+
+ MainDlg.cs
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+ Designer
+
+
+ True
+ Resources.resx
+
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+ True
+ Settings.settings
+ True
+
+
+
+
+ {7b815c51-6896-4989-bd1b-8d2d7a116aa3}
+ WinTest
+
+
+
+
\ No newline at end of file
diff --git a/WinTestSimulator/app.config b/WinTestSimulator/app.config
new file mode 100644
index 0000000..8c5039a
--- /dev/null
+++ b/WinTestSimulator/app.config
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+ ASADDWATCH
+
+
+ Test
+
+
+ 9872
+
+
+ AS
+
+
+
+
+
+
+
\ No newline at end of file