Subversion Repositories Projects

Rev

Blame | Last modification | View Log | RSS feed

///============================================================================
/// MKLiveView
/// Copyright © 2016 Steph
///
///This file is part of MKLiveView.
///
///MKLiveView is free software: you can redistribute it and/or modify
///it under the terms of the GNU General Public License as published by
///the Free Software Foundation, either version 3 of the License, or
///(at your option) any later version.
///
///MKLiveView is distributed in the hope that it will be useful,
///but WITHOUT ANY WARRANTY; without even the implied warranty of
///MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
///GNU General Public License for more details.
///
///You should have received a copy of the GNU General Public License
///along with cssRcon.  If not, see <http://www.gnu.org/licenses/>.
///
///============================================================================
///Credits:

/// radioman (http://www.codeplex.com/site/users/view/radioman)
/// for his really GreatMaps! (http://greatmaps.codeplex.com/)
///
/// I made some changes to the source, so You need all files from this project here in order to compile and run
///
/// JOHN C. MACDONALD at Ira A. Fulton College of Engineering and Technology
/// for his MIKROKOPTER SERIAL CONTROL TUTORIAL (http://hdl.lib.byu.edu/1877/2747)
/// and the sourcecode (http://hdl.lib.byu.edu/1877/2748)
/// By his work I finally managed to get the communication with the Mikrokopter controllers to run
/// Some of his code was used in this programm like the SimpelSerialPort class (with lots of changes)
/// and the FilghtControllerMessage class
///
///============================================================================
/// DISCLAIMER
/// ===========
///
/// I created this software with my best knowledge and belief.
///
/// IN NO EVENT, UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING,
/// SHALL I, OR ANY PERSON BE LIABLE FOR ANY LOSS, EXPENSE OR DAMAGE,
/// OF ANY TYPE OR NATURE ARISING OUT OF THE USE OF,
/// OR INABILITY TO USE THIS SOFTWARE OR PROGRAM,
/// INCLUDING, BUT NOT LIMITED TO, CLAIMS, SUITS OR CAUSES OF ACTION
/// INVOLVING ALLEGED INFRINGEMENT OF COPYRIGHTS,
/// PATENTS, TRADEMARKS, TRADE SECRETS, OR UNFAIR COMPETITION.
///
/// This means: use it & have fun (but @ Your own risk...)
/// ===========================================================================

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using GMap.NET;

namespace MKLiveView.GMapCustomMarkers
{
   /// <summary>
   /// Interaction logic for Circle.xaml
   /// </summary>
   public partial class Circle : UserControl
   {
        public Circle()
        {
            InitializeComponent();
        }

        public PointLatLng Center;
        public PointLatLng Bound;
        public void setColor(string sColor)
        {
            switch (sColor)
            {
                case "red":
                    e.Stroke  = new SolidColorBrush(Colors.Red);
                    break;
                case "green":
                    e.Stroke = new SolidColorBrush(Colors.SpringGreen);
                    break;
                case "blue":
                    e.Stroke = new SolidColorBrush(Colors.Cyan);
                    break;
                case "yellow":
                    e.Stroke = new SolidColorBrush(Colors.Yellow);
                    break;
                case "pink":
                    e.Stroke = new SolidColorBrush(Colors.Magenta);
                    break;

                default:
                    e.Stroke = new SolidColorBrush(Colors.Red);
                    break;
            }
        }
    }

}