Ejemplo n.º 1
0
 private static void SetCursor(MapTool mapTool, Cursor cursor)
 {
     if (!ReferenceEquals(mapTool.MapControl.Cursor, cursor))
     {
         mapTool.MapControl.Cursor = cursor;
     }
 }
Ejemplo n.º 2
0
 /// <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;
 }
Ejemplo n.º 3
0
        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");
            }
        }
Ejemplo n.º 4
0
        public static void OnMouseMove(MapTool mapTool, MouseEventArgs e)
        {
            if (e.Button != MouseButtons.None)
            {
                return;
            }

            RefreshCursor(mapTool);
        }
Ejemplo n.º 5
0
 public void setPathRemoveLastSection()
 {
     try
     {
         base.Document.InvokeScript("sketchBack");
         this.m_sTool = MapTool.设置路线;
     }
     catch
     {
     }
 }
Ejemplo n.º 6
0
 public void setPanTool()
 {
     try
     {
         base.Document.InvokeScript("setpantool");
         this.m_sTool = MapTool.移动;
     }
     catch
     {
     }
 }
Ejemplo n.º 7
0
 public void setClickZoomDownTool()
 {
     try
     {
         base.Document.InvokeScript("setClickZoomOutTool");
         this.m_sTool = MapTool.点击缩小;
     }
     catch
     {
     }
 }
Ejemplo n.º 8
0
 public void setSmallArea_Circle()
 {
     try
     {
         base.Document.InvokeScript("setpointtool");
         this.m_sTool = GisMap.MapTool.设置圆形区域;
     }
     catch
     {
     }
 }
Ejemplo n.º 9
0
 public void setClickZoomUpTool()
 {
     try
     {
         base.Document.InvokeScript("setClickZoomInTool");
         this.m_sTool = MapTool.点击放大;
     }
     catch
     {
     }
 }
Ejemplo n.º 10
0
 public void setDelPoint()
 {
     try
     {
         base.Document.InvokeScript("setpointtool");
         this.m_sTool = MapTool.除标注;
     }
     catch
     {
     }
 }
Ejemplo n.º 11
0
 public void setMapToCenter()
 {
     try
     {
         base.Document.InvokeScript("setpointtool");
         this.m_sTool = MapTool.设置圆形区域;
     }
     catch
     {
     }
 }
Ejemplo n.º 12
0
 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
 }
Ejemplo n.º 13
0
 public void setMeasureTool()
 {
     try
     {
         base.Document.InvokeScript("setmeasuretool");
         this.m_sTool = MapTool.测距;
     }
     catch
     {
     }
 }
Ejemplo n.º 14
0
    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();
    }
Ejemplo n.º 15
0
 public void setMeasureTool()
 {
     try
     {
         base.Document.InvokeScript("setmeasuretool");
         this.m_sTool = MapTool.测距;
     }
     catch
     {
     }
 }
Ejemplo n.º 16
0
 private void setActiveTool(TileType tileType)
 {
     this.activeTool = new TileTypeTool(tileType);
 }
Ejemplo n.º 17
0
 public void setPanTool()
 {
     try
     {
         base.Document.InvokeScript("setpantool");
         this.m_sTool = MapTool.移动;
     }
     catch
     {
     }
 }
Ejemplo n.º 18
0
 public void setZoomUpTool()
 {
     try
     {
         base.Document.InvokeScript("setzoomintool");
         this.m_sTool = MapTool.放大;
     }
     catch
     {
     }
 }
Ejemplo n.º 19
0
 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);
     }
 }
Ejemplo n.º 20
0
 public void setClickZoomUpTool()
 {
     try
     {
         base.Document.InvokeScript("setClickZoomInTool");
         this.m_sTool = MapTool.点击放大;
     }
     catch
     {
     }
 }
Ejemplo n.º 21
0
 public void setPolygonMesTool()
 {
     try
     {
         base.Document.InvokeScript("setPolygonMesTool");
         this.m_sTool = MapTool.多边形量算;
     }
     catch
     {
     }
 }
Ejemplo n.º 22
0
 public void setSmallArea_Circle()
 {
     try
     {
         base.Document.InvokeScript("setpointtool");
         this.m_sTool = GisMap.MapTool.设置圆形区域;
     }
     catch
     {
     }
 }
Ejemplo n.º 23
0
 public void setZoomBoxExTool()
 {
     try
     {
         base.Document.InvokeScript("setZoomBoxExTool");
         this.m_sTool = MapTool.设置矩形区域;
     }
     catch
     {
     }
 }
Ejemplo n.º 24
0
 public void setPathRemoveLastSection()
 {
     try
     {
         base.Document.InvokeScript("sketchBack");
         this.m_sTool = MapTool.设置路线;
     }
     catch
     {
     }
 }
Ejemplo n.º 25
0
 public void setClickZoomDownTool()
 {
     try
     {
         base.Document.InvokeScript("setClickZoomOutTool");
         this.m_sTool = MapTool.点击缩小;
     }
     catch
     {
     }
 }
Ejemplo n.º 26
0
 public void setPathTool()
 {
     try
     {
         base.Document.InvokeScript("setpathtool");
         this.m_sTool = MapTool.设置路线;
     }
     catch
     {
     }
 }
Ejemplo n.º 27
0
 public void setRectangleMesTool()
 {
     try
     {
         base.Document.InvokeScript("setRectangleMesTool");
         this.m_sTool = MapTool.矩形量算;
     }
     catch
     {
     }
 }
Ejemplo n.º 28
0
 public void setQuerySearchCar()
 {
     try
     {
         base.Document.InvokeScript("setZoomBoxExTool");
         this.m_sTool = MapTool.日期查车;
     }
     catch
     {
     }
 }
Ejemplo n.º 29
0
 public void setMapToCenter()
 {
     try
     {
         base.Document.InvokeScript("setpointtool");
         this.m_sTool = MapTool.设置圆形区域;
     }
     catch
     {
     }
 }
Ejemplo n.º 30
0
 public void setZoomDownTool()
 {
     try
     {
         base.Document.InvokeScript("setzoomouttool");
         this.m_sTool = MapTool.缩小;
     }
     catch
     {
     }
 }
Ejemplo n.º 31
0
 public void setDelPoint()
 {
     try
     {
         base.Document.InvokeScript("setpointtool");
         this.m_sTool = MapTool.删除标注;
     }
     catch
     {
     }
 }
Ejemplo n.º 32
0
 public void setZoomToCenter()
 {
     try
     {
         base.Document.InvokeScript("setZoomToCenter");
         this.m_sTool = MapTool.中心点;
     }
     catch
     {
     }
 }
Ejemplo n.º 33
0
 public void setShowHintTool()
 {
     try
     {
         base.Document.InvokeScript("setShowHintTool");
         this.m_sTool = MapTool.箭头;
     }
     catch
     {
     }
 }
Ejemplo n.º 34
0
 public void setPointTool()
 {
     try
     {
         base.Document.InvokeScript("setpointtool");
         this.m_sTool = MapTool.标注地图;
     }
     catch
     {
     }
 }
Ejemplo n.º 35
0
 public void setRegionTool()
 {
     try
     {
         base.Document.InvokeScript("setregiontool");
         this.m_sTool = MapTool.设置区域;
     }
     catch
     {
     }
 }
Ejemplo n.º 36
0
 public void setSmallArea()
 {
     try
     {
         base.Document.InvokeScript("setZoomBoxExTool");
         this.m_sTool = MapTool.小范围电召;
     }
     catch
     {
     }
 }