示例#1
0
        public static Geometry.Vector?point(string tip)
        {
            PickPointTool pp = new PickPointTool();

            ViewerToolManager.AddTool(pp);
            CursorTipTool ct = new CursorTipTool(tip);

            ViewerToolManager.AddTool(ct);
            MapControl.Current.Cursor = System.Windows.Input.Cursors.Cross;

            while (true)
            {
                Dreambuild.Gis.Desktop.App.DoEvents();
                if (pp.Picked)
                {
                    break;
                }
            }

            ViewerToolManager.RemoveTool(ct);
            //MainWindow.Current.InitializeTool();
            ViewerToolManager.RemoveTool(pp);
            MapControl.Current.Cursor = System.Windows.Input.Cursors.Arrow;
            return(pp.Point);
        }
示例#2
0
        public override void ExitToolHandler()
        {
            base.ExitToolHandler();

            var tools = ViewerToolManager.Tools.ToList();

            tools.ForEach(tool =>
            {
                if (tool is SelectNodeTool || tool is EditNodeTool)
                {
                    ViewerToolManager.RemoveTool(tool);
                }
            });
        }
示例#3
0
        public static Extents extents(string tip)
        {
            PickExtentsTool pe = new PickExtentsTool();

            ViewerToolManager.AddTool(pe);
            CursorTipTool ct = new CursorTipTool(tip);

            ViewerToolManager.AddTool(ct);
            MapControl.Current.Cursor = System.Windows.Input.Cursors.Cross;

            while (true)
            {
                Dreambuild.Gis.Desktop.App.DoEvents();
                if (pe.Picked)
                {
                    break;
                }
            }

            ViewerToolManager.RemoveTool(ct);
            ViewerToolManager.RemoveTool(pe);
            MapControl.Current.Cursor = System.Windows.Input.Cursors.Arrow;
            return(pe.Extents);
        }