Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 2372 → Rev 2373

/MKLiveView/v1.0/Source/GMapCustomMarkers/CustomMarkerWP.xaml
1,9 → 1,28
<UserControl x:Class="MKLiveView.GMapCustomMarkers.CustomMarkerWP"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Height="33" Width="33">
<Grid Margin="0,0,10,10">
<Ellipse x:Name="ellipse" Stroke="Magenta" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" StrokeThickness="2">
Height="23" Width="23">
<Grid Height="23" VerticalAlignment="Top" HorizontalAlignment="Left" Width="23">
<Grid x:Name="gLanding" Margin="-7,-7,-3,-5">
<Ellipse x:Name="landing" Stroke="Magenta" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" StrokeThickness="2" Margin="4,4,0,2" Width="29" Height="29">
<Ellipse.Fill>
<RadialGradientBrush>
<GradientStop Color="#FF660066" Offset="1"/>
<GradientStop Color="#FFFD00CF" Offset="0.908"/>
<GradientStop Color="#665B4F59" Offset="0.796"/>
</RadialGradientBrush>
</Ellipse.Fill>
<Ellipse.Effect>
<DropShadowEffect Direction="40" Opacity="0.79" Color="#FF342E2E" ShadowDepth="3"/>
</Ellipse.Effect>
</Ellipse>
<TextBox Height="27" Text="H" Width="27" Background="{x:Null}" BorderBrush="{x:Null}" Foreground="{Binding Stroke, ElementName=landing}" HorizontalContentAlignment="Center" FontSize="22" FontWeight="ExtraBold" VerticalContentAlignment="Stretch" Margin="5,2,1,6">
<TextBox.Effect>
<DropShadowEffect BlurRadius="2" ShadowDepth="0"/>
</TextBox.Effect>
</TextBox>
</Grid>
<Ellipse x:Name="ellipse" Stroke="Magenta" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" StrokeThickness="2" Visibility="Hidden">
<Ellipse.Fill>
<RadialGradientBrush>
<GradientStop Color="#FF660066" Offset="1"/>
14,6 → 33,29
<DropShadowEffect BlurRadius="9" Direction="40" Opacity="0.79" Color="#FF342E2E"/>
</Ellipse.Effect>
</Ellipse>
<TextBox x:Name="text" HorizontalAlignment="Center" Height="18" Margin="2,5,2,7" TextWrapping="Wrap" Text="P19" VerticalAlignment="Center" Width="26" Background="{x:Null}" BorderBrush="{x:Null}" Foreground="#FFFFFEFE" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontSize="11"/>
<Rectangle x:Name="rect" HorizontalAlignment="Left" Height="21" Margin="1,1,0,0" Stroke="Red" VerticalAlignment="Top" Width="21" RenderTransformOrigin="0.5,0.5" RadiusY="1.978" RadiusX="1.978" StrokeThickness="1.6" Visibility="Hidden">
<Rectangle.Effect>
<DropShadowEffect Direction="64" ShadowDepth="2" BlurRadius="11"/>
</Rectangle.Effect>
<Rectangle.Fill>
<RadialGradientBrush>
<GradientStop Color="#FF660000" Offset="1"/>
<GradientStop Color="#FFFD0000" Offset="0.417"/>
</RadialGradientBrush>
</Rectangle.Fill>
<Rectangle.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="45"/>
<TranslateTransform/>
</TransformGroup>
</Rectangle.RenderTransform>
</Rectangle>
<TextBox x:Name="text" HorizontalAlignment="Center" Height="18" Margin="-2,2,-2,3" TextWrapping="Wrap" Text="P25" VerticalAlignment="Center" Width="27" Background="{x:Null}" BorderBrush="{x:Null}" Foreground="#FFFFFEFE" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontSize="11">
<TextBox.Effect>
<DropShadowEffect BlurRadius="0" ShadowDepth="1" Direction="-45.2"/>
</TextBox.Effect>
</TextBox>
</Grid>
</UserControl>
/MKLiveView/v1.0/Source/GMapCustomMarkers/CustomMarkerWP.xaml.cs
48,8 → 48,31
//}
//Popup.Child = Label;
text.Text = title;
setType();
}
 
void setType()
{
if (_type == 0)
{
gLanding.Visibility = Visibility.Hidden;
rect.Visibility = Visibility.Hidden;
ellipse.Visibility = Visibility.Visible;
}
if (_type == 1 | _type == 2)
{
gLanding.Visibility = Visibility.Hidden;
ellipse.Visibility = Visibility.Hidden;
rect.Visibility = Visibility.Visible;
}
if (_type == 3)
{
gLanding.Visibility = Visibility.Visible;
ellipse.Visibility = Visibility.Hidden;
rect.Visibility = Visibility.Hidden;
}
 
}
void CustomMarkerWP_Loaded(object sender, RoutedEventArgs e)
{
//if (icon.Source.CanFreeze)
83,7 → 106,11
public int WPType
{
get { return _type; }
set { _type = value; }
set
{
_type = value;
setType();
}
}
 
public void setColor(string sColor)
94,26 → 121,36
{
case "red":
ellipse.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0x3A, 0x00));
rect.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0x3A, 0x00));
landing.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0x3A, 0x00));
gs0 = new GradientStop(Color.FromArgb(0xFF, 0xFD, 0x00, 0x00),0);
gs1 = new GradientStop(Color.FromArgb(0xFF, 0x66, 0x1B, 0x1B),1);
break;
case "green":
ellipse.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0xFF, 0x00));
rect.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0xFF, 0x00));
landing.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0xFF, 0x00));
gs0 = new GradientStop(Color.FromArgb(0xFF, 0x00, 0xFD, 0x50),0);
gs1 = new GradientStop(Color.FromArgb(0xFF, 0x66, 0x2F, 0x1B),1);
break;
case "yellow":
ellipse.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0xFF, 0x00));
rect.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0xFF, 0x00));
landing.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0xFF, 0x00));
gs0 = new GradientStop(Color.FromArgb(0xFF, 0xFD, 0xFD, 0x00),0);
gs1 = new GradientStop(Color.FromArgb(0xFF, 0x66, 0x5F, 0x1B),1);
break;
case "blue":
ellipse.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0xFF, 0xFF));
rect.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0xFF, 0xFF));
landing.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0xFF, 0xFF));
gs0 = new GradientStop(Color.FromArgb(0xFF, 0x00, 0xDB, 0xFD),0);
gs1 = new GradientStop(Color.FromArgb(0xFF, 0x00, 0x66, 0x5C),1);
break;
case "pink":
ellipse.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0x00, 0xFF));
rect.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0x00, 0xFF));
landing.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0x00, 0xFF));
gs0 = new GradientStop(Color.FromArgb(0xFF, 0xFD, 0x00, 0xCF),0);
gs1 = new GradientStop(Color.FromArgb(0xFF, 0x66, 0x00, 0x66),1);
break;
121,6 → 158,9
rgb.GradientStops.Add(gs0);
rgb.GradientStops.Add(gs1);
ellipse.Fill = rgb;
rect.Fill = rgb;
landing.Fill = rgb;
 
}
 
void CustomMarkerWP_SizeChanged(object sender, SizeChangedEventArgs e)