// 处理预警结果
        public void DealWarnData(RealData data, bool isWarn, List <string> warnNames)
        {
            IMFLayer layer = mapLogic.GetLayer(GetModelLayerName(data.TargetType));

            if (layer == null)
            {
                return;
            }

            IMFElement element = layer.GetElement(data.TargetNum.ToString());

            if (element == null)
            {
                return;
            }

            if (isWarn == false)
            {
                element.Flash(false);
            }
            else
            {
                if (element.IsFlash == false)
                {
                    element.Flash(true, 500);
                }
            }
        }
Beispiel #2
0
 /// <summary>
 /// 执行命令
 /// </summary>
 public void RunCommond()
 {
     mapControl.CurrentTool = null;
     layer = mapLogic.AddLayer("draw_arcLayer");
     mapControl.MousePointer = esriControlsMousePointer.esriPointerCrosshair;
     RegistEvent();
 }
Beispiel #3
0
        private void SetAreaColorGlobe(string name, Color color)
        {
            IMFLayer layer = globeMapLogic.GetLayer(layerName);

            if (layer == null)
            {
                return;
            }

            foreach (string polygonName in warnAresDic[name].Polygons)
            {
                var element = layer.GetElement(polygonName);
                if (element == null)
                {
                    continue;
                }

                IMFPolygon polygon = element as IMFPolygon;
                if (polygon == null)
                {
                    continue;
                }
                Color c = Color.FromArgb(80, color.R, color.G, color.B);
                polygon.SetFillColor(c);
            }

            layer.Refresh();
        }
Beispiel #4
0
        private void SetAreaColorArcMap(string name, Color color)
        {
            IMFLayer layer = mapMapLogic.GetLayer(layerName);

            if (layer == null)
            {
                return;
            }

            IMFElement element = layer.GetElement(name);

            if (element == null)
            {
                return;
            }

            IMFPolygon polygon = element as IMFPolygon;

            if (polygon == null)
            {
                return;
            }

            polygon.SetFillColor(Color.FromArgb(80, color));
        }
        // 设置设备显示、隐藏
        public void SetDeviceVisible(string deviceName, bool visible)
        {
            IMFLayer layer = mapLogic.GetLayer("设备服务图层");

            if (layer == null)
            {
                return;
            }

            IMFElement element = layer.GetElement(deviceName);

            if (element != null)
            {
                IMFPicture picture = element as IMFPicture;
                if (picture != null)
                {
                    picture.SetVisible(visible);
                }
            }

            IMFElement ele = layer.GetElement(deviceName + "polygon");

            if (ele != null)
            {
                IMFCircle circle = ele as IMFCircle;
                if (circle != null)
                {
                    circle.SetVisible(visible);
                }
            }
        }
Beispiel #6
0
        /// <summary>
        /// 释放资源
        /// </summary>
        public override void Dispose()
        {
            base.Dispose();

            if (Stroke != null)
            {
                Stroke.Dispose();
                Stroke = null;
            }

            if (Fill != null)
            {
                Fill.Dispose();
                Fill = null;
            }

            if (pen != null)
            {
                pen.Dispose();
                pen = null;
            }

            listPoints.Clear();

            listPoints  = null;
            BelongLayer = null;
        }
Beispiel #7
0
 /// <summary>
 /// 执行命令
 /// </summary>
 public void RunCommond()
 {
     mapControl.CurrentTool = null;
     layer = mapLogic.AddLayer("draw_layer");
     mapControl.OnMouseDown   += mapControl_OnMouseDown;
     mapControl.OnKeyDown     += mapControl_OnKeyDown;
     mapControl.OnDoubleClick += mapControl_OnDoubleClick;
 }
Beispiel #8
0
 /// <summary>
 /// 执行工具命令
 /// </summary>
 public void RunCommond()
 {
     mapControl.CurrentTool  = null;
     mapControl.MousePointer = esriControlsMousePointer.esriPointerCrosshair;
     mapControl.OnMouseDown += mapControl_OnMouseDown;
     mapControl.OnKeyDown   += mapControl_OnKeyDown;
     mapControl.OnKeyUp     += mapControl_OnKeyUp;
     layer = mapLogic.AddLayer("draw_arcLayer");
 }
Beispiel #9
0
 /// <summary>
 /// 执行工具命令
 /// </summary>
 public void RunCommond()
 {
     gmapControl.CanDragMap = false;
     layer = mapLogic.AddLayer("draw_layer");
     gmapControl.SetCursor(Cursors.Cross);
     Utils.bPublishEvent    = false;
     gmapControl.MouseDown += gmapControl_MouseDown;
     gmapControl.KeyDown   += gmapControl_KeyDown;
     gmapControl.KeyUp     += gmapControl_KeyUp;
 }
Beispiel #10
0
 /// <summary>
 /// 释放资源
 /// </summary>
 public void Dispose()
 {
     ReleaseCommond();
     CommondExecutedEvent = null;
     gmapControl          = null;
     pointList            = null;
     currentPoint         = null;
     mapLogic             = null;
     layer = null;
 }
Beispiel #11
0
 /// <summary>
 /// 释放资源
 /// </summary>
 public void Dispose()
 {
     ReleaseCommond();
     gmapControl          = null;
     mapLogic             = null;
     textCtrl             = null;
     layer                = null;
     textElement          = null;
     CommondExecutedEvent = null;
 }
Beispiel #12
0
 /// <summary>
 /// 释放资源
 /// </summary>
 public void Dispose()
 {
     mapControl    = null;
     mapLogic      = null;
     isFinish      = false;
     isControl     = false;
     circleElement = null;
     centerPoint   = null;
     layer         = null;
 }
Beispiel #13
0
        // 设置卫星图层显示隐藏
        public void SetSatelliteLayerVisible(bool visible)
        {
            IMFLayer layer = mapLogic.GetLayer(satelliteLayerName);

            if (layer == null)
            {
                return;
            }

            layer.SetLayerVisible(visible);
        }
Beispiel #14
0
 /// <summary>
 /// 执行命令
 /// </summary>
 public void RunCommond()
 {
     mapControl.CurrentTool  = null;
     mapControl.MousePointer = esriControlsMousePointer.esriPointerCrosshair;
     measureTool             = new MeasureTool(this);
     mapControl.CreateControl();//强制创建控件
     measureTool.Location = new System.Drawing.Point(0, 0);
     mapControl.Controls.Add(measureTool);
     layer = mapLogic.AddLayer("measure_layer");
     RegistEvent();
 }
Beispiel #15
0
        // 设置波束覆盖是否可见
        public void SetCoverLayerVisible(bool visible)
        {
            IMFLayer layer = mapLogic.GetLayer(coverLayerName);

            if (layer == null)
            {
                return;
            }

            layer.SetLayerVisible(visible);
        }
Beispiel #16
0
 /// <summary>
 /// 释放资源
 /// </summary>
 public void Dispose()
 {
     listPoints.Clear();
     listPoints  = null;
     mapControl  = null;
     lineElement = null;
     isFinish    = false;
     isControl   = false;
     layer       = null;
     mapLogic    = null;
 }
Beispiel #17
0
 /// <summary>
 /// 释放资源
 /// </summary>
 public void Dispose()
 {
     ReleaseCommond();
     CommondExecutedEvent = null;
     mapControl           = null;
     mapLogic             = null;
     listMapPoints        = null;
     isControl            = false;
     isFinish             = false;
     layer = null;
 }
Beispiel #18
0
 /// <summary>
 /// 释放资源
 /// </summary>
 public void Dispose()
 {
     ReleaseCommond();
     CommondExecutedEvent = null;
     gmapControl          = null;
     mapLogic             = null;
     centerPoint          = null;
     movePoint            = null;
     circleElement        = null;
     layer = null;
 }
Beispiel #19
0
        // 设置设备服务图层显示、隐藏
        public void SetDeviceRangeLayerVisible(bool visible)
        {
            IMFLayer layer = mapLogic.GetLayer("设备服务图层");

            if (layer == null)
            {
                return;
            }

            layer.SetLayerVisible(visible);
        }
Beispiel #20
0
 /// <summary>
 /// 释放资源
 /// </summary>
 public void Dispose()
 {
     ReleaseCommond();
     circleElement        = null;
     mapControl           = null;
     circleKml            = null;
     kml                  = null;
     layer                = null;
     CommondExecutedEvent = null;
     mapLogic             = null;
     drawn                = false;
 }
Beispiel #21
0
 /// <summary>
 /// 释放资源
 /// </summary>
 public void Dispose()
 {
     ReleaseCommond();
     CommondExecutedEvent = null;
     gmapControl          = null;
     lineElement          = null;
     mapLogic             = null;
     listMapPoints        = null;
     layer     = null;
     drawn     = false;
     mouseDown = false;
 }
Beispiel #22
0
        private void DeleteAreaArcMap(string name)
        {
            IMFLayer layerMap = mapMapLogic.GetLayer(layerName);

            if (layerMap == null)
            {
                return;
            }

            layerMap.RemoveElement(name);
            layerMap.Refresh();
        }
Beispiel #23
0
 /// <summary>
 /// 释放资源
 /// </summary>
 public void Dispose()
 {
     listPoints.Clear();
     listPoints = null;
     tempName   = string.Empty;
     mapControl = null;
     mapLogic   = null;
     layer      = null;
     isFinish   = false;
     isControl  = false;
     recElement = null;
 }
Beispiel #24
0
        // 移除当前航迹
        private void RemoveTrackLineEx(Track track)
        {
            IMFLayer layer = mapLogic.GetLayer(GetModelLayerName(track.TargetType));

            if (layer == null)
            {
                return;
            }

            layer.RemoveElement(track.ElementName + "line");
            layer.Refresh();
        }
Beispiel #25
0
 /// <summary>
 /// 释放资源
 /// </summary>
 public void Dispose()
 {
     ReleaseCommond();
     CommondExecutedEvent = null;
     mapControl           = null;
     mapLogic             = null;
     centerDot            = null;
     circleElement        = null;
     isFinish             = false;
     isMouseDown          = false;
     isControl            = false;
     layer = null;
 }
Beispiel #26
0
 /// <summary>
 /// 释放资源
 /// </summary>
 public void Dispose()
 {
     ReleaseCommond();
     mapLogic             = null;
     mapControl           = null;
     layer                = null;
     pointList            = null;
     polygonElement       = null;
     CommondExecutedEvent = null;
     kml        = null;
     polygonKml = null;
     drawn      = false;
 }
Beispiel #27
0
        /// <summary>
        /// 执行工具命令
        /// </summary>
        public void RunCommond()
        {
            gmapControl.SetCursor(Cursors.Cross);
            // 订阅事件
            Utils.bPublishEvent    = false;
            gmapControl.MouseDown += gmapControl_MouseDown;
            gmapControl.KeyDown   += gmapControl_KeyDown;

            textCtrl.InputFinished += InputFinish;

            // 创建图层
            layer = mapLogic.AddLayer("draw_layer");
        }
Beispiel #28
0
 /// <summary>
 /// 刷新指定图层
 /// </summary>
 /// <param name="layer">图层</param>
 public void Refresh(IMFLayer layer)
 {
     // 需要判断是否可以被调用
     lock (lockObj)
     {
         if (isRefreshCall)
         {
             string name = layer.LayerName;
             isRefreshCall = false;
             refreshTimer.Start();
         }
     }
 }
Beispiel #29
0
 /// <summary>
 /// 释放资源
 /// </summary>
 public void Dispose()
 {
     if (textCtrl != null)
     {
         textCtrl.Dispose();
     }
     downPoint   = null;
     isControl   = true;
     textElement = null;
     mapLogic    = null;
     layer       = null;
     mapControl  = null;
 }
Beispiel #30
0
        // 移除所有航迹
        private void RemoveAllTrackLineEx(List <Track> tracks)
        {
            foreach (Track track in tracks)
            {
                IMFLayer layer = mapLogic.GetLayer(GetModelLayerName(track.TargetType));
                if (layer == null)
                {
                    continue;
                }

                layer.RemoveElement(track.ElementName + "line");
            }
        }