コード例 #1
0
        protected override void OnMouseDown(MouseEventArgs arg)
        {
            ConfigUtil.type = "water";
            double SnapTol            = ConfigUtil.GetConfigValue("Trace_Click_Point_Tolerence", 5.0);
            bool   traceIndeterminate = ConfigUtil.GetConfigValue("TraceFlow_Interminate", false);
            string selectFeatures     = ConfigUtil.GetConfigValue("Trace_Return_Selection", "false");
            bool   selectEdges;

            if (selectFeatures.ToUpper() == "true".ToUpper() && Control.ModifierKeys == Keys.Control)
            {
                selectEdges = false;
            }
            else if (selectFeatures.ToUpper() == "true".ToUpper())
            {
                selectEdges = true;
            }
            else if (selectFeatures.ToUpper() == "false".ToUpper() && Control.ModifierKeys == Keys.Control)
            {
                selectEdges = true;
            }
            else
            {
                selectEdges = false;
            }

            IPoint point = ArcMap.Document.CurrentLocation;

            GeoNetTools.TraceFlow(ref point, ArcMap.Application, esriFlowMethod.esriFMUpstream, SnapTol, traceIndeterminate, selectEdges);


            point = null;
        }
        protected override void OnMouseDown(MouseEventArgs arg)
        {
            double SnapTol            = ConfigUtil.GetConfigValue("Trace_Click_Point_Tolerence", 5.0);
            bool   traceIndeterminate = ConfigUtil.GetConfigValue("TraceFlow_Interminate", false);
            bool   selectEdges        = false;

            if (Control.ModifierKeys == Keys.Control)
            {
                selectEdges = true;
            }
            else
            {
                selectEdges = false;
            }
            IPoint point = ArcMap.Document.CurrentLocation;

            GeoNetTools.TraceFlow(ref point, ArcMap.Application, esriFlowMethod.esriFMUpstream, SnapTol, traceIndeterminate, selectEdges);


            point = null;
        }