Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 2420 → Rev 2421

/MKLiveView/v1.0/Source/MainWindow.xaml
1339,27 → 1339,27
<Label x:Name="label4_Copy13" Content="save file" HorizontalAlignment="Left" Margin="290,0,0,35" VerticalAlignment="Bottom" Width="71" Foreground="White"/>
</Grid>
</Border>
<Border Margin="6,338,0,73" BorderBrush="White" BorderThickness="0.5" CornerRadius="5" HorizontalAlignment="Left" Width="822">
<Border Margin="6,338,0,73" BorderBrush="White" BorderThickness="0.5" CornerRadius="5" HorizontalAlignment="Left" Width="840">
<Grid Margin="-0.5,-0.5,-0.5,4.5">
<ComboBox x:Name="cbWPEditType" HorizontalAlignment="Left" Height="22" Margin="6,24,0,0" VerticalAlignment="Top" Width="66">
<ComboBox x:Name="cbWPEditType" HorizontalAlignment="Left" Height="22" Margin="27,24,0,0" VerticalAlignment="Top" Width="66">
<ComboBoxItem Content="WP"/>
<ComboBoxItem Content="POI"/>
<ComboBoxItem Content="Failsafe"/>
<ComboBoxItem Content="Landing"/>
</ComboBox>
<Label x:Name="label4a" Content="Type" HorizontalAlignment="Left" Margin="7,6,0,0" Width="39" Foreground="White" Padding="0" Height="18" VerticalAlignment="Top"/>
<Label x:Name="label4b" Content="Prefix" HorizontalAlignment="Left" Margin="77,6,0,0" Width="35" Foreground="White" Padding="0" Height="18" VerticalAlignment="Top"/>
<TextBox x:Name="tbWPEditPrefix" HorizontalAlignment="Left" Height="22" Margin="77,24,0,0" VerticalAlignment="Top" Width="29" IsUndoEnabled="False" MaxLines="1" MaxLength="1" Foreground="White" Background="{x:Null}" VerticalContentAlignment="Center" IsTabStop="False"/>
<Label x:Name="label4_Copy16" Content="Latitude" HorizontalAlignment="Left" Margin="111,6,0,0" Width="54" Foreground="White" Padding="0" Height="18" VerticalAlignment="Top"/>
<TextBox x:Name="tbWPEditLat" HorizontalAlignment="Left" Height="22" Margin="111,24,0,0" VerticalAlignment="Top" Width="76" IsUndoEnabled="False" MaxLines="1" MaxLength="10" Foreground="White" Background="{x:Null}" VerticalContentAlignment="Center" TouchDown="tbWPEdit_TouchDown" KeyDown="tbWPEdit_KeyDown" PreviewMouseLeftButtonDown="tbWPEdit_MouseDown" IsTabStop="False" IsReadOnly="True" />
<Label x:Name="label4_Copy17" Content="Longitude" HorizontalAlignment="Left" Margin="192,6,0,0" Width="54" Foreground="White" Padding="0" Height="18" VerticalAlignment="Top"/>
<TextBox x:Name="tbWPEditLon" HorizontalAlignment="Left" Height="22" Margin="192,24,0,0" VerticalAlignment="Top" Width="76" IsUndoEnabled="False" MaxLines="1" MaxLength="10" Foreground="White" Background="{x:Null}" VerticalContentAlignment="Center" TouchDown="tbWPEdit_TouchDown" KeyDown="tbWPEdit_KeyDown" PreviewMouseLeftButtonDown="tbWPEdit_MouseDown" IsTabStop="False" IsReadOnly="True"/>
<Label x:Name="label4_Copy18" Content="Altitude" HorizontalAlignment="Left" Margin="273,6,0,0" Width="54" Foreground="White" Padding="0" Height="18" VerticalAlignment="Top"/>
<TextBox x:Name="tbWPEditAlt" HorizontalAlignment="Left" Height="22" Margin="273,24,0,0" VerticalAlignment="Top" Width="42" IsUndoEnabled="False" MaxLines="1" MaxLength="7" Foreground="White" Background="{x:Null}" VerticalContentAlignment="Center" TouchDown="tbWPEdit_TouchDown" KeyDown="tbWPEdit_KeyDown" PreviewMouseLeftButtonDown="tbWPEdit_MouseDown" IsTabStop="False" IsReadOnly="True"/>
<Label x:Name="label4_Copy19" Content="Heading" HorizontalAlignment="Left" Margin="320,6,0,0" Width="54" Foreground="White" Padding="0" Height="18" VerticalAlignment="Top"/>
<TextBox x:Name="tbWPEditHeading" HorizontalAlignment="Left" Height="22" Margin="320,24,0,0" VerticalAlignment="Top" Width="69" IsUndoEnabled="False" MaxLines="1" MaxLength="7" Foreground="White" Background="{x:Null}" VerticalContentAlignment="Center" TouchDown="tbWPEdit_TouchDown" KeyDown="tbWPEdit_KeyDown" PreviewMouseLeftButtonDown="tbWPEdit_MouseDown" IsTabStop="False" IsReadOnly="True"/>
<Label x:Name="label4_Copy20" Content="Speed" HorizontalAlignment="Left" Margin="394,6,0,0" Width="54" Foreground="White" Padding="0" Height="18" VerticalAlignment="Top"/>
<TextBox x:Name="tbWPEditSpeed" HorizontalAlignment="Left" Height="22" Margin="394,24,0,0" VerticalAlignment="Top" Width="65" IsUndoEnabled="False" MaxLines="1" MaxLength="6" Foreground="White" Background="{x:Null}" VerticalContentAlignment="Center" TouchDown="tbWPEdit_TouchDown" KeyDown="tbWPEdit_KeyDown" PreviewMouseLeftButtonDown="tbWPEdit_MouseDown" IsTabStop="False" IsReadOnly="True"/>
<Label x:Name="label4a" Content="Type" HorizontalAlignment="Left" Margin="28,6,0,0" Width="39" Foreground="White" Padding="0" Height="18" VerticalAlignment="Top"/>
<Label x:Name="label4b" Content="Prefix" HorizontalAlignment="Left" Margin="98,6,0,0" Width="35" Foreground="White" Padding="0" Height="18" VerticalAlignment="Top"/>
<TextBox x:Name="tbWPEditPrefix" HorizontalAlignment="Left" Height="22" Margin="98,24,0,0" VerticalAlignment="Top" Width="29" IsUndoEnabled="False" MaxLines="1" MaxLength="1" Foreground="White" Background="{x:Null}" VerticalContentAlignment="Center" IsTabStop="False"/>
<Label x:Name="label4_Copy16" Content="Latitude" HorizontalAlignment="Left" Margin="132,6,0,0" Width="54" Foreground="White" Padding="0" Height="18" VerticalAlignment="Top"/>
<TextBox x:Name="tbWPEditLat" HorizontalAlignment="Left" Height="22" Margin="132,24,0,0" VerticalAlignment="Top" Width="76" IsUndoEnabled="False" MaxLines="1" MaxLength="10" Foreground="White" Background="{x:Null}" VerticalContentAlignment="Center" TouchDown="tbWPEdit_TouchDown" KeyDown="tbWPEdit_KeyDown" PreviewMouseLeftButtonDown="tbWPEdit_MouseDown" IsTabStop="False" IsReadOnly="True" />
<Label x:Name="label4_Copy17" Content="Longitude" HorizontalAlignment="Left" Margin="213,6,0,0" Width="54" Foreground="White" Padding="0" Height="18" VerticalAlignment="Top"/>
<TextBox x:Name="tbWPEditLon" HorizontalAlignment="Left" Height="22" Margin="213,24,0,0" VerticalAlignment="Top" Width="76" IsUndoEnabled="False" MaxLines="1" MaxLength="10" Foreground="White" Background="{x:Null}" VerticalContentAlignment="Center" TouchDown="tbWPEdit_TouchDown" KeyDown="tbWPEdit_KeyDown" PreviewMouseLeftButtonDown="tbWPEdit_MouseDown" IsTabStop="False" IsReadOnly="True"/>
<Label x:Name="label4_Copy18" Content="Altitude" HorizontalAlignment="Left" Margin="294,6,0,0" Width="54" Foreground="White" Padding="0" Height="18" VerticalAlignment="Top"/>
<TextBox x:Name="tbWPEditAlt" HorizontalAlignment="Left" Height="22" Margin="294,24,0,0" VerticalAlignment="Top" Width="42" IsUndoEnabled="False" MaxLines="1" MaxLength="7" Foreground="White" Background="{x:Null}" VerticalContentAlignment="Center" TouchDown="tbWPEdit_TouchDown" KeyDown="tbWPEdit_KeyDown" PreviewMouseLeftButtonDown="tbWPEdit_MouseDown" IsTabStop="False" IsReadOnly="True"/>
<Label x:Name="label4_Copy19" Content="Heading" HorizontalAlignment="Left" Margin="341,6,0,0" Width="54" Foreground="White" Padding="0" Height="18" VerticalAlignment="Top"/>
<TextBox x:Name="tbWPEditHeading" HorizontalAlignment="Left" Height="22" Margin="341,24,0,0" VerticalAlignment="Top" Width="69" IsUndoEnabled="False" MaxLines="1" MaxLength="7" Foreground="White" Background="{x:Null}" VerticalContentAlignment="Center" TouchDown="tbWPEdit_TouchDown" KeyDown="tbWPEdit_KeyDown" PreviewMouseLeftButtonDown="tbWPEdit_MouseDown" IsTabStop="False" IsReadOnly="True"/>
<Label x:Name="label4_Copy20" Content="Speed" HorizontalAlignment="Left" Margin="415,6,0,0" Width="54" Foreground="White" Padding="0" Height="18" VerticalAlignment="Top"/>
<TextBox x:Name="tbWPEditSpeed" HorizontalAlignment="Left" Height="22" Margin="415,24,0,0" VerticalAlignment="Top" Width="65" IsUndoEnabled="False" MaxLines="1" MaxLength="6" Foreground="White" Background="{x:Null}" VerticalContentAlignment="Center" TouchDown="tbWPEdit_TouchDown" KeyDown="tbWPEdit_KeyDown" PreviewMouseLeftButtonDown="tbWPEdit_MouseDown" IsTabStop="False" IsReadOnly="True"/>
<ComboBox x:Name="cbWPEditSpeed" HorizontalAlignment="Left" Height="22" Margin="394,51,0,0" VerticalAlignment="Top" Width="65">
<ComboBoxItem Content="MAX"/>
<ComboBoxItem Content="m/s"/>
1377,27 → 1377,27
<ComboBoxItem Content="WP/POI"/>
<ComboBoxItem Content="degree"/>
</ComboBox>
<Label x:Name="label4_Copy21" Content="Climbrate" HorizontalAlignment="Left" Margin="464,6,0,0" Width="54" Foreground="White" Padding="0" Height="18" VerticalAlignment="Top"/>
<TextBox x:Name="tbWPEditClimbrate" HorizontalAlignment="Left" Height="22" Margin="464,24,0,0" VerticalAlignment="Top" Width="61" IsUndoEnabled="False" MaxLines="1" MaxLength="4" Foreground="White" Background="{x:Null}" VerticalContentAlignment="Center" TouchDown="tbWPEdit_TouchDown" KeyDown="tbWPEdit_KeyDown" PreviewMouseLeftButtonDown="tbWPEdit_MouseDown" IsTabStop="False" IsReadOnly="True"/>
<Label x:Name="label4_Copy21" Content="Climbrate" HorizontalAlignment="Left" Margin="485,6,0,0" Width="54" Foreground="White" Padding="0" Height="18" VerticalAlignment="Top"/>
<TextBox x:Name="tbWPEditClimbrate" HorizontalAlignment="Left" Height="22" Margin="485,24,0,0" VerticalAlignment="Top" Width="61" IsUndoEnabled="False" MaxLines="1" MaxLength="4" Foreground="White" Background="{x:Null}" VerticalContentAlignment="Center" TouchDown="tbWPEdit_TouchDown" KeyDown="tbWPEdit_KeyDown" PreviewMouseLeftButtonDown="tbWPEdit_MouseDown" IsTabStop="False" IsReadOnly="True"/>
<ComboBox x:Name="cbWPEditClimbrate" HorizontalAlignment="Left" Height="22" Margin="464,51,0,0" VerticalAlignment="Top" Width="61">
<ComboBoxItem Content="AUTO"/>
<ComboBoxItem Content="m/s"/>
</ComboBox>
<Label x:Name="label4_Copy22" Content="Radius" HorizontalAlignment="Left" Margin="530,6,0,0" Width="54" Foreground="White" Padding="0" Height="18" VerticalAlignment="Top"/>
<TextBox x:Name="tbWPEditRadius" HorizontalAlignment="Left" Height="22" Margin="530,24,0,0" VerticalAlignment="Top" Width="42" IsUndoEnabled="False" MaxLines="1" MaxLength="3" Foreground="White" Background="{x:Null}" VerticalContentAlignment="Center" TouchDown="tbWPEdit_TouchDown" KeyDown="tbWPEdit_KeyDown" PreviewMouseLeftButtonDown="tbWPEdit_MouseDown" IsTabStop="False" IsReadOnly="True"/>
<Label x:Name="label4_Copy23" Content="Holdtime" HorizontalAlignment="Left" Margin="577,6,0,0" Width="54" Foreground="White" Padding="0" Height="18" VerticalAlignment="Top"/>
<TextBox x:Name="tbWPEditHoldtime" HorizontalAlignment="Left" Height="22" Margin="577,24,0,0" VerticalAlignment="Top" Width="42" IsUndoEnabled="False" MaxLines="1" MaxLength="2" Foreground="White" Background="{x:Null}" VerticalContentAlignment="Center" TouchDown="tbWPEdit_TouchDown" KeyDown="tbWPEdit_KeyDown" PreviewMouseLeftButtonDown="tbWPEdit_MouseDown" IsTabStop="False" IsReadOnly="True"/>
<Label x:Name="label4_Copy24" Content="AutoTrig" HorizontalAlignment="Left" Margin="631,6,0,0" Width="54" Foreground="White" Padding="0" Height="18" VerticalAlignment="Top"/>
<TextBox x:Name="tbWPEditAutoTrigger" HorizontalAlignment="Left" Height="22" Margin="631,24,0,0" VerticalAlignment="Top" Width="42" IsUndoEnabled="False" MaxLines="1" MaxLength="2" Foreground="White" Background="{x:Null}" VerticalContentAlignment="Center" TouchDown="tbWPEdit_TouchDown" KeyDown="tbWPEdit_KeyDown" PreviewMouseLeftButtonDown="tbWPEdit_MouseDown" IsTabStop="False" IsReadOnly="True"/>
<Label x:Name="label4_Copy25" Content="CamAngle" HorizontalAlignment="Left" Margin="684,6,0,0" Width="54" Foreground="White" Padding="0" Height="18" VerticalAlignment="Top"/>
<TextBox x:Name="tbWPEditCamAngle" HorizontalAlignment="Left" Height="22" Margin="684,24,0,0" VerticalAlignment="Top" Width="69" IsUndoEnabled="False" MaxLines="1" MaxLength="2" Foreground="White" Background="{x:Null}" VerticalContentAlignment="Center" TouchDown="tbWPEdit_TouchDown" KeyDown="tbWPEdit_KeyDown" PreviewMouseLeftButtonDown="tbWPEdit_MouseDown" IsTabStop="False" IsReadOnly="True"/>
<Label x:Name="label4_Copy22" Content="Radius" HorizontalAlignment="Left" Margin="551,6,0,0" Width="54" Foreground="White" Padding="0" Height="18" VerticalAlignment="Top"/>
<TextBox x:Name="tbWPEditRadius" HorizontalAlignment="Left" Height="22" Margin="551,24,0,0" VerticalAlignment="Top" Width="42" IsUndoEnabled="False" MaxLines="1" MaxLength="3" Foreground="White" Background="{x:Null}" VerticalContentAlignment="Center" TouchDown="tbWPEdit_TouchDown" KeyDown="tbWPEdit_KeyDown" PreviewMouseLeftButtonDown="tbWPEdit_MouseDown" IsTabStop="False" IsReadOnly="True"/>
<Label x:Name="label4_Copy23" Content="Holdtime" HorizontalAlignment="Left" Margin="598,6,0,0" Width="54" Foreground="White" Padding="0" Height="18" VerticalAlignment="Top"/>
<TextBox x:Name="tbWPEditHoldtime" HorizontalAlignment="Left" Height="22" Margin="598,24,0,0" VerticalAlignment="Top" Width="42" IsUndoEnabled="False" MaxLines="1" MaxLength="2" Foreground="White" Background="{x:Null}" VerticalContentAlignment="Center" TouchDown="tbWPEdit_TouchDown" KeyDown="tbWPEdit_KeyDown" PreviewMouseLeftButtonDown="tbWPEdit_MouseDown" IsTabStop="False" IsReadOnly="True"/>
<Label x:Name="label4_Copy24" Content="AutoTrig" HorizontalAlignment="Left" Margin="652,6,0,0" Width="54" Foreground="White" Padding="0" Height="18" VerticalAlignment="Top"/>
<TextBox x:Name="tbWPEditAutoTrigger" HorizontalAlignment="Left" Height="22" Margin="652,24,0,0" VerticalAlignment="Top" Width="42" IsUndoEnabled="False" MaxLines="1" MaxLength="2" Foreground="White" Background="{x:Null}" VerticalContentAlignment="Center" TouchDown="tbWPEdit_TouchDown" KeyDown="tbWPEdit_KeyDown" PreviewMouseLeftButtonDown="tbWPEdit_MouseDown" IsTabStop="False" IsReadOnly="True"/>
<Label x:Name="label4_Copy25" Content="CamAngle" HorizontalAlignment="Left" Margin="705,6,0,0" Width="54" Foreground="White" Padding="0" Height="18" VerticalAlignment="Top"/>
<TextBox x:Name="tbWPEditCamAngle" HorizontalAlignment="Left" Height="22" Margin="705,24,0,0" VerticalAlignment="Top" Width="69" IsUndoEnabled="False" MaxLines="1" MaxLength="2" Foreground="White" Background="{x:Null}" VerticalContentAlignment="Center" TouchDown="tbWPEdit_TouchDown" KeyDown="tbWPEdit_KeyDown" PreviewMouseLeftButtonDown="tbWPEdit_MouseDown" IsTabStop="False" IsReadOnly="True"/>
<ComboBox x:Name="cbWPEditCamAngle" HorizontalAlignment="Left" Height="22" Margin="684,51,0,0" VerticalAlignment="Top" Width="69">
<ComboBoxItem Content=" - - - " HorizontalContentAlignment="Center"/>
<ComboBoxItem Content="AUTO"/>
<ComboBoxItem Content="degree"/>
</ComboBox>
<Label x:Name="label4_Copy26" Content="Out1Timer" HorizontalAlignment="Left" Margin="758,6,-4,0" Width="63" Foreground="White" Padding="0" Height="18" VerticalAlignment="Top"/>
<TextBox x:Name="tbWPEditOut1" HorizontalAlignment="Left" Height="22" Margin="758,24,0,0" VerticalAlignment="Top" Width="42" IsUndoEnabled="False" MaxLines="1" MaxLength="2" Foreground="White" Background="{x:Null}" VerticalContentAlignment="Center" TouchDown="tbWPEdit_TouchDown" KeyDown="tbWPEdit_KeyDown" PreviewMouseLeftButtonDown="tbWPEdit_MouseDown" IsTabStop="False" IsReadOnly="True"/>
<Label x:Name="label4_Copy26" Content="Out1Timer" HorizontalAlignment="Left" Margin="779,6,-2,0" Width="63" Foreground="White" Padding="0" Height="18" VerticalAlignment="Top"/>
<TextBox x:Name="tbWPEditOut1" HorizontalAlignment="Left" Height="22" Margin="779,24,0,0" VerticalAlignment="Top" Width="42" IsUndoEnabled="False" MaxLines="1" MaxLength="2" Foreground="White" Background="{x:Null}" VerticalContentAlignment="Center" TouchDown="tbWPEdit_TouchDown" KeyDown="tbWPEdit_KeyDown" PreviewMouseLeftButtonDown="tbWPEdit_MouseDown" IsTabStop="False" IsReadOnly="True"/>
<Rectangle HorizontalAlignment="Left" Width="81" Stroke="#FFE4E4E4" StrokeThickness="0.5" Margin="7,0,0,-2" Height="40" VerticalAlignment="Bottom">
<Rectangle.Style>
<Style TargetType="{x:Type Rectangle}">
1466,6 → 1466,53
</Button.Background>
</Button>
<Label x:Name="label4_Copy34" Content="send to copter" HorizontalAlignment="Left" Margin="190,0,0,34" VerticalAlignment="Bottom" Width="96" Foreground="White" Height="26"/>
<Rectangle HorizontalAlignment="Left" Width="44" Stroke="#FFE4E4E4" StrokeThickness="0.5" Margin="786,0,0,-2" Height="34" VerticalAlignment="Bottom" RenderTransformOrigin="0.5,0.525">
<Rectangle.Style>
<Style TargetType="{x:Type Rectangle}">
<Style.Triggers>
<DataTrigger Binding="{Binding IsMouseOver, ElementName=btnWPEditmoveUp}" Value="True">
<Setter Property="Fill" Value="{DynamicResource PressedItemBrush}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Rectangle.Style>
</Rectangle>
<ed:LineArrow Fill="Black" Height="0" Stroke="White" StrokeThickness="4" Width="25" RenderTransformOrigin="0.5,0.5" Margin="796,0,0,12" HorizontalAlignment="Left" VerticalAlignment="Bottom">
<ed:LineArrow.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="-90"/>
<TranslateTransform/>
</TransformGroup>
</ed:LineArrow.RenderTransform>
</ed:LineArrow>
<Button x:Name="btnWPEditmoveUp" HorizontalAlignment="Left" Height="34" Margin="786,0,0,-2" VerticalAlignment="Bottom" Width="44" ToolTip="move WP up in list (index -1)" BorderBrush="#FFBDBDBD" Style="{DynamicResource ButtonWithoutEffectStyle}" Click="btnWPEditmoveUp_Click" Padding="14,1" Background="#00000000">
</Button>
<Rectangle HorizontalAlignment="Left" Width="44" Stroke="#FFE4E4E4" StrokeThickness="0.5" Margin="737,0,0,-2" Height="34" VerticalAlignment="Bottom" RenderTransformOrigin="0.5,0.525">
<Rectangle.Style>
<Style TargetType="{x:Type Rectangle}">
<Style.Triggers>
<DataTrigger Binding="{Binding IsMouseOver, ElementName=btnWPEditmoveDown}" Value="True">
<Setter Property="Fill" Value="{DynamicResource PressedItemBrush}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Rectangle.Style>
</Rectangle>
<ed:LineArrow Fill="Black" Height="0" Stroke="White" StrokeThickness="4" Width="25" RenderTransformOrigin="0.5,0.5" Margin="748,93,67,17">
<ed:LineArrow.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="90"/>
<TranslateTransform/>
</TransformGroup>
</ed:LineArrow.RenderTransform>
</ed:LineArrow>
<Button x:Name="btnWPEditmoveDown" HorizontalAlignment="Left" Height="34" Margin="737,0,0,-2" VerticalAlignment="Bottom" Width="44" ToolTip="move WP down in list (index +1)" BorderBrush="#FFBDBDBD" Style="{DynamicResource ButtonWithoutEffectStyle}" Click="btnWPEditmoveDown_Click" Padding="14,1" Background="#00000000">
</Button>
<Label x:Name="lblWPEditIndex" Content="##" HorizontalAlignment="Left" Height="23" Margin="-2,22,0,0" VerticalAlignment="Top" Width="29" Foreground="White" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"/>
</Grid>
</Border>
<DataGrid x:Name="dgvWP" Margin="10,5,10,195" Background="{x:Null}" ItemsSource="{Binding}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontSize="14" HorizontalGridLinesBrush="#FF688CAF" VerticalGridLinesBrush="#FF688CAF" HeadersVisibility="Column" BorderBrush="{x:Null}" Padding="0" AutoGenerateColumns="False" MouseUp="dgvWP_MouseUp" CanUserAddRows="False" CanUserDeleteRows="False" CanUserResizeRows="False" MouseDoubleClick="dgvWP_MouseDoubleClick" CanUserReorderColumns="False" CanUserResizeColumns="False" CanUserSortColumns="False" IsReadOnly="True">
/MKLiveView/v1.0/Source/MainWindow.xaml.cs
409,6 → 409,8
checkBoxGPXLog.IsChecked = _bGPXLog;
checkBoxShowWPRoute.IsChecked = _bShowWPRoute;
 
GridSettings.Visibility = Visibility.Visible;
GridData.Visibility = GridWP.Visibility = Visibility.Collapsed;
_initSerialCtrl();
}
/// <summary>
3656,12 → 3658,12
wpList.Add(p);
((CustomMarkerWP)wpMarker.Shape).positionChanged += _updateDTWPPos;
((CustomMarkerWP)wpMarker.Shape).newPosition += _updateDTWPPosFin;
((CustomMarkerWP)wpMarker.Shape).mouseCaptured += _WPMouseCatured;
((CustomMarkerWP)wpMarker.Shape).mouseCaptured += _WPMouseCaptured;
});
return wpMarker;
}
bool _WPisMouseCaptured = false;
void _WPMouseCatured(bool isCaptured)
void _WPMouseCaptured(bool isCaptured)
{
_WPisMouseCaptured = isCaptured;
MainMap.CanDragMap = !isCaptured;
3693,7 → 3695,13
{
dtWaypoints.Rows[index][3] = p.Position.Lat;
dtWaypoints.Rows[index][4] = p.Position.Lng;
Dispatcher.Invoke(() => dgvWP.Items.Refresh());
Dispatcher.Invoke(() =>
{
dgvWP.Items.Refresh();
dgvWP.SelectedIndex = index;
_dgvWPselectEditRow();
});
 
}
 
}
4012,6 → 4020,7
{
Dispatcher.Invoke(() => {
DataGridRow row;
dgvWP.UpdateLayout();
if (_wpEdit > -1 && _wpEdit < dgvWP.ItemContainerGenerator.Items.Count)
{
row = (DataGridRow)dgvWP.ItemContainerGenerator.ContainerFromIndex(_wpEdit);
4033,6 → 4042,7
void _setWPEditFields(int index)
{
int iVal;
lblWPEditIndex.Content = dtWaypoints.Rows[index][0].ToString();
cbWPEditType.SelectedIndex = (int)dtWaypoints.Rows[index][1];
tbWPEditPrefix.Text = dtWaypoints.Rows[index][2].ToString().Substring(0,1);
tbWPEditLat.Text = dtWaypoints.Rows[index][3].ToString();
4118,7 → 4128,67
tbWPEditOut1.Text = iVal.ToString();
 
}
private void btnWPEditmoveUp_Click(object sender, RoutedEventArgs e)
{
if (dgvWP.SelectedIndex > 0 && dgvWP.SelectedIndex < dtWaypoints.Rows.Count)
{
int index = dgvWP.SelectedIndex;
DataRow dr = dtWaypoints.Rows[index];
DataRow newRow = dtWaypoints.NewRow();
newRow.ItemArray = dr.ItemArray;
dtWaypoints.Rows.Remove(dr);
dtWaypoints.Rows.InsertAt(newRow, index - 1);
dtWaypoints.Rows[index][0] = 100;
dtWaypoints.Rows[index - 1][0] = index;
GMapMarker m1 = _findWPMarker(dtWaypoints.Rows[index - 1][2].ToString());
GMapMarker m2 = _findWPMarker(dtWaypoints.Rows[index][2].ToString());
dtWaypoints.Rows[index - 1][2] = dtWaypoints.Rows[index - 1][2].ToString().Substring(0, 1) + index.ToString();
((CustomMarkerWP)m1.Shape).text.Text = dtWaypoints.Rows[index - 1][2].ToString();
dtWaypoints.Rows[index][0] = index + 1;
dtWaypoints.Rows[index][2] = dtWaypoints.Rows[index][2].ToString().Substring(0, 1) + (index+1).ToString();
((CustomMarkerWP)m2.Shape).text.Text = dtWaypoints.Rows[index][2].ToString();
dgvWP.Items.Refresh();
dgvWP.SelectedIndex = index - 1;
_dgvWPselectEditRow();
PointLatLng p = wpList[index];
wpList.RemoveAt(index);
wpList.Insert(index - 1, p);
MainMap.Markers.Remove(mRouteWP);
_routeUpdate();
}
}
 
private void btnWPEditmoveDown_Click(object sender, RoutedEventArgs e)
{
if (dgvWP.SelectedIndex > -1 && dgvWP.SelectedIndex < dtWaypoints.Rows.Count - 1)
{
int index = dgvWP.SelectedIndex;
DataRow dr = dtWaypoints.Rows[index];
DataRow newRow = dtWaypoints.NewRow();
newRow.ItemArray = dr.ItemArray;
dtWaypoints.Rows.Remove(dr);
dtWaypoints.Rows.InsertAt(newRow, index + 1);
dtWaypoints.Rows[index][0] = 100;
dtWaypoints.Rows[index + 1][0] = index + 2;
GMapMarker m1 = _findWPMarker(dtWaypoints.Rows[index + 1][2].ToString());
GMapMarker m2 = _findWPMarker(dtWaypoints.Rows[index][2].ToString());
dtWaypoints.Rows[index + 1][2] = dtWaypoints.Rows[index + 1][2].ToString().Substring(0, 1) + (index+2).ToString();
((CustomMarkerWP)m1.Shape).text.Text = dtWaypoints.Rows[index + 1][2].ToString();
dtWaypoints.Rows[index][0] = index + 1;
dtWaypoints.Rows[index][2] = dtWaypoints.Rows[index][2].ToString().Substring(0, 1) + (index+1).ToString();
((CustomMarkerWP)m2.Shape).text.Text = dtWaypoints.Rows[index][2].ToString();
dgvWP.Items.Refresh();
dgvWP.SelectedIndex = index + 1;
_dgvWPselectEditRow();
PointLatLng p = wpList[index];
wpList.RemoveAt(index);
wpList.Insert(index + 1, p);
MainMap.Markers.Remove(mRouteWP);
_routeUpdate();
}
 
}
 
private void btnEditWPSave_Click(object sender, RoutedEventArgs e)
{
if(dgvWP.SelectedIndex > -1 && dgvWP.SelectedIndex < dtWaypoints.Rows.Count)