Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 2407 → Rev 2408

/MKLiveView/v1.0/Source/MainWindow.xaml.cs
769,6 → 769,14
MainMap.Markers.Remove(cWPBound.Tag as GMapMarker);
 
createCircle(home.Position, dWPMaxRange);
Dispatcher.Invoke(() =>
{
if (comboBoxWPMaxRangeColor.SelectionBoxItem != null)
{
string s = comboBoxWPMaxRangeColor.SelectionBoxItem.ToString();
cWPBound.setColor(s);
}
});
}
 
}
2028,6 → 2036,14
MainMap.Markers.Remove(cWPBound.Tag as GMapMarker);
 
createCircle(home.Position, dWPMaxRange);
Dispatcher.Invoke(() =>
{
if (comboBoxWPMaxRangeColor.SelectionBoxItem != null)
{
string s = comboBoxWPMaxRangeColor.SelectionBoxItem.ToString();
cWPBound.setColor(s);
}
});
}
Dispatcher.Invoke((Action)(() => tbWPMaxRange.Text = data[70].ToString() + " m"));
}
2928,6 → 2944,10
if(sVal != "") comboBoxRouteColor.SelectedIndex = Convert.ToInt32(sVal);
sVal = ini.IniReadValue("waypoints", "showWPRoute");
if(sVal != "") _bShowWPRoute = Convert.ToBoolean(sVal);
sVal = ini.IniReadValue("waypoints", "showWPMaxRange");
if(sVal != "") checkBoxShowWPMaxRange.IsChecked = Convert.ToBoolean(sVal);
sVal = ini.IniReadValue("waypoints", "WPMaxRangecolor");
if(sVal != "") comboBoxWPMaxRangeColor.SelectedIndex = Convert.ToInt32(sVal);
 
for (int i = 0; i < 12; i++)
{
3033,6 → 3053,8
ini.IniWriteValue("waypoints", "landingcolor", comboBoxLandingColor.SelectedIndex.ToString());
ini.IniWriteValue("waypoints", "routecolor", comboBoxRouteColor.SelectedIndex.ToString());
ini.IniWriteValue("waypoints", "showWPRoute", _bShowWPRoute.ToString());
ini.IniWriteValue("waypoints", "showWPMaxRange", ((bool)checkBoxShowWPMaxRange.IsChecked).ToString());
ini.IniWriteValue("waypoints", "WPMaxRangecolor", comboBoxWPMaxRangeColor.SelectedIndex.ToString());
 
for (int i = 0; i < 12; i++)
{
3736,6 → 3758,26
}
});
}
private void comboBoxWPMaxRangeColor_DropDownClosed(object sender, EventArgs e)
{
Dispatcher.Invoke(() =>
{
if (comboBoxWPMaxRangeColor.SelectionBoxItem != null)
{
if (home != null && checkBoxShowWPMaxRange.IsChecked == true && dWPMaxRange > 0)
{
if (cWPBound != null && cWPBound.Tag != null)
MainMap.Markers.Remove(cWPBound.Tag as GMapMarker);
 
createCircle(home.Position, dWPMaxRange);
string s = comboBoxWPMaxRangeColor.SelectionBoxItem.ToString();
cWPBound.setColor(s);
 
}
}
});
 
}
private void checkBoxShowWPRoute_Click(object sender, RoutedEventArgs e)
{
_bShowWPRoute = (bool)checkBoxShowWPRoute.IsChecked;
4317,8 → 4359,12
if (cWPBound != null && cWPBound.Tag != null)
MainMap.Markers.Remove(cWPBound.Tag as GMapMarker);
 
createCircle(home.Position, dWPMaxRange);
createCircle(home.Position, dWPMaxRange);
string s = comboBoxWPMaxRangeColor.SelectionBoxItem.ToString();
cWPBound.setColor(s);
 
}
 
if (checkBoxShowWPMaxRange.IsChecked == false && (cWPBound != null && cWPBound.Tag != null))
MainMap.Markers.Remove(cWPBound.Tag as GMapMarker);
}
4391,8 → 4437,6
}
}
}
 
 
private void btnLoadGPXLog_Click(object sender, RoutedEventArgs e)
{
_loadGPXLog();