kopia lustrzana https://github.com/dl2alf/AirScout
commit
81f655791d
|
@ -216,13 +216,13 @@ namespace System.Net
|
||||||
|
|
||||||
class MyTlsAuthentication : TlsAuthentication
|
class MyTlsAuthentication : TlsAuthentication
|
||||||
{
|
{
|
||||||
public TlsCredentials GetClientCredentials(CertificateRequest certificateRequest)
|
public TlsCredentials GetClientCredentials(CertificateRequest certificateRequest)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void NotifyServerCertificate(Certificate serverCertificate)
|
public void NotifyServerCertificate(Certificate serverCertificate)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -178,7 +178,7 @@ namespace AirScout.PlaneFeeds.Plugin.VirtualRadarServer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[Export(typeof(IPlaneFeedPlugin))]
|
[Export(typeof(IPlaneFeedPlugin))]
|
||||||
[ExportMetadata("Name", "PlaneFeedPlugin")]
|
[ExportMetadata("Name", "PlaneFeedPlugin")]
|
||||||
public class VirtualRadarServerPlugin : IPlaneFeedPlugin
|
public class VirtualRadarServerPlugin : IPlaneFeedPlugin
|
||||||
{
|
{
|
||||||
|
@ -297,7 +297,7 @@ namespace AirScout.PlaneFeeds.Plugin.VirtualRadarServer
|
||||||
APIKey = Settings.APIKey;
|
APIKey = Settings.APIKey;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// get AirScout internal key
|
// get AirScout internal key
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -409,7 +409,7 @@ namespace AirScout.PlaneFeeds.Plugin.VirtualRadarServer
|
||||||
{
|
{
|
||||||
PlaneFeedPluginPlaneInfo plane = new PlaneFeedPluginPlaneInfo();
|
PlaneFeedPluginPlaneInfo plane = new PlaneFeedPluginPlaneInfo();
|
||||||
// get hex first
|
// get hex first
|
||||||
plane.Hex = ReadPropertyString(ac, "Icao").Trim().Replace("\"","");
|
plane.Hex = ReadPropertyString(ac, "Icao").Trim().Replace("\"", "");
|
||||||
// get position
|
// get position
|
||||||
plane.Lat = ReadPropertyDouble(ac, "Lat");
|
plane.Lat = ReadPropertyDouble(ac, "Lat");
|
||||||
plane.Lon = ReadPropertyDouble(ac, "Long");
|
plane.Lon = ReadPropertyDouble(ac, "Long");
|
||||||
|
@ -548,7 +548,7 @@ namespace AirScout.PlaneFeeds.Plugin.VirtualRadarServer
|
||||||
return decrypted;
|
return decrypted;
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.Diagnostics.DebuggerNonUserCode]
|
[System.Diagnostics.DebuggerNonUserCode]
|
||||||
private string ReadPropertyString(dynamic o, string propertyname)
|
private string ReadPropertyString(dynamic o, string propertyname)
|
||||||
{
|
{
|
||||||
string s = null;
|
string s = null;
|
||||||
|
|
|
@ -36,19 +36,19 @@
|
||||||
this.ss_Main = new System.Windows.Forms.StatusStrip();
|
this.ss_Main = new System.Windows.Forms.StatusStrip();
|
||||||
this.tsl_Main = new System.Windows.Forms.ToolStripStatusLabel();
|
this.tsl_Main = new System.Windows.Forms.ToolStripStatusLabel();
|
||||||
this.panel1 = new System.Windows.Forms.Panel();
|
this.panel1 = new System.Windows.Forms.Panel();
|
||||||
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.ud_Analysis_AmbiguousGap = new System.Windows.Forms.NumericUpDown();
|
||||||
|
this.cb_Analysis_CrossingHistory_WithSignlaLevel = new System.Windows.Forms.CheckBox();
|
||||||
this.btn_History_Export = new System.Windows.Forms.Button();
|
this.btn_History_Export = new System.Windows.Forms.Button();
|
||||||
this.btn_History_Cancel = new System.Windows.Forms.Button();
|
this.btn_History_Cancel = new System.Windows.Forms.Button();
|
||||||
this.btn_History_Calculate = new System.Windows.Forms.Button();
|
this.btn_History_Calculate = new System.Windows.Forms.Button();
|
||||||
this.tt_Crossing_History = new System.Windows.Forms.ToolTip(this.components);
|
this.tt_Crossing_History = new System.Windows.Forms.ToolTip(this.components);
|
||||||
this.ch_Crossing_History = new System.Windows.Forms.DataVisualization.Charting.Chart();
|
this.ch_Crossing_History = new System.Windows.Forms.DataVisualization.Charting.Chart();
|
||||||
this.cb_Analysis_CrossingHistory_WithSignlaLevel = new System.Windows.Forms.CheckBox();
|
|
||||||
this.ud_Analysis_AmbiguousGap = new System.Windows.Forms.NumericUpDown();
|
|
||||||
this.label1 = new System.Windows.Forms.Label();
|
|
||||||
this.label2 = new System.Windows.Forms.Label();
|
|
||||||
this.ss_Main.SuspendLayout();
|
this.ss_Main.SuspendLayout();
|
||||||
this.panel1.SuspendLayout();
|
this.panel1.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.ch_Crossing_History)).BeginInit();
|
|
||||||
((System.ComponentModel.ISupportInitialize)(this.ud_Analysis_AmbiguousGap)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.ud_Analysis_AmbiguousGap)).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.ch_Crossing_History)).BeginInit();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// bw_History
|
// bw_History
|
||||||
|
@ -90,6 +90,45 @@
|
||||||
this.panel1.Size = new System.Drawing.Size(893, 100);
|
this.panel1.Size = new System.Drawing.Size(893, 100);
|
||||||
this.panel1.TabIndex = 2;
|
this.panel1.TabIndex = 2;
|
||||||
//
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
this.label2.AutoSize = true;
|
||||||
|
this.label2.Location = new System.Drawing.Point(393, 51);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(32, 13);
|
||||||
|
this.label2.TabIndex = 6;
|
||||||
|
this.label2.Text = "secs.";
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(9, 51);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(276, 13);
|
||||||
|
this.label1.TabIndex = 5;
|
||||||
|
this.label1.Text = "Timespan within two crossings considered as ambiguous:";
|
||||||
|
//
|
||||||
|
// ud_Analysis_AmbiguousGap
|
||||||
|
//
|
||||||
|
this.ud_Analysis_AmbiguousGap.DataBindings.Add(new System.Windows.Forms.Binding("Value", global::AirScout.Properties.Settings.Default, "Analysis_CrossingHistory_AmbigousGap", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||||
|
this.ud_Analysis_AmbiguousGap.Location = new System.Drawing.Point(318, 49);
|
||||||
|
this.ud_Analysis_AmbiguousGap.Name = "ud_Analysis_AmbiguousGap";
|
||||||
|
this.ud_Analysis_AmbiguousGap.Size = new System.Drawing.Size(60, 20);
|
||||||
|
this.ud_Analysis_AmbiguousGap.TabIndex = 4;
|
||||||
|
this.ud_Analysis_AmbiguousGap.Value = global::AirScout.Properties.Settings.Default.Analysis_CrossingHistory_AmbigousGap;
|
||||||
|
//
|
||||||
|
// cb_Analysis_CrossingHistory_WithSignlaLevel
|
||||||
|
//
|
||||||
|
this.cb_Analysis_CrossingHistory_WithSignlaLevel.AutoSize = true;
|
||||||
|
this.cb_Analysis_CrossingHistory_WithSignlaLevel.Checked = global::AirScout.Properties.Settings.Default.Analysis_CrossingHistory_WithSignalLevel;
|
||||||
|
this.cb_Analysis_CrossingHistory_WithSignlaLevel.DataBindings.Add(new System.Windows.Forms.Binding("Checked", global::AirScout.Properties.Settings.Default, "Analysis_CrossingHistory_WithSignalLevel", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||||
|
this.cb_Analysis_CrossingHistory_WithSignlaLevel.Location = new System.Drawing.Point(12, 21);
|
||||||
|
this.cb_Analysis_CrossingHistory_WithSignlaLevel.Name = "cb_Analysis_CrossingHistory_WithSignlaLevel";
|
||||||
|
this.cb_Analysis_CrossingHistory_WithSignlaLevel.Size = new System.Drawing.Size(258, 17);
|
||||||
|
this.cb_Analysis_CrossingHistory_WithSignlaLevel.TabIndex = 3;
|
||||||
|
this.cb_Analysis_CrossingHistory_WithSignlaLevel.Text = "Consider crossings with recorded signal level only";
|
||||||
|
this.cb_Analysis_CrossingHistory_WithSignlaLevel.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
// btn_History_Export
|
// btn_History_Export
|
||||||
//
|
//
|
||||||
this.btn_History_Export.Location = new System.Drawing.Point(697, 41);
|
this.btn_History_Export.Location = new System.Drawing.Point(697, 41);
|
||||||
|
@ -151,45 +190,6 @@
|
||||||
this.ch_Crossing_History.TabIndex = 5;
|
this.ch_Crossing_History.TabIndex = 5;
|
||||||
this.ch_Crossing_History.Text = "History";
|
this.ch_Crossing_History.Text = "History";
|
||||||
//
|
//
|
||||||
// cb_Analysis_CrossingHistory_WithSignlaLevel
|
|
||||||
//
|
|
||||||
this.cb_Analysis_CrossingHistory_WithSignlaLevel.AutoSize = true;
|
|
||||||
this.cb_Analysis_CrossingHistory_WithSignlaLevel.Checked = global::AirScout.Properties.Settings.Default.Analysis_CrossingHistory_WithSignalLevel;
|
|
||||||
this.cb_Analysis_CrossingHistory_WithSignlaLevel.DataBindings.Add(new System.Windows.Forms.Binding("Checked", global::AirScout.Properties.Settings.Default, "Analysis_CrossingHistory_WithSignalLevel", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
|
||||||
this.cb_Analysis_CrossingHistory_WithSignlaLevel.Location = new System.Drawing.Point(12, 21);
|
|
||||||
this.cb_Analysis_CrossingHistory_WithSignlaLevel.Name = "cb_Analysis_CrossingHistory_WithSignlaLevel";
|
|
||||||
this.cb_Analysis_CrossingHistory_WithSignlaLevel.Size = new System.Drawing.Size(258, 17);
|
|
||||||
this.cb_Analysis_CrossingHistory_WithSignlaLevel.TabIndex = 3;
|
|
||||||
this.cb_Analysis_CrossingHistory_WithSignlaLevel.Text = "Consider crossings with recorded signal level only";
|
|
||||||
this.cb_Analysis_CrossingHistory_WithSignlaLevel.UseVisualStyleBackColor = true;
|
|
||||||
//
|
|
||||||
// ud_Analysis_AmbiguousGap
|
|
||||||
//
|
|
||||||
this.ud_Analysis_AmbiguousGap.DataBindings.Add(new System.Windows.Forms.Binding("Value", global::AirScout.Properties.Settings.Default, "Analysis_CrossingHistory_AmbiguousGap", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
|
||||||
this.ud_Analysis_AmbiguousGap.Location = new System.Drawing.Point(318, 49);
|
|
||||||
this.ud_Analysis_AmbiguousGap.Name = "ud_Analysis_AmbiguousGap";
|
|
||||||
this.ud_Analysis_AmbiguousGap.Size = new System.Drawing.Size(60, 20);
|
|
||||||
this.ud_Analysis_AmbiguousGap.TabIndex = 4;
|
|
||||||
this.ud_Analysis_AmbiguousGap.Value = global::AirScout.Properties.Settings.Default.Analysis_CrossingHistory_AmbigousGap;
|
|
||||||
//
|
|
||||||
// label1
|
|
||||||
//
|
|
||||||
this.label1.AutoSize = true;
|
|
||||||
this.label1.Location = new System.Drawing.Point(9, 51);
|
|
||||||
this.label1.Name = "label1";
|
|
||||||
this.label1.Size = new System.Drawing.Size(276, 13);
|
|
||||||
this.label1.TabIndex = 5;
|
|
||||||
this.label1.Text = "Timespan within two crossings considered as ambiguous:";
|
|
||||||
//
|
|
||||||
// label2
|
|
||||||
//
|
|
||||||
this.label2.AutoSize = true;
|
|
||||||
this.label2.Location = new System.Drawing.Point(393, 51);
|
|
||||||
this.label2.Name = "label2";
|
|
||||||
this.label2.Size = new System.Drawing.Size(32, 13);
|
|
||||||
this.label2.TabIndex = 6;
|
|
||||||
this.label2.Text = "secs.";
|
|
||||||
//
|
|
||||||
// CrossingHistoryDlg
|
// CrossingHistoryDlg
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
@ -206,8 +206,8 @@
|
||||||
this.ss_Main.PerformLayout();
|
this.ss_Main.PerformLayout();
|
||||||
this.panel1.ResumeLayout(false);
|
this.panel1.ResumeLayout(false);
|
||||||
this.panel1.PerformLayout();
|
this.panel1.PerformLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.ch_Crossing_History)).EndInit();
|
|
||||||
((System.ComponentModel.ISupportInitialize)(this.ud_Analysis_AmbiguousGap)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.ud_Analysis_AmbiguousGap)).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.ch_Crossing_History)).EndInit();
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,6 @@
|
||||||
this.label8 = new System.Windows.Forms.Label();
|
this.label8 = new System.Windows.Forms.Label();
|
||||||
this.gm_Callsign = new GMap.NET.WindowsForms.GMapControl();
|
this.gm_Callsign = new GMap.NET.WindowsForms.GMapControl();
|
||||||
this.tb_Callsign = new ScoutBase.Core.CallsignTextBox();
|
this.tb_Callsign = new ScoutBase.Core.CallsignTextBox();
|
||||||
this.tb_Locator = new ScoutBase.Core.LocatorTextBox();
|
|
||||||
this.tb_Longitude = new ScoutBase.Core.DoubleTextBox();
|
this.tb_Longitude = new ScoutBase.Core.DoubleTextBox();
|
||||||
this.tb_Latitude = new ScoutBase.Core.DoubleTextBox();
|
this.tb_Latitude = new ScoutBase.Core.DoubleTextBox();
|
||||||
this.btn_Cancel = new System.Windows.Forms.Button();
|
this.btn_Cancel = new System.Windows.Forms.Button();
|
||||||
|
@ -48,6 +47,13 @@
|
||||||
this.label1 = new System.Windows.Forms.Label();
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
this.tb_Elevation = new ScoutBase.Core.DoubleTextBox();
|
this.tb_Elevation = new ScoutBase.Core.DoubleTextBox();
|
||||||
this.label2 = new System.Windows.Forms.Label();
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
|
this.ss_Main = new System.Windows.Forms.StatusStrip();
|
||||||
|
this.tsl_Status = new System.Windows.Forms.ToolStripStatusLabel();
|
||||||
|
this.bw_Elevationgrid = new System.ComponentModel.BackgroundWorker();
|
||||||
|
this.tb_Locator = new ScoutBase.Core.LocatorTextBox();
|
||||||
|
this.cb_Options_StationsMap_OverlayElevation = new System.Windows.Forms.CheckBox();
|
||||||
|
this.label3 = new System.Windows.Forms.Label();
|
||||||
|
this.ss_Main.SuspendLayout();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// label19
|
// label19
|
||||||
|
@ -153,7 +159,7 @@
|
||||||
this.gm_Callsign.RoutesEnabled = true;
|
this.gm_Callsign.RoutesEnabled = true;
|
||||||
this.gm_Callsign.SelectedAreaFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(65)))), ((int)(((byte)(105)))), ((int)(((byte)(225)))));
|
this.gm_Callsign.SelectedAreaFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(65)))), ((int)(((byte)(105)))), ((int)(((byte)(225)))));
|
||||||
this.gm_Callsign.ShowTileGridLines = false;
|
this.gm_Callsign.ShowTileGridLines = false;
|
||||||
this.gm_Callsign.Size = new System.Drawing.Size(760, 621);
|
this.gm_Callsign.Size = new System.Drawing.Size(760, 617);
|
||||||
this.gm_Callsign.TabIndex = 29;
|
this.gm_Callsign.TabIndex = 29;
|
||||||
this.gm_Callsign.Zoom = 0D;
|
this.gm_Callsign.Zoom = 0D;
|
||||||
this.gm_Callsign.OnMarkerEnter += new GMap.NET.WindowsForms.MarkerEnter(this.gm_Callsign_OnMarkerEnter);
|
this.gm_Callsign.OnMarkerEnter += new GMap.NET.WindowsForms.MarkerEnter(this.gm_Callsign_OnMarkerEnter);
|
||||||
|
@ -176,19 +182,6 @@
|
||||||
this.tb_Callsign.Size = new System.Drawing.Size(107, 21);
|
this.tb_Callsign.Size = new System.Drawing.Size(107, 21);
|
||||||
this.tb_Callsign.TabIndex = 30;
|
this.tb_Callsign.TabIndex = 30;
|
||||||
//
|
//
|
||||||
// tb_Locator
|
|
||||||
//
|
|
||||||
this.tb_Locator.DataBindings.Add(new System.Windows.Forms.Binding("SmallLettersForSubsquares", global::AirScout.Properties.Settings.Default, "Locator_SmallLettersForSubsquares", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
|
||||||
this.tb_Locator.ErrorBackColor = System.Drawing.Color.Red;
|
|
||||||
this.tb_Locator.ErrorForeColor = System.Drawing.Color.White;
|
|
||||||
this.tb_Locator.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
|
||||||
this.tb_Locator.Location = new System.Drawing.Point(875, 140);
|
|
||||||
this.tb_Locator.Name = "tb_Locator";
|
|
||||||
this.tb_Locator.Size = new System.Drawing.Size(107, 21);
|
|
||||||
this.tb_Locator.SmallLettersForSubsquares = global::AirScout.Properties.Settings.Default.Locator_SmallLettersForSubsquares;
|
|
||||||
this.tb_Locator.TabIndex = 35;
|
|
||||||
this.tb_Locator.TextChanged += new System.EventHandler(this.tb_Locator_TextChanged);
|
|
||||||
//
|
|
||||||
// tb_Longitude
|
// tb_Longitude
|
||||||
//
|
//
|
||||||
this.tb_Longitude.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.tb_Longitude.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
@ -199,7 +192,7 @@
|
||||||
this.tb_Longitude.Name = "tb_Longitude";
|
this.tb_Longitude.Name = "tb_Longitude";
|
||||||
this.tb_Longitude.Size = new System.Drawing.Size(107, 21);
|
this.tb_Longitude.Size = new System.Drawing.Size(107, 21);
|
||||||
this.tb_Longitude.TabIndex = 33;
|
this.tb_Longitude.TabIndex = 33;
|
||||||
this.tb_Longitude.Text = "10.68327000";
|
this.tb_Longitude.Text = "10.68327";
|
||||||
this.tb_Longitude.Value = 10.68327D;
|
this.tb_Longitude.Value = 10.68327D;
|
||||||
this.tb_Longitude.TextChanged += new System.EventHandler(this.tb_Longitude_TextChanged);
|
this.tb_Longitude.TextChanged += new System.EventHandler(this.tb_Longitude_TextChanged);
|
||||||
//
|
//
|
||||||
|
@ -213,14 +206,14 @@
|
||||||
this.tb_Latitude.Name = "tb_Latitude";
|
this.tb_Latitude.Name = "tb_Latitude";
|
||||||
this.tb_Latitude.Size = new System.Drawing.Size(107, 21);
|
this.tb_Latitude.Size = new System.Drawing.Size(107, 21);
|
||||||
this.tb_Latitude.TabIndex = 32;
|
this.tb_Latitude.TabIndex = 32;
|
||||||
this.tb_Latitude.Text = "50.93706700";
|
this.tb_Latitude.Text = "50.937067";
|
||||||
this.tb_Latitude.Value = 50.937067D;
|
this.tb_Latitude.Value = 50.937067D;
|
||||||
this.tb_Latitude.TextChanged += new System.EventHandler(this.tb_Latitude_TextChanged);
|
this.tb_Latitude.TextChanged += new System.EventHandler(this.tb_Latitude_TextChanged);
|
||||||
//
|
//
|
||||||
// btn_Cancel
|
// btn_Cancel
|
||||||
//
|
//
|
||||||
this.btn_Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
this.btn_Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||||
this.btn_Cancel.Location = new System.Drawing.Point(806, 685);
|
this.btn_Cancel.Location = new System.Drawing.Point(804, 665);
|
||||||
this.btn_Cancel.Name = "btn_Cancel";
|
this.btn_Cancel.Name = "btn_Cancel";
|
||||||
this.btn_Cancel.Size = new System.Drawing.Size(75, 23);
|
this.btn_Cancel.Size = new System.Drawing.Size(75, 23);
|
||||||
this.btn_Cancel.TabIndex = 44;
|
this.btn_Cancel.TabIndex = 44;
|
||||||
|
@ -231,7 +224,7 @@
|
||||||
// btn_OK
|
// btn_OK
|
||||||
//
|
//
|
||||||
this.btn_OK.DialogResult = System.Windows.Forms.DialogResult.OK;
|
this.btn_OK.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||||
this.btn_OK.Location = new System.Drawing.Point(907, 685);
|
this.btn_OK.Location = new System.Drawing.Point(907, 665);
|
||||||
this.btn_OK.Name = "btn_OK";
|
this.btn_OK.Name = "btn_OK";
|
||||||
this.btn_OK.Size = new System.Drawing.Size(75, 23);
|
this.btn_OK.Size = new System.Drawing.Size(75, 23);
|
||||||
this.btn_OK.TabIndex = 45;
|
this.btn_OK.TabIndex = 45;
|
||||||
|
@ -271,6 +264,63 @@
|
||||||
this.label2.TabIndex = 49;
|
this.label2.TabIndex = 49;
|
||||||
this.label2.Text = "m asl";
|
this.label2.Text = "m asl";
|
||||||
//
|
//
|
||||||
|
// ss_Main
|
||||||
|
//
|
||||||
|
this.ss_Main.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.tsl_Status});
|
||||||
|
this.ss_Main.Location = new System.Drawing.Point(0, 707);
|
||||||
|
this.ss_Main.Name = "ss_Main";
|
||||||
|
this.ss_Main.Size = new System.Drawing.Size(1008, 22);
|
||||||
|
this.ss_Main.TabIndex = 50;
|
||||||
|
this.ss_Main.Text = "statusStrip1";
|
||||||
|
//
|
||||||
|
// tsl_Status
|
||||||
|
//
|
||||||
|
this.tsl_Status.Name = "tsl_Status";
|
||||||
|
this.tsl_Status.Size = new System.Drawing.Size(39, 17);
|
||||||
|
this.tsl_Status.Text = "Status";
|
||||||
|
//
|
||||||
|
// bw_Elevationgrid
|
||||||
|
//
|
||||||
|
this.bw_Elevationgrid.WorkerReportsProgress = true;
|
||||||
|
this.bw_Elevationgrid.WorkerSupportsCancellation = true;
|
||||||
|
this.bw_Elevationgrid.DoWork += new System.ComponentModel.DoWorkEventHandler(this.bw_Elevationgrid_DoWork);
|
||||||
|
this.bw_Elevationgrid.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.bw_Elevationgrid_ProgressChanged);
|
||||||
|
this.bw_Elevationgrid.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.bw_Elevationgrid_RunWorkerCompleted);
|
||||||
|
//
|
||||||
|
// tb_Locator
|
||||||
|
//
|
||||||
|
this.tb_Locator.DataBindings.Add(new System.Windows.Forms.Binding("SmallLettersForSubsquares", global::AirScout.Properties.Settings.Default, "Locator_SmallLettersForSubsquares", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||||
|
this.tb_Locator.ErrorBackColor = System.Drawing.Color.Red;
|
||||||
|
this.tb_Locator.ErrorForeColor = System.Drawing.Color.White;
|
||||||
|
this.tb_Locator.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
this.tb_Locator.Location = new System.Drawing.Point(875, 140);
|
||||||
|
this.tb_Locator.Name = "tb_Locator";
|
||||||
|
this.tb_Locator.Size = new System.Drawing.Size(107, 21);
|
||||||
|
this.tb_Locator.SmallLettersForSubsquares = global::AirScout.Properties.Settings.Default.Locator_SmallLettersForSubsquares;
|
||||||
|
this.tb_Locator.TabIndex = 35;
|
||||||
|
this.tb_Locator.TextChanged += new System.EventHandler(this.tb_Locator_TextChanged);
|
||||||
|
//
|
||||||
|
// cb_Options_StationsMap_OverlayElevation
|
||||||
|
//
|
||||||
|
this.cb_Options_StationsMap_OverlayElevation.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||||
|
this.cb_Options_StationsMap_OverlayElevation.Checked = global::AirScout.Properties.Settings.Default.StationsMap_OverlayElevation;
|
||||||
|
this.cb_Options_StationsMap_OverlayElevation.Location = new System.Drawing.Point(804, 267);
|
||||||
|
this.cb_Options_StationsMap_OverlayElevation.Name = "cb_Options_StationsMap_OverlayElevation";
|
||||||
|
this.cb_Options_StationsMap_OverlayElevation.Size = new System.Drawing.Size(178, 46);
|
||||||
|
this.cb_Options_StationsMap_OverlayElevation.TabIndex = 51;
|
||||||
|
this.cb_Options_StationsMap_OverlayElevation.Text = "Overlay Elevation Grid \r\n(on zom levels >= 17)";
|
||||||
|
this.cb_Options_StationsMap_OverlayElevation.UseVisualStyleBackColor = true;
|
||||||
|
this.cb_Options_StationsMap_OverlayElevation.CheckedChanged += new System.EventHandler(this.cb_Options_StationsMap_OverlayElevation_CheckedChanged);
|
||||||
|
//
|
||||||
|
// label3
|
||||||
|
//
|
||||||
|
this.label3.AutoSize = true;
|
||||||
|
this.label3.Location = new System.Drawing.Point(813, 434);
|
||||||
|
this.label3.Name = "label3";
|
||||||
|
this.label3.Size = new System.Drawing.Size(0, 13);
|
||||||
|
this.label3.TabIndex = 52;
|
||||||
|
//
|
||||||
// MapStationDlg
|
// MapStationDlg
|
||||||
//
|
//
|
||||||
this.AcceptButton = this.btn_OK;
|
this.AcceptButton = this.btn_OK;
|
||||||
|
@ -278,6 +328,9 @@
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.CancelButton = this.btn_Cancel;
|
this.CancelButton = this.btn_Cancel;
|
||||||
this.ClientSize = new System.Drawing.Size(1008, 729);
|
this.ClientSize = new System.Drawing.Size(1008, 729);
|
||||||
|
this.Controls.Add(this.label3);
|
||||||
|
this.Controls.Add(this.cb_Options_StationsMap_OverlayElevation);
|
||||||
|
this.Controls.Add(this.ss_Main);
|
||||||
this.Controls.Add(this.label2);
|
this.Controls.Add(this.label2);
|
||||||
this.Controls.Add(this.tb_Elevation);
|
this.Controls.Add(this.tb_Elevation);
|
||||||
this.Controls.Add(this.label1);
|
this.Controls.Add(this.label1);
|
||||||
|
@ -302,6 +355,9 @@
|
||||||
this.MinimizeBox = false;
|
this.MinimizeBox = false;
|
||||||
this.Name = "MapStationDlg";
|
this.Name = "MapStationDlg";
|
||||||
this.Text = "MapStationDlg";
|
this.Text = "MapStationDlg";
|
||||||
|
this.Load += new System.EventHandler(this.MapStationDlg_Load);
|
||||||
|
this.ss_Main.ResumeLayout(false);
|
||||||
|
this.ss_Main.PerformLayout();
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|
||||||
|
@ -328,5 +384,10 @@
|
||||||
private System.Windows.Forms.Label label1;
|
private System.Windows.Forms.Label label1;
|
||||||
private ScoutBase.Core.DoubleTextBox tb_Elevation;
|
private ScoutBase.Core.DoubleTextBox tb_Elevation;
|
||||||
private System.Windows.Forms.Label label2;
|
private System.Windows.Forms.Label label2;
|
||||||
|
private System.Windows.Forms.StatusStrip ss_Main;
|
||||||
|
private System.Windows.Forms.ToolStripStatusLabel tsl_Status;
|
||||||
|
private System.ComponentModel.BackgroundWorker bw_Elevationgrid;
|
||||||
|
private System.Windows.Forms.CheckBox cb_Options_StationsMap_OverlayElevation;
|
||||||
|
private System.Windows.Forms.Label label3;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -21,6 +21,7 @@ namespace AirScout
|
||||||
|
|
||||||
GMapOverlay Callsignpolygons = new GMapOverlay("Callsignpolygons");
|
GMapOverlay Callsignpolygons = new GMapOverlay("Callsignpolygons");
|
||||||
GMapOverlay Callsignspositions = new GMapOverlay("Callsignpositions");
|
GMapOverlay Callsignspositions = new GMapOverlay("Callsignpositions");
|
||||||
|
GMapOverlay Elevationgrid = new GMapOverlay("Elevationgrid");
|
||||||
|
|
||||||
GMarkerGoogle UserPos = new GMarkerGoogle(new PointLatLng(0.0, 0.0), GMarkerGoogleType.red_dot);
|
GMarkerGoogle UserPos = new GMarkerGoogle(new PointLatLng(0.0, 0.0), GMarkerGoogleType.red_dot);
|
||||||
|
|
||||||
|
@ -48,6 +49,7 @@ namespace AirScout
|
||||||
gm_Callsign.MapScaleInfoEnabled = true;
|
gm_Callsign.MapScaleInfoEnabled = true;
|
||||||
gm_Callsign.Overlays.Add(Callsignpolygons);
|
gm_Callsign.Overlays.Add(Callsignpolygons);
|
||||||
gm_Callsign.Overlays.Add(Callsignspositions);
|
gm_Callsign.Overlays.Add(Callsignspositions);
|
||||||
|
gm_Callsign.Overlays.Add(Elevationgrid);
|
||||||
Callsignspositions.Markers.Add(UserPos);
|
Callsignspositions.Markers.Add(UserPos);
|
||||||
// initially set textboxes
|
// initially set textboxes
|
||||||
tb_Callsign.SilentText = StationLocation.Call;
|
tb_Callsign.SilentText = StationLocation.Call;
|
||||||
|
@ -56,11 +58,15 @@ namespace AirScout
|
||||||
tb_Locator.SilentText = MaidenheadLocator.LocFromLatLon(StationLocation.Lat, StationLocation.Lon, Properties.Settings.Default.Locator_SmallLettersForSubsquares, (int)Properties.Settings.Default.Locator_MaxLength / 2, Properties.Settings.Default.Locator_AutoLength);
|
tb_Locator.SilentText = MaidenheadLocator.LocFromLatLon(StationLocation.Lat, StationLocation.Lon, Properties.Settings.Default.Locator_SmallLettersForSubsquares, (int)Properties.Settings.Default.Locator_MaxLength / 2, Properties.Settings.Default.Locator_AutoLength);
|
||||||
tb_Elevation.SilentValue = GetElevation(StationLocation.Lat, StationLocation.Lon);
|
tb_Elevation.SilentValue = GetElevation(StationLocation.Lat, StationLocation.Lon);
|
||||||
ValidateDetails();
|
ValidateDetails();
|
||||||
// show initial zoom level in text box
|
|
||||||
gm_Callsign_OnMapZoomChanged();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void MapStationDlg_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
// initialen Zoomlevel anzeigen
|
||||||
|
gm_Callsign_OnMapZoomChanged();
|
||||||
|
}
|
||||||
|
|
||||||
private void btn_Cancel_Click(object sender, EventArgs e)
|
private void btn_Cancel_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -264,6 +270,166 @@ namespace AirScout
|
||||||
{
|
{
|
||||||
// maintain zoom level
|
// maintain zoom level
|
||||||
tb_Zoom.Text = gm_Callsign.Zoom.ToString();
|
tb_Zoom.Text = gm_Callsign.Zoom.ToString();
|
||||||
|
ShowElevationGrid();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ShowElevationGrid()
|
||||||
|
{
|
||||||
|
while (bw_Elevationgrid.IsBusy)
|
||||||
|
{
|
||||||
|
bw_Elevationgrid.CancelAsync();
|
||||||
|
Application.DoEvents();
|
||||||
|
}
|
||||||
|
Elevationgrid.Polygons.Clear();
|
||||||
|
if (cb_Options_StationsMap_OverlayElevation.Checked && (gm_Callsign.Zoom >= 17))
|
||||||
|
{
|
||||||
|
bw_Elevationgrid.RunWorkerAsync();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void bw_Elevationgrid_DoWork(object sender, DoWorkEventArgs e)
|
||||||
|
{
|
||||||
|
// fill elevation grid
|
||||||
|
bw_Elevationgrid.ReportProgress(0, "Calculating elevation grid...");
|
||||||
|
Elevationgrid.Polygons.Clear();
|
||||||
|
// convert view bounds to the beginning/end of Maidenhead locators
|
||||||
|
string loc = MaidenheadLocator.LocFromLatLon(gm_Callsign.ViewArea.Lat - gm_Callsign.ViewArea.HeightLat, gm_Callsign.ViewArea.Lng,false,3);
|
||||||
|
double minlat = MaidenheadLocator.LatFromLoc(loc, PositionInRectangle.BottomLeft);
|
||||||
|
double minlon = MaidenheadLocator.LonFromLoc(loc, PositionInRectangle.BottomLeft);
|
||||||
|
loc = MaidenheadLocator.LocFromLatLon(gm_Callsign.ViewArea.Lat, gm_Callsign.ViewArea.Lng + gm_Callsign.ViewArea.WidthLng, false, 3);
|
||||||
|
double maxlat = MaidenheadLocator.LatFromLoc(loc, PositionInRectangle.TopRight);
|
||||||
|
double maxlon = MaidenheadLocator.LonFromLoc(loc, PositionInRectangle.TopRight);
|
||||||
|
double lat = minlat;
|
||||||
|
double lon = minlon;
|
||||||
|
double stepwidthlat = 5.5555555555555555555555555555556e-4 / 2;
|
||||||
|
double stepwidthlon = 5.5555555555555555555555555555556e-4;
|
||||||
|
List<ElevationTile> elvs = new List<ElevationTile>();
|
||||||
|
double elvmin = short.MaxValue;
|
||||||
|
double elvmax = short.MinValue;
|
||||||
|
while (!bw_Elevationgrid.CancellationPending && (lat < maxlat))
|
||||||
|
{
|
||||||
|
lon = minlon;
|
||||||
|
while (!bw_Elevationgrid.CancellationPending && (lon < maxlon))
|
||||||
|
{
|
||||||
|
double elv = 0;
|
||||||
|
if ((lat + stepwidthlat >= gm_Callsign.ViewArea.Lat - gm_Callsign.ViewArea.HeightLat) &&
|
||||||
|
(lat <= gm_Callsign.ViewArea.Lat) &&
|
||||||
|
(lon + stepwidthlon >= gm_Callsign.ViewArea.Lng) &&
|
||||||
|
(lon <= gm_Callsign.ViewArea.Lng + gm_Callsign.ViewArea.WidthLng))
|
||||||
|
{
|
||||||
|
elv = ElevationData.Database[lat, lon, Properties.Settings.Default.ElevationModel];
|
||||||
|
ElevationTile t = new ElevationTile();
|
||||||
|
t.Lat = lat;
|
||||||
|
t.Lon = lon;
|
||||||
|
t.Elv = elv;
|
||||||
|
elvs.Add(t);
|
||||||
|
if (elv < elvmin)
|
||||||
|
elvmin = elv;
|
||||||
|
if (elv > elvmax)
|
||||||
|
elvmax = elv;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
}
|
||||||
|
lon += stepwidthlon;
|
||||||
|
}
|
||||||
|
lat += stepwidthlat;
|
||||||
|
}
|
||||||
|
foreach (ElevationTile t in elvs)
|
||||||
|
{
|
||||||
|
List<PointLatLng> l = new List<PointLatLng>();
|
||||||
|
l.Add(new PointLatLng((decimal)t.Lat, (decimal)t.Lon));
|
||||||
|
l.Add(new PointLatLng((decimal)(t.Lat + stepwidthlat), (decimal)t.Lon));
|
||||||
|
l.Add(new PointLatLng((decimal)(t.Lat + stepwidthlat), (decimal)(t.Lon + stepwidthlon)));
|
||||||
|
l.Add(new PointLatLng((decimal)t.Lat, (decimal)(t.Lon + stepwidthlon)));
|
||||||
|
GMapTextPolygon p = new GMapTextPolygon(l, t.Elv + " m");
|
||||||
|
Color c = Color.FromArgb(100, ElevationData.Database.GetElevationColor((t.Elv - elvmin) / (elvmax - elvmin) * 10000.0));
|
||||||
|
p.Stroke = new Pen(c);
|
||||||
|
p.Fill = new SolidBrush(c);
|
||||||
|
Font f = new Font("Courier New", 8, GraphicsUnit.Pixel);
|
||||||
|
bw_Elevationgrid.ReportProgress(1, p);
|
||||||
|
if (bw_Elevationgrid.CancellationPending)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
bw_Elevationgrid.ReportProgress(100, "Calculating elevation grid finished.");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void bw_Elevationgrid_ProgressChanged(object sender, ProgressChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.ProgressPercentage < 0)
|
||||||
|
{
|
||||||
|
tsl_Status.Text = (string)e.UserState;
|
||||||
|
ss_Main.Refresh();
|
||||||
|
}
|
||||||
|
if (e.ProgressPercentage == 0)
|
||||||
|
{
|
||||||
|
Elevationgrid.Polygons.Clear();
|
||||||
|
tsl_Status.Text = (string)e.UserState;
|
||||||
|
ss_Main.Refresh();
|
||||||
|
}
|
||||||
|
else if (e.ProgressPercentage == 1)
|
||||||
|
{
|
||||||
|
GMapPolygon p = (GMapPolygon)e.UserState;
|
||||||
|
Elevationgrid.Polygons.Add(p);
|
||||||
|
tsl_Status.Text = "Adding elevation tile " + p.Name;
|
||||||
|
ss_Main.Refresh();
|
||||||
|
}
|
||||||
|
else if (e.ProgressPercentage == 100)
|
||||||
|
{
|
||||||
|
tsl_Status.Text = (string)e.UserState;
|
||||||
|
ss_Main.Refresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void bw_Elevationgrid_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void cb_Options_StationsMap_OverlayElevation_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
ShowElevationGrid();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class GMapTextPolygon : GMapPolygon
|
||||||
|
{
|
||||||
|
public GMapTextPolygon(List<PointLatLng> points, string name) : base(points, name)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnRender(Graphics g)
|
||||||
|
{
|
||||||
|
base.OnRender(g);
|
||||||
|
StringFormat format = new StringFormat();
|
||||||
|
format.LineAlignment = StringAlignment.Center;
|
||||||
|
format.Alignment = StringAlignment.Center;
|
||||||
|
long minx = long.MaxValue;
|
||||||
|
long maxx = long.MinValue;
|
||||||
|
long miny = long.MaxValue;
|
||||||
|
long maxy = long.MinValue;
|
||||||
|
for (int i = 0; i < this.LocalPoints.Count; i++)
|
||||||
|
{
|
||||||
|
if (this.LocalPoints[i].X < minx)
|
||||||
|
minx = this.LocalPoints[i].X;
|
||||||
|
if (this.LocalPoints[i].X > maxx)
|
||||||
|
maxx = this.LocalPoints[i].X;
|
||||||
|
if (this.LocalPoints[i].Y < miny)
|
||||||
|
miny = this.LocalPoints[i].Y;
|
||||||
|
if (this.LocalPoints[i].Y > maxy)
|
||||||
|
maxy = this.LocalPoints[i].Y;
|
||||||
|
}
|
||||||
|
RectangleF f = new RectangleF(minx, miny, maxx - minx, maxy - miny);
|
||||||
|
g.DrawString(this.Name, SystemFonts.DefaultFont, Brushes.Black, f, format);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ElevationTile
|
||||||
|
{
|
||||||
|
public double Lat = 0;
|
||||||
|
public double Lon = 0;
|
||||||
|
public double Elv = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -122,4 +122,10 @@
|
||||||
Use the lat/lon textboxes for numeric input or enter a valid Maidenhead Locator.
|
Use the lat/lon textboxes for numeric input or enter a valid Maidenhead Locator.
|
||||||
Drag the needle on the map for exact location. Use mouse wheel or +/- buttons to zoom in and out.</value>
|
Drag the needle on the map for exact location. Use mouse wheel or +/- buttons to zoom in and out.</value>
|
||||||
</data>
|
</data>
|
||||||
|
<metadata name="ss_Main.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="bw_Elevationgrid.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>111, 17</value>
|
||||||
|
</metadata>
|
||||||
</root>
|
</root>
|
|
@ -3915,6 +3915,7 @@
|
||||||
//
|
//
|
||||||
// groupBox47
|
// groupBox47
|
||||||
//
|
//
|
||||||
|
this.groupBox47.Controls.Add(this.btn_DeleteSingleStation);
|
||||||
this.groupBox47.Controls.Add(this.btn_DeleteAllMapTiles);
|
this.groupBox47.Controls.Add(this.btn_DeleteAllMapTiles);
|
||||||
this.groupBox47.Controls.Add(this.btn_Options_DeleteAllPropagationPaths);
|
this.groupBox47.Controls.Add(this.btn_Options_DeleteAllPropagationPaths);
|
||||||
this.groupBox47.Controls.Add(this.btn_Options_DeleteAllElevationPaths);
|
this.groupBox47.Controls.Add(this.btn_Options_DeleteAllElevationPaths);
|
||||||
|
|
|
@ -2308,9 +2308,10 @@ Digital data base on the World Wide Web (URL: http://www.ngdc.noaa.gov/mgg/topo/
|
||||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||||
public string StationsMap_OverlayElevation {
|
|
||||||
|
public bool StationsMap_OverlayElevation {
|
||||||
get {
|
get {
|
||||||
return ((string)(this["StationsMap_OverlayElevation"]));
|
return ((bool)(this["StationsMap_OverlayElevation"]));
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
this["StationsMap_OverlayElevation"] = value;
|
this["StationsMap_OverlayElevation"] = value;
|
||||||
|
|
|
@ -604,7 +604,7 @@ MEaSUREs data and products are available at no charge from the LP DAAC.See https
|
||||||
<Setting Name="Map_Preloader_MaxZoom" Type="System.Decimal" Scope="User">
|
<Setting Name="Map_Preloader_MaxZoom" Type="System.Decimal" Scope="User">
|
||||||
<Value Profile="(Default)">11</Value>
|
<Value Profile="(Default)">11</Value>
|
||||||
</Setting>
|
</Setting>
|
||||||
<Setting Name="StationsMap_OverlayElevation" Type="System.String" Scope="User">
|
<Setting Name="StationsMap_OverlayElevation" Type="System.Boolean" Scope="User">
|
||||||
<Value Profile="(Default)">False</Value>
|
<Value Profile="(Default)">False</Value>
|
||||||
</Setting>
|
</Setting>
|
||||||
<Setting Name="Elevation_ASTER3_Copyright" Type="System.String" Scope="User">
|
<Setting Name="Elevation_ASTER3_Copyright" Type="System.String" Scope="User">
|
||||||
|
|
Plik diff jest za duży
Load Diff
|
@ -102,13 +102,13 @@ namespace System.Data.SQLite
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
index = i;
|
index = i;
|
||||||
// Console.WriteLine("[" + T.Name + ".FillFromRow] DataColumn not found: " + p.Name);
|
// Console.WriteLine("[" + T.Name + ".FillFromRow] DataColumn not found: " + p.Name);
|
||||||
if (p.PropertyType.Name.ToUpper() == "STRING")
|
if (p.PropertyType == typeof(string))
|
||||||
p.SetValue(this, (row[index].GetType().Name != "DBNull") ? row[index] : null, null);
|
p.SetValue(this, (row[index].GetType() != typeof(DBNull)) ? row[index] : null, null);
|
||||||
else if ((p.PropertyType.Name.ToUpper() == "FLOAT") || (p.PropertyType.Name.ToUpper() == "DOUBLE"))
|
else if ((p.PropertyType == typeof(float)) || (p.PropertyType == typeof(double)))
|
||||||
p.SetValue(this, (row[index].GetType().Name != "DBNull") ? row[index] : null, null);
|
p.SetValue(this, (row[index].GetType() !=typeof(DBNull)) ? row[index] : null, null);
|
||||||
else if (p.PropertyType.Name.ToUpper() == "INT32")
|
else if (p.PropertyType == typeof(int))
|
||||||
p.SetValue(this, (row[index].GetType().Name != "DBNull") ? row[index] : null, null);
|
p.SetValue(this, (row[index].GetType() != typeof(DBNull)) ? row[index] : null, null);
|
||||||
else if (p.PropertyType.Name.ToUpper() == "DATETIME")
|
else if (p.PropertyType == typeof(DateTime))
|
||||||
{
|
{
|
||||||
|
|
||||||
if ((row[index].GetType() == typeof(int)) || (row[index].GetType() == typeof(long)))
|
if ((row[index].GetType() == typeof(int)) || (row[index].GetType() == typeof(long)))
|
||||||
|
@ -118,7 +118,7 @@ namespace System.Data.SQLite
|
||||||
else
|
else
|
||||||
p.SetValue(this, row[index], null);
|
p.SetValue(this, row[index], null);
|
||||||
}
|
}
|
||||||
else if (p.PropertyType.BaseType.Name.ToUpper() == "ENUM")
|
else if (p.PropertyType.BaseType == typeof(Enum))
|
||||||
p.SetValue(this, System.Convert.ToInt32(row[index]), null);
|
p.SetValue(this, System.Convert.ToInt32(row[index]), null);
|
||||||
else
|
else
|
||||||
p.SetValue(this, ByteArrayToObject((byte[])row[index]), null);
|
p.SetValue(this, ByteArrayToObject((byte[])row[index]), null);
|
||||||
|
@ -154,13 +154,13 @@ namespace System.Data.SQLite
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
index = i;
|
index = i;
|
||||||
// Console.WriteLine("[" + T.Name + ".FillFromRow] DataColumn not found: " + p.Name);
|
// Console.WriteLine("[" + T.Name + ".FillFromRow] DataColumn not found: " + p.Name);
|
||||||
if (p.PropertyType.Name.ToUpper() == "STRING")
|
if (p.PropertyType == typeof(string))
|
||||||
p.SetValue(this, (record[index].GetType().Name != "DBNull") ? record[index] : null, null);
|
p.SetValue(this, (record[index].GetType() != typeof (DBNull)) ? record[index] : null, null);
|
||||||
else if ((p.PropertyType.Name.ToUpper() == "FLOAT") || (p.PropertyType.Name.ToUpper() == "DOUBLE"))
|
else if ((p.PropertyType == typeof(float)) || (p.PropertyType == typeof(double)))
|
||||||
p.SetValue(this, (record[index].GetType().Name != "DBNull") ? record[index] : null, null);
|
p.SetValue(this, (record[index].GetType() != typeof(DBNull)) ? record[index] : null, null);
|
||||||
else if (p.PropertyType.Name.ToUpper() == "INT32")
|
else if (p.PropertyType == typeof(int))
|
||||||
p.SetValue(this, (record[index].GetType().Name != "DBNull") ? record[index] : null, null);
|
p.SetValue(this, (record[index].GetType() != typeof(DBNull)) ? record[index] : null, null);
|
||||||
else if (p.PropertyType.Name.ToUpper() == "DATETIME")
|
else if (p.PropertyType == typeof(DateTime))
|
||||||
{
|
{
|
||||||
|
|
||||||
if ((record[index].GetType() == typeof(int)) || (record[index].GetType() == typeof(long)))
|
if ((record[index].GetType() == typeof(int)) || (record[index].GetType() == typeof(long)))
|
||||||
|
@ -170,7 +170,7 @@ namespace System.Data.SQLite
|
||||||
else
|
else
|
||||||
p.SetValue(this, record[index], null);
|
p.SetValue(this, record[index], null);
|
||||||
}
|
}
|
||||||
else if (p.PropertyType.BaseType.Name.ToUpper() == "ENUM")
|
else if (p.PropertyType.BaseType == typeof(Enum))
|
||||||
p.SetValue(this, System.Convert.ToInt32(record[index]), null);
|
p.SetValue(this, System.Convert.ToInt32(record[index]), null);
|
||||||
else
|
else
|
||||||
p.SetValue(this, ByteArrayToObject((byte[])record[index]), null);
|
p.SetValue(this, ByteArrayToObject((byte[])record[index]), null);
|
||||||
|
|
|
@ -516,6 +516,18 @@ namespace ScoutBase.Elevation
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Color GetElevationColor(double elv)
|
||||||
|
{
|
||||||
|
DEMColorPalette palette = new DEMColorPalette();
|
||||||
|
double e = (double)(elv) / 100.0;
|
||||||
|
if (e < 0)
|
||||||
|
e = 0;
|
||||||
|
if (e > 100)
|
||||||
|
e = 100;
|
||||||
|
return palette.GetColor(e);
|
||||||
|
}
|
||||||
|
|
||||||
public Bitmap DrawElevationBitmap(double minlat, double minlon, double maxlat, double maxlon, int width, int height, ELEVATIONMODEL model)
|
public Bitmap DrawElevationBitmap(double minlat, double minlon, double maxlat, double maxlon, int width, int height, ELEVATIONMODEL model)
|
||||||
{
|
{
|
||||||
int minelv = 0;
|
int minelv = 0;
|
||||||
|
@ -2055,7 +2067,7 @@ namespace ScoutBase.Elevation
|
||||||
for (int j = 0; j < bm.Height; j++)
|
for (int j = 0; j < bm.Height; j++)
|
||||||
bm.SetPixel(i, j, c);
|
bm.SetPixel(i, j, c);
|
||||||
}
|
}
|
||||||
bm.Save("DEMPalette.bmp");
|
// bm.Save("DEMPalette.bmp");
|
||||||
}
|
}
|
||||||
|
|
||||||
public Color GetColor(double percentage)
|
public Color GetColor(double percentage)
|
||||||
|
|
|
@ -162,8 +162,8 @@ namespace ScoutBase.Elevation
|
||||||
/// <returns>The elevation. ElvMissingFlag if not found.</returns>
|
/// <returns>The elevation. ElvMissingFlag if not found.</returns>
|
||||||
public short GetElevation (double lat, double lon)
|
public short GetElevation (double lat, double lon)
|
||||||
{
|
{
|
||||||
int i = (int)((lat - BaseLat) / StepWidthLat);
|
int i = (int)(((lat - BaseLat) / StepWidthLat));
|
||||||
int j = (int)((lon - BaseLon) / StepWidthLon);
|
int j = (int)(((lon - BaseLon) / StepWidthLon));
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return Elv[j,i];
|
return Elv[j,i];
|
||||||
|
|
|
@ -536,6 +536,7 @@ namespace ScoutBase.Propagation
|
||||||
return null;
|
return null;
|
||||||
// using (StreamWriter sw = new StreamWriter(File.OpenWrite("propagation.csv")))
|
// using (StreamWriter sw = new StreamWriter(File.OpenWrite("propagation.csv")))
|
||||||
{
|
{
|
||||||
|
|
||||||
// sw.WriteLine("i;dist1;dist2;f1c1;f1c2;elv;eps1;eps1_min;eps2;eps2_min");
|
// sw.WriteLine("i;dist1;dist2;f1c1;f1c2;elv;eps1;eps1_min;eps2;eps2_min");
|
||||||
for (int i = 0; i < ep.Count; i++)
|
for (int i = 0; i < ep.Count; i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -211,8 +211,10 @@ namespace ScoutBase.Stations
|
||||||
|
|
||||||
public List<LocationDesignator> LocationFindAll(string call)
|
public List<LocationDesignator> LocationFindAll(string call)
|
||||||
{
|
{
|
||||||
LocationDesignator ld = new LocationDesignator(call);
|
|
||||||
List<LocationDesignator> l = new List<LocationDesignator>();
|
List<LocationDesignator> l = new List<LocationDesignator>();
|
||||||
|
if (String.IsNullOrEmpty(call))
|
||||||
|
return l;
|
||||||
|
LocationDesignator ld = new LocationDesignator(call);
|
||||||
lock (db.DBCommand)
|
lock (db.DBCommand)
|
||||||
{
|
{
|
||||||
// Loc is empty --> search for last recent location for this call
|
// Loc is empty --> search for last recent location for this call
|
||||||
|
@ -235,6 +237,8 @@ namespace ScoutBase.Stations
|
||||||
public LocationDesignator LocationFindLastRecent(string call)
|
public LocationDesignator LocationFindLastRecent(string call)
|
||||||
{
|
{
|
||||||
LocationDesignator ld = new LocationDesignator(call);
|
LocationDesignator ld = new LocationDesignator(call);
|
||||||
|
if (String.IsNullOrEmpty(call))
|
||||||
|
return null;
|
||||||
lock (db.DBCommand)
|
lock (db.DBCommand)
|
||||||
{
|
{
|
||||||
// Loc is empty --> search for last recent location for this call
|
// Loc is empty --> search for last recent location for this call
|
||||||
|
@ -251,6 +255,8 @@ namespace ScoutBase.Stations
|
||||||
public LocationDesignator LocationFindMostHit(string call)
|
public LocationDesignator LocationFindMostHit(string call)
|
||||||
{
|
{
|
||||||
LocationDesignator ld = new LocationDesignator(call);
|
LocationDesignator ld = new LocationDesignator(call);
|
||||||
|
if (String.IsNullOrEmpty(call))
|
||||||
|
return null;
|
||||||
lock (db.DBCommand)
|
lock (db.DBCommand)
|
||||||
{
|
{
|
||||||
// Loc is empty --> search for last recent location for this call
|
// Loc is empty --> search for last recent location for this call
|
||||||
|
@ -266,11 +272,15 @@ namespace ScoutBase.Stations
|
||||||
|
|
||||||
public LocationDesignator LocationFind(string call)
|
public LocationDesignator LocationFind(string call)
|
||||||
{
|
{
|
||||||
|
if (String.IsNullOrEmpty(call))
|
||||||
|
return null;
|
||||||
return LocationFindLastRecent(call);
|
return LocationFindLastRecent(call);
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocationDesignator LocationFind(string call, string loc)
|
public LocationDesignator LocationFind(string call, string loc)
|
||||||
{
|
{
|
||||||
|
if (String.IsNullOrEmpty(call) || String.IsNullOrEmpty(loc))
|
||||||
|
return null;
|
||||||
LocationDesignator ld = new LocationDesignator(call, loc);
|
LocationDesignator ld = new LocationDesignator(call, loc);
|
||||||
return LocationFind(ld);
|
return LocationFind(ld);
|
||||||
}
|
}
|
||||||
|
@ -300,6 +310,8 @@ namespace ScoutBase.Stations
|
||||||
|
|
||||||
public LocationDesignator LocationFindOrUpdateOrCreate(string call, double lat, double lon)
|
public LocationDesignator LocationFindOrUpdateOrCreate(string call, double lat, double lon)
|
||||||
{
|
{
|
||||||
|
if (String.IsNullOrEmpty(call))
|
||||||
|
return null;
|
||||||
LocationDesignator ld = new LocationDesignator(call, MaidenheadLocator.LocFromLatLon(lat, lon, false, 3));
|
LocationDesignator ld = new LocationDesignator(call, MaidenheadLocator.LocFromLatLon(lat, lon, false, 3));
|
||||||
// try to find entry with call & loc matching
|
// try to find entry with call & loc matching
|
||||||
ld = LocationFind(ld);
|
ld = LocationFind(ld);
|
||||||
|
@ -326,6 +338,8 @@ namespace ScoutBase.Stations
|
||||||
|
|
||||||
public LocationDesignator LocationFindOrCreate(string call, string loc)
|
public LocationDesignator LocationFindOrCreate(string call, string loc)
|
||||||
{
|
{
|
||||||
|
if (String.IsNullOrEmpty(call) || String.IsNullOrEmpty(loc))
|
||||||
|
return null;
|
||||||
LocationDesignator ld = this.LocationFind(call, loc);
|
LocationDesignator ld = this.LocationFind(call, loc);
|
||||||
if (ld == null)
|
if (ld == null)
|
||||||
{
|
{
|
||||||
|
|
Ładowanie…
Reference in New Issue