Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 2317 → Rev 2318

/MKLiveView/v1.0/Source/MainWindow.xaml
989,7 → 989,7
<DataGridTextColumn Header="Out1Timer" Binding="{Binding Path=Out1Timer}"/>
</DataGrid.Columns>
</DataGrid>
<ComboBox x:Name="comboBoxWPColor" HorizontalAlignment="Left" Height="40" Margin="656,426,0,0" VerticalAlignment="Top" Width="95" SelectedIndex="2" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontSize="16" DropDownClosed="comboBoxWPColor_DropDownClosed">
<ComboBox x:Name="comboBoxWPColor" Height="40" Margin="0,0,210,6" VerticalAlignment="Bottom" SelectedIndex="2" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontSize="16" DropDownClosed="comboBoxWPColor_DropDownClosed" HorizontalAlignment="Right" Width="95">
<ComboBoxItem Content="red"/>
<ComboBoxItem Content="green"/>
<ComboBoxItem Content="blue"/>
996,8 → 996,8
<ComboBoxItem Content="yellow"/>
<ComboBoxItem Content="pink"/>
</ComboBox>
<Label x:Name="label4_Copy1" Content="WP color" HorizontalAlignment="Right" Margin="0,400,223,0" VerticalAlignment="Top" Width="80" Foreground="White"/>
<ComboBox x:Name="comboBoxPOIColor" HorizontalAlignment="Left" Height="40" Margin="756,426,0,0" VerticalAlignment="Top" Width="95" SelectedIndex="4" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontSize="16" DropDownClosed="comboBoxPOIColor_DropDownClosed">
<Label x:Name="label4_Copy1" Content="WP color" HorizontalAlignment="Right" Margin="0,0,223,46" VerticalAlignment="Bottom" Width="80" Foreground="White"/>
<ComboBox x:Name="comboBoxPOIColor" Margin="0,0,110,6" SelectedIndex="4" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontSize="16" DropDownClosed="comboBoxPOIColor_DropDownClosed" HorizontalAlignment="Right" Width="95" Height="40" VerticalAlignment="Bottom">
<ComboBoxItem Content="red"/>
<ComboBoxItem Content="green"/>
<ComboBoxItem Content="blue"/>
1004,8 → 1004,8
<ComboBoxItem Content="yellow"/>
<ComboBoxItem Content="pink"/>
</ComboBox>
<Label x:Name="label4_Copy2" Content="POI color" HorizontalAlignment="Right" Margin="0,400,123,0" VerticalAlignment="Top" Width="80" Foreground="White"/>
<ComboBox x:Name="comboBoxFSColor" HorizontalAlignment="Left" Height="40" Margin="856,426,0,0" VerticalAlignment="Top" Width="95" SelectedIndex="0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontSize="16" DropDownClosed="comboBoxFSColor_DropDownClosed">
<Label x:Name="label4_Copy2" Content="POI color" HorizontalAlignment="Right" Margin="0,0,123,46" VerticalAlignment="Bottom" Width="80" Foreground="White"/>
<ComboBox x:Name="comboBoxFSColor" Height="40" Margin="0,0,10,6" VerticalAlignment="Bottom" SelectedIndex="0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontSize="16" DropDownClosed="comboBoxFSColor_DropDownClosed" HorizontalAlignment="Right" Width="95">
<ComboBoxItem Content="red"/>
<ComboBoxItem Content="green"/>
<ComboBoxItem Content="blue"/>
1012,7 → 1012,15
<ComboBoxItem Content="yellow"/>
<ComboBoxItem Content="pink"/>
</ComboBox>
<Label x:Name="label4_Copy3" Content="failsave color" HorizontalAlignment="Right" Margin="0,400,23,0" VerticalAlignment="Top" Width="80" Foreground="White"/>
<Label x:Name="label4_Copy3" Content="failsave color" HorizontalAlignment="Right" Margin="0,0,23,46" VerticalAlignment="Bottom" Width="80" Foreground="White"/>
<ComboBox x:Name="comboBoxCopterColor" Margin="0,0,315,6" SelectedIndex="4" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontSize="16" HorizontalAlignment="Right" Width="95" Height="40" VerticalAlignment="Bottom" DropDownClosed="comboBoxCopterColor_DropDownClosed">
<ComboBoxItem Content="red"/>
<ComboBoxItem Content="green"/>
<ComboBoxItem Content="blue"/>
<ComboBoxItem Content="yellow"/>
<ComboBoxItem Content="pink"/>
</ComboBox>
<Label x:Name="label4_Copy4" Content="Copter color" HorizontalAlignment="Right" Margin="0,0,328,46" VerticalAlignment="Bottom" Width="80" Foreground="White"/>
</Grid>
<Grid x:Name="GridSideBarR" Background="#66000000" Margin="0,36,0,0" HorizontalAlignment="Right" Width="23">
<Label x:Name="labelMotordata" Content="Motors" Padding="0" RenderTransformOrigin="0.5,0.5" Margin="-25,233,-26,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Stretch" MouseDown="labelMotorData_MouseDown" FontSize="14" HorizontalAlignment="Left" Width="74" Height="22" VerticalAlignment="Top">
/MKLiveView/v1.0/Source/MainWindow.xaml.cs
639,7 → 639,13
{
MainMap.Manager.Mode = AccessMode.ServerAndCache;
copter = new GMapMarker(MainMap.Position);
copter.Shape = new CustomMarkerCopter(this, copter, MainMap.Position.Lat.ToString("0.#######°") + System.Environment.NewLine + MainMap.Position.Lng.ToString("0.#######°"));
 
copter.Shape = new CustomMarkerCopter(this, copter, MainMap.Position.Lat.ToString("0.#######°") + System.Environment.NewLine + MainMap.Position.Lng.ToString("0.#######°"),"red");
if (comboBoxCopterColor.SelectionBoxItem != null)
{
string s = comboBoxCopterColor.SelectionBoxItem.ToString();
((CustomMarkerCopter)(copter.Shape)).setColor(s);
}
copter.Offset = new System.Windows.Point(-18, -18);
copter.ZIndex = int.MaxValue;
MainMap.Markers.Add(copter);
1771,19 → 1777,26
if (data[1] == 1)
{
dtWaypoints.Rows.Clear();
foreach (GMapMarker p in MainMap.Markers)
{
if (p.Shape.GetType() == typeof(CustomMarkerWP))
MainMap.Markers.Remove(p);
}
Dispatcher.Invoke(() => {
for (int k = 0; k < MainMap.Markers.Count;)
{
GMapMarker p = MainMap.Markers[k];
if (p.Shape.GetType() == typeof(CustomMarkerWP))
MainMap.Markers.Remove(p);
else
k++;
}
});
}
DataRow dr = dtWaypoints.NewRow();
dr = Waypoints.toDataRow(data, dr);
dtWaypoints.Rows.Add(dr);
GMapMarker wp = new GMapMarker(new PointLatLng((double)dr[3], (double)dr[4]));
wp.Shape = new CustomMarkerWP(this, wp, (string)dr[2],(int)dr[1]);
_setMarkerColor(wp, (int)dr[1]);
MainMap.Markers.Add(wp);
Dispatcher.Invoke(() => {
GMapMarker wp = new GMapMarker(new PointLatLng((double)dr[3], (double)dr[4]));
wp.Shape = new CustomMarkerWP(this, wp, (string)dr[2],(int)dr[1]);
_setMarkerColor(wp, (int)dr[1]);
MainMap.Markers.Add(wp);
});
Dispatcher.Invoke(() => dgvWP.Items.Refresh());
Dispatcher.Invoke(() => _iWPIndex = data[1]);
if (data[1] == data[0])
2795,6 → 2808,20
}
});
}
 
private void comboBoxCopterColor_DropDownClosed(object sender, EventArgs e)
{
Dispatcher.Invoke(() => {
if (comboBoxCopterColor.SelectionBoxItem != null)
{
string s = comboBoxCopterColor.SelectionBoxItem.ToString();
((CustomMarkerCopter)(copter.Shape)).setColor(s);
}
else
((CustomMarkerCopter)(copter.Shape)).setColor("red");
});
}
 
private void btnLoadWPLFile_Click(object sender, RoutedEventArgs e)
{
_readWPLFile();