Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 2407 → Rev 2408

/MKLiveView/v1.0/Source/MainWindow.xaml
594,7 → 594,7
</Label.Style>
</Label>
</Grid>
<Grid x:Name="GridData" Background="#7F000000" HorizontalAlignment="Left" Width="204" Margin="23,36,0,0" >
<Grid x:Name="GridData" Background="#7F000000" HorizontalAlignment="Left" Width="204" Margin="23,36,0,0" Visibility="Collapsed" >
<TabControl x:Name="tabControl" HorizontalAlignment="Left" Height="619" VerticalAlignment="Top" Width="200" Background="{x:Null}" Margin="2,0,0,0">
<TabItem Header="Analog">
<Grid>
840,7 → 840,7
</TabItem>
</TabControl>
</Grid>
<Grid x:Name="GridSettings" Background="#7B000000" HorizontalAlignment="Left" Width="233" Margin="23,36,0,0" Visibility="Collapsed">
<Grid x:Name="GridSettings" Background="#7B000000" HorizontalAlignment="Left" Width="233" Margin="23,36,0,0">
<TabControl x:Name="tabControlSettings" HorizontalAlignment="Left" Width="229" Background="{x:Null}" Margin="4,0,0,0">
<TabItem Header="General" Margin="0,0,5.849,0">
<Grid x:Name="TabGridGeneral">
1143,6 → 1143,14
<ComboBoxItem Content="pink"/>
</ComboBox>
<Label x:Name="label4_Copy33" Content="Heading color" HorizontalAlignment="Right" Margin="0,3,12,0" VerticalAlignment="Top" Width="96" Foreground="White"/>
<ComboBox x:Name="comboBoxWPMaxRangeColor" Height="33" VerticalAlignment="Top" SelectedIndex="4" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontSize="16" HorizontalAlignment="Right" Width="95" Margin="0,221,11,0" DropDownClosed="comboBoxWPMaxRangeColor_DropDownClosed">
<ComboBoxItem Content="red"/>
<ComboBoxItem Content="green"/>
<ComboBoxItem Content="blue"/>
<ComboBoxItem Content="yellow"/>
<ComboBoxItem Content="pink"/>
</ComboBox>
<Label x:Name="label4_Copy39" Content="max range color" HorizontalAlignment="Right" Margin="0,195,10,0" VerticalAlignment="Top" Width="97" Foreground="White"/>
 
</Grid>
</Border>
/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();