private void HandlePlotDisplayEnabledChanged()
{
if (this.checkEnableDisplay.Checked == true || Send_Data_To_Google_Earth == true)
{
this.checkBoxFilterBySSR.Enabled = true;
this.checkEnableDisplay.BackColor = Color.Green;
if (SharedData.bool_Listen_for_Data == true)
{
this.checkEnableDisplay.Text = "Live Enabled";
// Start the timer if Sync to coast is not set
if (this.checkBoxSyncToNM.Checked == false)
{
this.PlotandTrackDisplayUpdateTimer.Enabled = true;
this.textBoxUpdateRate.Enabled = true;
this.labelDisplayUpdateRate.Enabled = true;
}
else
{
this.PlotandTrackDisplayUpdateTimer.Enabled = false;
this.labelDisplayUpdateRate.Enabled = false;
}
this.checkBoxSyncToNM.Enabled = true;
this.textBox1TrackCoast.Enabled = true;
this.comboBoxSSRFilterBox.Enabled = false;
}
else
{
this.checkEnableDisplay.Text = "Passive Enabled";
this.textBoxUpdateRate.Enabled = false;
this.checkBoxSyncToNM.Enabled = false;
this.textBox1TrackCoast.Enabled = false;
this.comboBoxSSRFilterBox.Enabled = true;
}
Update_PlotTrack_Data();
}
else
{
FirstCycleDisplayEnabled = true;
this.checkBoxFilterBySSR.Enabled = false;
this.textBoxUpdateRate.Enabled = false;
this.checkBoxSyncToNM.Enabled = false;
this.textBox1TrackCoast.Enabled = false;
this.checkEnableDisplay.BackColor = Color.Red;
this.checkEnableDisplay.Text = "Disabled";
// Clear the latest map display
if (DinamicOverlay != null)
DinamicOverlay.Markers.Clear();
}
Properties.Settings.Default.Save();
}