// 处理预警结果 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); } } }
/// <summary> /// 执行命令 /// </summary> public void RunCommond() { mapControl.CurrentTool = null; layer = mapLogic.AddLayer("draw_arcLayer"); mapControl.MousePointer = esriControlsMousePointer.esriPointerCrosshair; RegistEvent(); }
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(); }
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); } } }
/// <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; }
/// <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; }
/// <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"); }
/// <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; }
/// <summary> /// 释放资源 /// </summary> public void Dispose() { ReleaseCommond(); CommondExecutedEvent = null; gmapControl = null; pointList = null; currentPoint = null; mapLogic = null; layer = null; }
/// <summary> /// 释放资源 /// </summary> public void Dispose() { ReleaseCommond(); gmapControl = null; mapLogic = null; textCtrl = null; layer = null; textElement = null; CommondExecutedEvent = null; }
/// <summary> /// 释放资源 /// </summary> public void Dispose() { mapControl = null; mapLogic = null; isFinish = false; isControl = false; circleElement = null; centerPoint = null; layer = null; }
// 设置卫星图层显示隐藏 public void SetSatelliteLayerVisible(bool visible) { IMFLayer layer = mapLogic.GetLayer(satelliteLayerName); if (layer == null) { return; } layer.SetLayerVisible(visible); }
/// <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(); }
// 设置波束覆盖是否可见 public void SetCoverLayerVisible(bool visible) { IMFLayer layer = mapLogic.GetLayer(coverLayerName); if (layer == null) { return; } layer.SetLayerVisible(visible); }
/// <summary> /// 释放资源 /// </summary> public void Dispose() { listPoints.Clear(); listPoints = null; mapControl = null; lineElement = null; isFinish = false; isControl = false; layer = null; mapLogic = null; }
/// <summary> /// 释放资源 /// </summary> public void Dispose() { ReleaseCommond(); CommondExecutedEvent = null; mapControl = null; mapLogic = null; listMapPoints = null; isControl = false; isFinish = false; layer = null; }
/// <summary> /// 释放资源 /// </summary> public void Dispose() { ReleaseCommond(); CommondExecutedEvent = null; gmapControl = null; mapLogic = null; centerPoint = null; movePoint = null; circleElement = null; layer = null; }
// 设置设备服务图层显示、隐藏 public void SetDeviceRangeLayerVisible(bool visible) { IMFLayer layer = mapLogic.GetLayer("设备服务图层"); if (layer == null) { return; } layer.SetLayerVisible(visible); }
/// <summary> /// 释放资源 /// </summary> public void Dispose() { ReleaseCommond(); circleElement = null; mapControl = null; circleKml = null; kml = null; layer = null; CommondExecutedEvent = null; mapLogic = null; drawn = false; }
/// <summary> /// 释放资源 /// </summary> public void Dispose() { ReleaseCommond(); CommondExecutedEvent = null; gmapControl = null; lineElement = null; mapLogic = null; listMapPoints = null; layer = null; drawn = false; mouseDown = false; }
private void DeleteAreaArcMap(string name) { IMFLayer layerMap = mapMapLogic.GetLayer(layerName); if (layerMap == null) { return; } layerMap.RemoveElement(name); layerMap.Refresh(); }
/// <summary> /// 释放资源 /// </summary> public void Dispose() { listPoints.Clear(); listPoints = null; tempName = string.Empty; mapControl = null; mapLogic = null; layer = null; isFinish = false; isControl = false; recElement = null; }
// 移除当前航迹 private void RemoveTrackLineEx(Track track) { IMFLayer layer = mapLogic.GetLayer(GetModelLayerName(track.TargetType)); if (layer == null) { return; } layer.RemoveElement(track.ElementName + "line"); layer.Refresh(); }
/// <summary> /// 释放资源 /// </summary> public void Dispose() { ReleaseCommond(); CommondExecutedEvent = null; mapControl = null; mapLogic = null; centerDot = null; circleElement = null; isFinish = false; isMouseDown = false; isControl = false; layer = null; }
/// <summary> /// 释放资源 /// </summary> public void Dispose() { ReleaseCommond(); mapLogic = null; mapControl = null; layer = null; pointList = null; polygonElement = null; CommondExecutedEvent = null; kml = null; polygonKml = null; drawn = false; }
/// <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"); }
/// <summary> /// 刷新指定图层 /// </summary> /// <param name="layer">图层</param> public void Refresh(IMFLayer layer) { // 需要判断是否可以被调用 lock (lockObj) { if (isRefreshCall) { string name = layer.LayerName; isRefreshCall = false; refreshTimer.Start(); } } }
/// <summary> /// 释放资源 /// </summary> public void Dispose() { if (textCtrl != null) { textCtrl.Dispose(); } downPoint = null; isControl = true; textElement = null; mapLogic = null; layer = null; mapControl = null; }
// 移除所有航迹 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"); } }