Rev 2376 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2376 | Rev 2379 | ||
---|---|---|---|
Line 627... | Line 627... | ||
627 | { |
627 | { |
628 | _writeIni(); |
628 | _writeIni(); |
629 | if(_bGPXLog && dtGPX.Rows.Count > 0) |
629 | if(_bGPXLog && dtGPX.Rows.Count > 0) |
630 | _saveGPXLog(); |
630 | _saveGPXLog(); |
631 | } |
631 | } |
- | 632 | private void Window_Closed(object sender, EventArgs e) |
|
- | 633 | { |
|
- | 634 | Application.Current.Shutdown(); |
|
- | 635 | } |
|
- | 636 | ||
632 | #endregion events |
637 | #endregion events |
Line 633... | Line 638... | ||
633 | 638 | ||
Line 634... | Line 639... | ||
634 | #region GMap |
639 | #region GMap |
Line 2328... | Line 2333... | ||
2328 | //HoldTime |
2333 | //HoldTime |
2329 | bData[16] = Convert.ToByte(dr[10]); |
2334 | bData[16] = Convert.ToByte(dr[10]); |
2330 | //Event_Flag |
2335 | //Event_Flag |
2331 | bData[17] = Convert.ToByte(dr[13]); |
2336 | bData[17] = Convert.ToByte(dr[13]); |
2332 | //Index |
2337 | //Index |
2333 | bData[18] = index > 0 ? (byte)index : Convert.ToByte((int)dr[0]); |
2338 | bData[18] = index > -1 ? (byte)index : Convert.ToByte((int)dr[0]); |
2334 | //Type |
2339 | //Type |
2335 | bData[19] = Convert.ToByte(dr[1]); |
2340 | bData[19] = Convert.ToByte(dr[1]); |
2336 | //WP_EventChannelValue |
2341 | //WP_EventChannelValue |
2337 | bData[20] = Convert.ToByte(dr[14]); |
2342 | bData[20] = Convert.ToByte(dr[14]); |
2338 | //AltitudeRate |
2343 | //AltitudeRate |
Line 2715... | Line 2720... | ||
2715 | if(sVal != "") comboBoxPOIColor.SelectedIndex = Convert.ToInt32(sVal); |
2720 | if(sVal != "") comboBoxPOIColor.SelectedIndex = Convert.ToInt32(sVal); |
2716 | sVal = ini.IniReadValue("waypoints", "fscolor"); |
2721 | sVal = ini.IniReadValue("waypoints", "fscolor"); |
2717 | if(sVal != "") comboBoxFSColor.SelectedIndex = Convert.ToInt32(sVal); |
2722 | if(sVal != "") comboBoxFSColor.SelectedIndex = Convert.ToInt32(sVal); |
2718 | sVal = ini.IniReadValue("waypoints", "coptercolor"); |
2723 | sVal = ini.IniReadValue("waypoints", "coptercolor"); |
2719 | if(sVal != "") comboBoxCopterColor.SelectedIndex = Convert.ToInt32(sVal); |
2724 | if(sVal != "") comboBoxCopterColor.SelectedIndex = Convert.ToInt32(sVal); |
- | 2725 | sVal = ini.IniReadValue("waypoints", "landingcolor"); |
|
- | 2726 | if(sVal != "") comboBoxLandingColor.SelectedIndex = Convert.ToInt32(sVal); |
|
2720 | sVal = ini.IniReadValue("waypoints", "routecolor"); |
2727 | sVal = ini.IniReadValue("waypoints", "routecolor"); |
2721 | if(sVal != "") comboBoxRouteColor.SelectedIndex = Convert.ToInt32(sVal); |
2728 | if(sVal != "") comboBoxRouteColor.SelectedIndex = Convert.ToInt32(sVal); |
2722 | sVal = ini.IniReadValue("waypoints", "showWPRoute"); |
2729 | sVal = ini.IniReadValue("waypoints", "showWPRoute"); |
2723 | if(sVal != "") _bShowWPRoute = Convert.ToBoolean(sVal); |
2730 | if(sVal != "") _bShowWPRoute = Convert.ToBoolean(sVal); |
Line 2820... | Line 2827... | ||
2820 | 2827 | ||
2821 | ini.IniWriteValue("waypoints", "wpcolor", comboBoxWPColor.SelectedIndex.ToString()); |
2828 | ini.IniWriteValue("waypoints", "wpcolor", comboBoxWPColor.SelectedIndex.ToString()); |
2822 | ini.IniWriteValue("waypoints", "poicolor", comboBoxPOIColor.SelectedIndex.ToString()); |
2829 | ini.IniWriteValue("waypoints", "poicolor", comboBoxPOIColor.SelectedIndex.ToString()); |
2823 | ini.IniWriteValue("waypoints", "fscolor", comboBoxFSColor.SelectedIndex.ToString()); |
2830 | ini.IniWriteValue("waypoints", "fscolor", comboBoxFSColor.SelectedIndex.ToString()); |
- | 2831 | ini.IniWriteValue("waypoints", "coptercolor", comboBoxCopterColor.SelectedIndex.ToString()); |
|
2824 | ini.IniWriteValue("waypoints", "coptercolor", comboBoxCopterColor.SelectedIndex.ToString()); |
2832 | ini.IniWriteValue("waypoints", "landingcolor", comboBoxLandingColor.SelectedIndex.ToString()); |
2825 | ini.IniWriteValue("waypoints", "routecolor", comboBoxRouteColor.SelectedIndex.ToString()); |
2833 | ini.IniWriteValue("waypoints", "routecolor", comboBoxRouteColor.SelectedIndex.ToString()); |
Line 2826... | Line 2834... | ||
2826 | ini.IniWriteValue("waypoints", "showWPRoute", _bShowWPRoute.ToString()); |
2834 | ini.IniWriteValue("waypoints", "showWPRoute", _bShowWPRoute.ToString()); |
2827 | 2835 | ||
Line 3468... | Line 3476... | ||
3468 | } |
3476 | } |
3469 | } |
3477 | } |
3470 | } |
3478 | } |
3471 | }); |
3479 | }); |
3472 | } |
3480 | } |
3473 | private void comboBoxWPColor_DropDownClosed(object sender, EventArgs e) |
3481 | private void comboBoxWPColor_DropDownClosed(object sender, EventArgs e) |
3474 | { |
3482 | { |
3475 | _MarkerColorSelection(sender, 0); |
3483 | _MarkerColorSelection(sender, 0); |
3476 | } |
3484 | } |
3477 | private void comboBoxPOIColor_DropDownClosed(object sender, EventArgs e) |
3485 | private void comboBoxPOIColor_DropDownClosed(object sender, EventArgs e) |
3478 | { |
3486 | { |
Line 3588... | Line 3596... | ||
3588 | _Simulate = !_Simulate; |
3596 | _Simulate = !_Simulate; |
3589 | if (dtWaypoints.Rows.Count > 0) |
3597 | if (dtWaypoints.Rows.Count > 0) |
3590 | { |
3598 | { |
3591 | DataRow dr = dtWaypoints.Rows[0]; |
3599 | DataRow dr = dtWaypoints.Rows[0]; |
3592 | dr[13] = _Simulate ? 3 : 0; |
3600 | dr[13] = _Simulate ? 3 : 0; |
3593 | _sendWayPoint(dr, 1, 's', true); |
3601 | _sendWayPoint(dr, 0, 's', true); |
3594 | rectSimulate.Visibility = _Simulate ? Visibility.Visible : Visibility.Hidden; |
3602 | rectSimulate.Visibility = _Simulate ? Visibility.Visible : Visibility.Hidden; |
3595 | } |
3603 | } |
3596 | } |
3604 | } |
3597 | private void dgvWP_MouseUp(object sender, MouseButtonEventArgs e) |
3605 | private void dgvWP_MouseUp(object sender, MouseButtonEventArgs e) |
3598 | { |
3606 | { |
Line 4091... | Line 4099... | ||
4091 | myXmlTextWriter.Close(); |
4099 | myXmlTextWriter.Close(); |
4092 | } |
4100 | } |
4093 | } |
4101 | } |
4094 | } |
4102 | } |
Line 4095... | Line -... | ||
4095 | - | ||
4096 | 4103 | ||
4097 | private void btnLoadGPXLog_Click(object sender, RoutedEventArgs e) |
4104 | private void btnLoadGPXLog_Click(object sender, RoutedEventArgs e) |
4098 | { |
4105 | { |
4099 | _loadGPXLog(); |
4106 | _loadGPXLog(); |
4100 | } |
4107 | } |