Rev 2316 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2316 | Rev 2373 | ||
---|---|---|---|
Line 46... | Line 46... | ||
46 | // Label.FontSize = 22; |
46 | // Label.FontSize = 22; |
47 | // Label.Content = title; |
47 | // Label.Content = title; |
48 | //} |
48 | //} |
49 | //Popup.Child = Label; |
49 | //Popup.Child = Label; |
50 | text.Text = title; |
50 | text.Text = title; |
- | 51 | setType(); |
|
51 | } |
52 | } |
Line -... | Line 53... | ||
- | 53 | ||
- | 54 | void setType() |
|
- | 55 | { |
|
- | 56 | if (_type == 0) |
|
- | 57 | { |
|
- | 58 | gLanding.Visibility = Visibility.Hidden; |
|
- | 59 | rect.Visibility = Visibility.Hidden; |
|
- | 60 | ellipse.Visibility = Visibility.Visible; |
|
- | 61 | } |
|
- | 62 | if (_type == 1 | _type == 2) |
|
- | 63 | { |
|
- | 64 | gLanding.Visibility = Visibility.Hidden; |
|
- | 65 | ellipse.Visibility = Visibility.Hidden; |
|
- | 66 | rect.Visibility = Visibility.Visible; |
|
- | 67 | } |
|
- | 68 | if (_type == 3) |
|
- | 69 | { |
|
- | 70 | gLanding.Visibility = Visibility.Visible; |
|
- | 71 | ellipse.Visibility = Visibility.Hidden; |
|
- | 72 | rect.Visibility = Visibility.Hidden; |
|
- | 73 | } |
|
- | 74 | ||
52 | 75 | } |
|
53 | void CustomMarkerWP_Loaded(object sender, RoutedEventArgs e) |
76 | void CustomMarkerWP_Loaded(object sender, RoutedEventArgs e) |
54 | { |
77 | { |
55 | //if (icon.Source.CanFreeze) |
78 | //if (icon.Source.CanFreeze) |
56 | //{ |
79 | //{ |
Line 81... | Line 104... | ||
81 | set { text.Text = value; } |
104 | set { text.Text = value; } |
82 | } |
105 | } |
83 | public int WPType |
106 | public int WPType |
84 | { |
107 | { |
85 | get { return _type; } |
108 | get { return _type; } |
- | 109 | set |
|
- | 110 | { |
|
86 | set { _type = value; } |
111 | _type = value; |
- | 112 | setType(); |
|
- | 113 | } |
|
87 | } |
114 | } |
Line 88... | Line 115... | ||
88 | 115 | ||
89 | public void setColor(string sColor) |
116 | public void setColor(string sColor) |
90 | { |
117 | { |
91 | RadialGradientBrush rgb = new RadialGradientBrush(); |
118 | RadialGradientBrush rgb = new RadialGradientBrush(); |
92 | GradientStop gs0 = new GradientStop(Color.FromArgb(0xFF, 0xFD, 0x00, 0x00),0), gs1 = new GradientStop(Color.FromArgb(0xFF, 0x66, 0x1B, 0x1B),1); |
119 | GradientStop gs0 = new GradientStop(Color.FromArgb(0xFF, 0xFD, 0x00, 0x00),0), gs1 = new GradientStop(Color.FromArgb(0xFF, 0x66, 0x1B, 0x1B),1); |
93 | switch (sColor) |
120 | switch (sColor) |
94 | { |
121 | { |
95 | case "red": |
122 | case "red": |
- | 123 | ellipse.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0x3A, 0x00)); |
|
- | 124 | rect.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0x3A, 0x00)); |
|
96 | ellipse.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0x3A, 0x00)); |
125 | landing.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0x3A, 0x00)); |
97 | gs0 = new GradientStop(Color.FromArgb(0xFF, 0xFD, 0x00, 0x00),0); |
126 | gs0 = new GradientStop(Color.FromArgb(0xFF, 0xFD, 0x00, 0x00),0); |
98 | gs1 = new GradientStop(Color.FromArgb(0xFF, 0x66, 0x1B, 0x1B),1); |
127 | gs1 = new GradientStop(Color.FromArgb(0xFF, 0x66, 0x1B, 0x1B),1); |
99 | break; |
128 | break; |
100 | case "green": |
129 | case "green": |
- | 130 | ellipse.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0xFF, 0x00)); |
|
- | 131 | rect.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0xFF, 0x00)); |
|
101 | ellipse.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0xFF, 0x00)); |
132 | landing.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0xFF, 0x00)); |
102 | gs0 = new GradientStop(Color.FromArgb(0xFF, 0x00, 0xFD, 0x50),0); |
133 | gs0 = new GradientStop(Color.FromArgb(0xFF, 0x00, 0xFD, 0x50),0); |
103 | gs1 = new GradientStop(Color.FromArgb(0xFF, 0x66, 0x2F, 0x1B),1); |
134 | gs1 = new GradientStop(Color.FromArgb(0xFF, 0x66, 0x2F, 0x1B),1); |
104 | break; |
135 | break; |
105 | case "yellow": |
136 | case "yellow": |
- | 137 | ellipse.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0xFF, 0x00)); |
|
- | 138 | rect.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0xFF, 0x00)); |
|
106 | ellipse.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0xFF, 0x00)); |
139 | landing.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0xFF, 0x00)); |
107 | gs0 = new GradientStop(Color.FromArgb(0xFF, 0xFD, 0xFD, 0x00),0); |
140 | gs0 = new GradientStop(Color.FromArgb(0xFF, 0xFD, 0xFD, 0x00),0); |
108 | gs1 = new GradientStop(Color.FromArgb(0xFF, 0x66, 0x5F, 0x1B),1); |
141 | gs1 = new GradientStop(Color.FromArgb(0xFF, 0x66, 0x5F, 0x1B),1); |
109 | break; |
142 | break; |
110 | case "blue": |
143 | case "blue": |
- | 144 | ellipse.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0xFF, 0xFF)); |
|
- | 145 | rect.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0xFF, 0xFF)); |
|
111 | ellipse.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0xFF, 0xFF)); |
146 | landing.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0xFF, 0xFF)); |
112 | gs0 = new GradientStop(Color.FromArgb(0xFF, 0x00, 0xDB, 0xFD),0); |
147 | gs0 = new GradientStop(Color.FromArgb(0xFF, 0x00, 0xDB, 0xFD),0); |
113 | gs1 = new GradientStop(Color.FromArgb(0xFF, 0x00, 0x66, 0x5C),1); |
148 | gs1 = new GradientStop(Color.FromArgb(0xFF, 0x00, 0x66, 0x5C),1); |
114 | break; |
149 | break; |
115 | case "pink": |
150 | case "pink": |
- | 151 | ellipse.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0x00, 0xFF)); |
|
- | 152 | rect.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0x00, 0xFF)); |
|
116 | ellipse.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0x00, 0xFF)); |
153 | landing.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0x00, 0xFF)); |
117 | gs0 = new GradientStop(Color.FromArgb(0xFF, 0xFD, 0x00, 0xCF),0); |
154 | gs0 = new GradientStop(Color.FromArgb(0xFF, 0xFD, 0x00, 0xCF),0); |
118 | gs1 = new GradientStop(Color.FromArgb(0xFF, 0x66, 0x00, 0x66),1); |
155 | gs1 = new GradientStop(Color.FromArgb(0xFF, 0x66, 0x00, 0x66),1); |
119 | break; |
156 | break; |
120 | } |
157 | } |
121 | rgb.GradientStops.Add(gs0); |
158 | rgb.GradientStops.Add(gs0); |
122 | rgb.GradientStops.Add(gs1); |
159 | rgb.GradientStops.Add(gs1); |
- | 160 | ellipse.Fill = rgb; |
|
- | 161 | rect.Fill = rgb; |
|
- | 162 | landing.Fill = rgb; |
|
123 | ellipse.Fill = rgb; |
163 | |
Line 124... | Line 164... | ||
124 | } |
164 | } |
125 | 165 | ||
126 | void CustomMarkerWP_SizeChanged(object sender, SizeChangedEventArgs e) |
166 | void CustomMarkerWP_SizeChanged(object sender, SizeChangedEventArgs e) |