예제 #1
0
        private void InitializeComposedGraph(ProfileLine profileLine, ProfileSurface profileSurface)
        {
            profileLine.Id                  = 1;
            profileSurface.LineId           = 1;
            _profileSession.ProfileLines    = new ProfileLine[] { profileLine };
            _profileSession.ProfileSurfaces = new ProfileSurface[] { profileSurface };
            _profileSession.SetSegments(profileLine.SpatialReference);

            _surfaceProfileChart.IsGraphEmptyHandler(false);
            _surfaceProfileChart.InitializeGraph();
            _surfaceProfileChart.SetControlSize();
        }
예제 #2
0
        internal void AddProfileToList(ProfileSession profile)
        {
            bool isAddToGraphics = false;

            isAddToGraphics = View.AddNodeToTreeView(profile);

            //Add Profile to the working list
            _workingProfiles.Add(profile);

            //Add graphics
            if (isAddToGraphics)
            {
                var spatialReference = ArcMap.Document.FocusMap.SpatialReference;

                if (profile.DefinitionType == ProfileSettingsTypeEnum.Primitives)
                {
                    profile.Segments = ProfileLinesConverter.GetSegmentsFromProfileLine(profile.ProfileSurfaces, spatialReference);
                    GraphicsLayerManager.AddLinesToWorkingGraphics(ProfileLinesConverter.ConvertLineToPrimitivePolylines(profile.ProfileSurfaces[0],
                                                                                                                         spatialReference),
                                                                   profile.SessionId,
                                                                   profile.Segments.First());
                }
                else
                {
                    profile.SetSegments(spatialReference);
                    GraphicsLayerManager.AddLinesToWorkingGraphics(ProfileLinesConverter.ConvertSolidGroupedLinesToEsriPolylines(profile.Segments, spatialReference),
                                                                   profile.SessionId);
                }
            }

            GraphicsLayerManager.EmptyProfileGraphics(MilSpaceGraphicsTypeEnum.Calculating);
        }