private static void SetCursor(MapTool mapTool, Cursor cursor) { if (!ReferenceEquals(mapTool.MapControl.Cursor, cursor)) { mapTool.MapControl.Cursor = cursor; } }
/// <summary> /// 延迟播放展示动画 /// </summary> /// <param name="time"></param> /// <returns></returns> private IEnumerator DelayCall(float time) { isPlayAnimation = true; if (point != null) { point.SetActive(false); } if (time > 0) { yield return(new WaitForSeconds(time)); } if (point != null) { point.SetActive(true); point.transform.localScale = Vector3.zero; point.transform.DOScale(Vector3.one, ConfigData.GRID_SHOW_TIME).onComplete += () => { RefreshData(); }; //新的直接展示出来就行 var vec = MapTool.GetPosition(gridData.Position.x, gridData.Position.y); rectTransform.anchoredPosition = new Vector2(vec.x, vec.y); } isPlayAnimation = false; }
public override void OnInspectorGUI() { base.OnInspectorGUI(); owner = target as MapTool; if (GUILayout.Button(" LoadLevel")) { var grid = GameObject.FindObjectOfType <Grid>(); if (grid == null) { return; } MapManager.LoadMap(grid, owner.curLevel); } if (GUILayout.Button("SaveLevel")) { var grid = GameObject.FindObjectOfType <Grid>(); if (grid == null) { return; } MapManager.SaveLevel(grid, owner.curLevel); EditorUtility.DisplayDialog("提示", "Finish Save", "OK"); } }
public static void OnMouseMove(MapTool mapTool, MouseEventArgs e) { if (e.Button != MouseButtons.None) { return; } RefreshCursor(mapTool); }
public void setPathRemoveLastSection() { try { base.Document.InvokeScript("sketchBack"); this.m_sTool = MapTool.设置路线; } catch { } }
public void setPanTool() { try { base.Document.InvokeScript("setpantool"); this.m_sTool = MapTool.移动; } catch { } }
public void setClickZoomDownTool() { try { base.Document.InvokeScript("setClickZoomOutTool"); this.m_sTool = MapTool.点击缩小; } catch { } }
public void setSmallArea_Circle() { try { base.Document.InvokeScript("setpointtool"); this.m_sTool = GisMap.MapTool.设置圆形区域; } catch { } }
public void setClickZoomUpTool() { try { base.Document.InvokeScript("setClickZoomInTool"); this.m_sTool = MapTool.点击放大; } catch { } }
public void setDelPoint() { try { base.Document.InvokeScript("setpointtool"); this.m_sTool = MapTool.除标注; } catch { } }
public void setMapToCenter() { try { base.Document.InvokeScript("setpointtool"); this.m_sTool = MapTool.设置圆形区域; } catch { } }
void m_MapImage_OnActiveToolChanged(MapTool maptool) { //Check new tool //o Pan map //o Country extent //o Information tool //o Zoom in map //o Zoom out map //o Zoom in/out map // - tools compatible with buf zone editing }
public void setMeasureTool() { try { base.Document.InvokeScript("setmeasuretool"); this.m_sTool = MapTool.测距; } catch { } }
static void Init() { MapTool window = (MapTool)GetWindow(typeof(MapTool)); window.Show(); //window.titleContent = new GUIContent("MapTool"); duringSceneGui += window.OnScene; window.minSize = new Vector2(1440, 900); window.Start(); }
private void setActiveTool(TileType tileType) { this.activeTool = new TileTypeTool(tileType); }
public void setZoomUpTool() { try { base.Document.InvokeScript("setzoomintool"); this.m_sTool = MapTool.放大; } catch { } }
private void LoadMap(String filename) { using (Stream stream = new FileStream(filename, FileMode.Open)) { this.map = AnalyzeMap.Load(stream); gridControl1.GridSizeX = map.SizeX; gridControl1.GridSizeY = map.SizeY; map.OnResize += new AnalyzeMap.MapResizeHandler(map_OnResize); mapFileName = filename; autoSaveFileName = null; activeTool = null; setCheckedTool(null); } }
public void setPolygonMesTool() { try { base.Document.InvokeScript("setPolygonMesTool"); this.m_sTool = MapTool.多边形量算; } catch { } }
public void setZoomBoxExTool() { try { base.Document.InvokeScript("setZoomBoxExTool"); this.m_sTool = MapTool.设置矩形区域; } catch { } }
public void setPathTool() { try { base.Document.InvokeScript("setpathtool"); this.m_sTool = MapTool.设置路线; } catch { } }
public void setRectangleMesTool() { try { base.Document.InvokeScript("setRectangleMesTool"); this.m_sTool = MapTool.矩形量算; } catch { } }
public void setQuerySearchCar() { try { base.Document.InvokeScript("setZoomBoxExTool"); this.m_sTool = MapTool.日期查车; } catch { } }
public void setZoomDownTool() { try { base.Document.InvokeScript("setzoomouttool"); this.m_sTool = MapTool.缩小; } catch { } }
public void setDelPoint() { try { base.Document.InvokeScript("setpointtool"); this.m_sTool = MapTool.删除标注; } catch { } }
public void setZoomToCenter() { try { base.Document.InvokeScript("setZoomToCenter"); this.m_sTool = MapTool.中心点; } catch { } }
public void setShowHintTool() { try { base.Document.InvokeScript("setShowHintTool"); this.m_sTool = MapTool.箭头; } catch { } }
public void setPointTool() { try { base.Document.InvokeScript("setpointtool"); this.m_sTool = MapTool.标注地图; } catch { } }
public void setRegionTool() { try { base.Document.InvokeScript("setregiontool"); this.m_sTool = MapTool.设置区域; } catch { } }
public void setSmallArea() { try { base.Document.InvokeScript("setZoomBoxExTool"); this.m_sTool = MapTool.小范围电召; } catch { } }