Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2500 | - | 1 | ///============================================================================ |
2 | /// MKLiveView |
||
3 | /// Copyright © 2016 Steph |
||
4 | /// |
||
5 | ///This file is part of MKLiveView. |
||
6 | /// |
||
7 | ///MKLiveView is free software: you can redistribute it and/or modify |
||
8 | ///it under the terms of the GNU General Public License as published by |
||
9 | ///the Free Software Foundation, either version 3 of the License, or |
||
10 | ///(at your option) any later version. |
||
11 | /// |
||
12 | ///MKLiveView is distributed in the hope that it will be useful, |
||
13 | ///but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
14 | ///MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
15 | ///GNU General Public License for more details. |
||
16 | /// |
||
17 | ///You should have received a copy of the GNU General Public License |
||
18 | ///along with cssRcon. If not, see <http://www.gnu.org/licenses/>. |
||
19 | /// |
||
20 | ///============================================================================ |
||
21 | ///Credits: |
||
22 | |||
23 | /// radioman (http://www.codeplex.com/site/users/view/radioman) |
||
24 | /// for his really GreatMaps! (http://greatmaps.codeplex.com/) |
||
25 | /// |
||
26 | /// I made some changes to the source, so You need all files from this project here in order to compile and run |
||
27 | /// |
||
28 | /// JOHN C. MACDONALD at Ira A. Fulton College of Engineering and Technology |
||
29 | /// for his MIKROKOPTER SERIAL CONTROL TUTORIAL (http://hdl.lib.byu.edu/1877/2747) |
||
30 | /// and the sourcecode (http://hdl.lib.byu.edu/1877/2748) |
||
31 | /// By his work I finally managed to get the communication with the Mikrokopter controllers to run |
||
32 | /// Some of his code was used in this programm like the SimpelSerialPort class (with lots of changes) |
||
33 | /// and the FilghtControllerMessage class |
||
34 | /// |
||
35 | ///============================================================================ |
||
36 | /// DISCLAIMER |
||
37 | /// =========== |
||
38 | /// |
||
39 | /// I created this software with my best knowledge and belief. |
||
40 | /// |
||
41 | /// IN NO EVENT, UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING, |
||
42 | /// SHALL I, OR ANY PERSON BE LIABLE FOR ANY LOSS, EXPENSE OR DAMAGE, |
||
43 | /// OF ANY TYPE OR NATURE ARISING OUT OF THE USE OF, |
||
44 | /// OR INABILITY TO USE THIS SOFTWARE OR PROGRAM, |
||
45 | /// INCLUDING, BUT NOT LIMITED TO, CLAIMS, SUITS OR CAUSES OF ACTION |
||
46 | /// INVOLVING ALLEGED INFRINGEMENT OF COPYRIGHTS, |
||
47 | /// PATENTS, TRADEMARKS, TRADE SECRETS, OR UNFAIR COMPETITION. |
||
48 | /// |
||
49 | /// This means: use it & have fun (but @ Your own risk...) |
||
50 | /// =========================================================================== |
||
51 | |||
52 | using System; |
||
53 | using System.Collections.Generic; |
||
54 | using System.Linq; |
||
55 | using System.Text; |
||
56 | using System.Windows; |
||
57 | using System.Windows.Controls; |
||
58 | using System.Windows.Data; |
||
59 | using System.Windows.Documents; |
||
60 | using System.Windows.Input; |
||
61 | using System.Windows.Media; |
||
62 | using System.Windows.Media.Imaging; |
||
63 | using System.Windows.Navigation; |
||
64 | using System.Windows.Shapes; |
||
65 | using GMap.NET; |
||
66 | |||
67 | namespace MKLiveView.GMapCustomMarkers |
||
68 | { |
||
69 | /// <summary> |
||
70 | /// Interaction logic for Circle.xaml |
||
71 | /// </summary> |
||
72 | public partial class Circle : UserControl |
||
73 | { |
||
74 | public Circle() |
||
75 | { |
||
76 | InitializeComponent(); |
||
77 | } |
||
78 | |||
79 | public PointLatLng Center; |
||
80 | public PointLatLng Bound; |
||
81 | public void setColor(string sColor) |
||
82 | { |
||
83 | switch (sColor) |
||
84 | { |
||
85 | case "red": |
||
86 | e.Stroke = new SolidColorBrush(Colors.Red); |
||
87 | break; |
||
88 | case "green": |
||
89 | e.Stroke = new SolidColorBrush(Colors.SpringGreen); |
||
90 | break; |
||
91 | case "blue": |
||
92 | e.Stroke = new SolidColorBrush(Colors.Cyan); |
||
93 | break; |
||
94 | case "yellow": |
||
95 | e.Stroke = new SolidColorBrush(Colors.Yellow); |
||
96 | break; |
||
97 | case "pink": |
||
98 | e.Stroke = new SolidColorBrush(Colors.Magenta); |
||
99 | break; |
||
100 | |||
101 | default: |
||
102 | e.Stroke = new SolidColorBrush(Colors.Red); |
||
103 | break; |
||
104 | } |
||
105 | } |
||
106 | } |
||
107 | |||
108 | } |