Inheritance: System.Windows.Controls.Control, INotifyPropertyChanged
示例#1
0
 public MeasureDistance(Map map, ElementsLayer elementsLayer, FeaturesLayer featuresLayer)
 {
     _map = map;
     _eLayer = elementsLayer;
     _fLayer = featuresLayer;
     _isInited = false;
     _distanceList = new List<TextBlock>();
     _points = new Point2DCollection();
     _distances = new List<double>();
 }
示例#2
0
 public MeasureDistance(Map map, ElementsLayer elementsLayer, FeaturesLayer featuresLayer, bool isMeasure)
 {
     _map = map;
     _eLayer = elementsLayer;
     _fLayer = featuresLayer;
     _isInited = false;
     _distanceList = new List<Border>();
     _points = new Point2DCollection();
     _distances = new List<double>();
     _isMeasure = isMeasure;
 }
示例#3
0
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/GettingStartedWP;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.TitlePanel = ((System.Windows.Controls.StackPanel)(this.FindName("TitlePanel")));
     this.ContentPanel = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.MyMap = ((SuperMap.WindowsPhone.Mapping.Map)(this.FindName("MyMap")));
     this.ZoomIn = ((System.Windows.Controls.Button)(this.FindName("ZoomIn")));
     this.ZoomOut = ((System.Windows.Controls.Button)(this.FindName("ZoomOut")));
 }
示例#4
0
 /// <summary>${ui_action_DrawLine_constructor_Map_D}</summary>
 /// <example>
 /// 	<code lang="CS">
 /// DrawLine draw = new DrawLine(MyMap,Cursors.Stylus)
 /// </code>
 /// </example>
 /// <param name="map">${ui_action_DrawLine_constructor_Map_param_map}</param>
 public DrawLine(Map map)
     : base(map, "DrawLine")
 {
     if (map.Theme == null)
     {
         Stroke = new SolidColorBrush(Colors.Red);
         StrokeThickness = MagicNumber.ACTION_STYLE_DEFAULT_STROKETHICKNESS;
         Opacity = MagicNumber.ACTION_STYLE_DEFAULT_OPACITY;
     }
     else
     {
         this.Stroke = map.Theme.Stroke;
         this.StrokeThickness = map.Theme.StrokeThickness;
         this.Opacity = map.Theme.Opacity;
     }
 }
 /// <summary>${ui_action_DrawRect_constructor_Map_D}</summary>
 /// <example>
 /// 	<code lang="CS">
 /// DrawRectangle draw = new DrawRectangle(MyMap,Cursors.Stylus)
 /// </code>
 /// </example>
 /// <param name="map">${ui_action_DrawRect_constructor_Map_param_map}</param>
 public DrawRectangle(Map map )
     : base(map , "DrawRectangle")
 {
     startPt = Point2D.Empty;
     if (map.Theme == null)
     {
         Stroke = new SolidColorBrush(Colors.Green);
         StrokeThickness = MagicNumber.ACTION_STYLE_DEFAULT_STROKETHICKNESS;
         Fill = new SolidColorBrush(Colors.Black);
         Opacity = MagicNumber.ACTION_STYLE_DEFAULT_OPACITY;
     }
     else
     {
         this.Stroke = map.Theme.Stroke;
         this.StrokeThickness = map.Theme.StrokeThickness;
         this.Fill = map.Theme.Fill;
         this.Opacity = map.Theme.Opacity;
     }
 }
示例#6
0
 /// <summary>${ui_action_Edit_constructor_D}</summary>
 /// <param name="map">${ui_action_Edit_constructor_param_map}</param>
 /// <param name="layer">${ui_action_Edit_constructor_param_layer}</param>
 public Edit(Map map , FeaturesLayer layer)
 {
     if (map != null && layer != null)
     {
         Name = "Edit";
         Map = map;
         editLayer = layer;
         editLayer.MouseLeftButtonDown += editLayer_MouseLeftButtonDown;
         editLayer.MouseLeftButtonUp += editLayer_MouseLeftButtonUp;
         if (map.Theme == null)
         {
             SetDefaultStyle();
         }
         else
         {
             HoverVertexStyle = map.Theme.HoverVertexStyle;
             SnapStyle = map.Theme.SnapStyle;
             HoverCenterStyle = map.Theme.HoverCenterStyle;
             hoverLineStyle = new PredefinedLineStyle() { Stroke = new SolidColorBrush(Colors.Transparent) , StrokeThickness = 10 };//Colors.Transparent
         }
     }
 }
示例#7
0
 public DrawPoint(Map map, ElementsLayer layer)
 {
     _map = map;
     _eLayer = layer;
     _pushpins = new List<Pushpin>();
 }
示例#8
0
 /// <summary>${ui_action_Pan_constructor_Map_D}</summary>
 /// <example>
 /// 	<code lang="CS">
 /// Pan panTo = new Pan(MyMap,Cursors.Hand)
 /// </code>
 /// </example>
 /// <param name="map">${ui_action_Pan_constructor_Map_param_map}</param>
 public Pan(Map map)
     : base(map, "Pan")
 {
 }
示例#9
0
 /// <summary>${ui_action_ZoomOut_constructor_Map_D}</summary>
 /// <example>
 /// 	<code lang="CS">
 /// ZoomOut zoomMap = new ZoomOut(MyMap,Cursors.Arrow)
 /// </code>
 /// </example>
 /// <param name="map">${ui_action_ZoomOut_constructor_Map_param_map}</param>
 public ZoomOut(Map map)
     : base(map)
 { }
示例#10
0
 /// <summary>${ui_action_ZoomIn_constructor_Map_D}</summary>
 /// <example>
 /// 	<code lang="CS">
 /// ZoomIn zoomInMap = new ZoomIn(MyMap,Cursors.Arrow)
 /// </code>
 /// </example>
 /// <overloads>${ui_action_ZoomIn_constructor_overloads}</overloads>
 /// <param name="map">${ui_action_ZoomIn_constructor_Map_param_map}</param>
 public ZoomIn(Map map)
     : base(map)
 {
 }
示例#11
0
 /// <summary>${ui_action_DrawPoint_constructor_Map_D}</summary>
 /// <example>
 /// 	<code lang="CS">
 /// DrawPoint draw = new DrawPoint(MyMap,Cursors.Stylus)
 /// </code>
 /// </example>
 /// <param name="map">${ui_action_DrawPoint_constructor_Map_param_map}</param>
 public DrawPoint(Map map )
     : base(map , "DrawPoint")
 {
     
 }
示例#12
0
 public DrawRectangle(Map map,ElementsLayer layer )
 {
    
 }
示例#13
0
 /// <summary>${ui_action_MapAction_constructor_Map_D}</summary>
 /// <param name="map">${ui_action_MapAction_constructor_Map_param_map}</param>
 /// <param name="name">${ui_action_MapAction_constructor_Map_param_name}</param>
 protected MapAction(Map map, string name)
 {
     Name = name;
     Map = map;
     Map.Focus();
 }