コード例 #1
0
        private static void SetFeatureEditorForNetworkCoverage(INetworkCoverageGroupLayer networkCoverageGroupLayer)
        {
            ISnapRule networkCoverageSnapRule = new SnapRule
            {
                Criteria = (layer, feature) => feature is IBranch && ((IBranch)feature).Network == networkCoverageGroupLayer.NetworkCoverage.Network,
                SnapRole = SnapRole.FreeAtObject,
                Obligatory = true,
                PixelGravity = 40,
                NewFeatureLayer = networkCoverageGroupLayer.LocationLayer
            };

            networkCoverageGroupLayer.FeatureEditor = new NetworkLocationFeatureEditor(networkCoverageGroupLayer);

            var locationFeatureEditor = new NetworkLocationFeatureEditor(networkCoverageGroupLayer) { SnapRules = { networkCoverageSnapRule } };

            networkCoverageGroupLayer.LocationLayer.FeatureEditor = locationFeatureEditor;
        }
コード例 #2
0
        private static void SetFeatureEditorForNetworkCoverage(INetworkCoverageGroupLayer networkCoverageGroupLayer)
        {
            ISnapRule networkCoverageSnapRule = new SnapRule
            {
                Criteria        = (layer, feature) => feature is IBranch && ((IBranch)feature).Network == networkCoverageGroupLayer.NetworkCoverage.Network,
                SnapRole        = SnapRole.FreeAtObject,
                Obligatory      = true,
                PixelGravity    = 40,
                NewFeatureLayer = networkCoverageGroupLayer.LocationLayer
            };

            networkCoverageGroupLayer.FeatureEditor = new NetworkLocationFeatureEditor(networkCoverageGroupLayer);

            var locationFeatureEditor = new NetworkLocationFeatureEditor(networkCoverageGroupLayer)
            {
                SnapRules = { networkCoverageSnapRule }
            };

            networkCoverageGroupLayer.LocationLayer.FeatureEditor = locationFeatureEditor;
        }