当前位置: 首页>>代码示例>>C#>>正文


C# Section.AddPermanentDomainEntityToGroup方法代码示例

本文整理汇总了C#中Section.AddPermanentDomainEntityToGroup方法的典型用法代码示例。如果您正苦于以下问题:C# Section.AddPermanentDomainEntityToGroup方法的具体用法?C# Section.AddPermanentDomainEntityToGroup怎么用?C# Section.AddPermanentDomainEntityToGroup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Section的用法示例。


在下文中一共展示了Section.AddPermanentDomainEntityToGroup方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateSketch


//.........这里部分代码省略.........
                        Point3D closestPoint;
                        SectionElement sectionElement = section.PointOverDomainEntity(pointPosition, elementTypeNames, 0.01, out closestPoint, out geometryID, out geometryPartID) as SectionElement;
                        if (sectionElement == null)
                        {
                            continue;
                        }

                        AverageSteelThicknessGaugingPoint averageSteelThicknessGaugingPoint = new AverageSteelThicknessGaugingPoint();

                        averageSteelThicknessGaugingPoint.PointGeometry.Position = pointPosition;
                        averageSteelThicknessGaugingPoint.PointGeometry.Normal = pointNormal;

                        averageSteelThicknessGaugingPoint.Section = section;
                        averageSteelThicknessGaugingPoint.Campaign = campaignReport.Campaign;
                        averageSteelThicknessGaugingPoint.CampaignReport = campaignReport;
                        averageSteelThicknessGaugingPoint.TargetElement = sectionElement as IWorkableElement;
                        averageSteelThicknessGaugingPoint.TargetElementGeometryID = geometryID;
                        averageSteelThicknessGaugingPoint.TargetElementGeometrySegmentID = geometryPartID;
                        averageSteelThicknessGaugingPoint.TargetElementPart = sourceGaugingPoint.TargetElementPart;
                        averageSteelThicknessGaugingPoint.Active = true;
                        averageSteelThicknessGaugingPoint.GaugingValue = sourceGaugingPoint.GaugingValue;

                        averageSteelThicknessGaugingPoint.IACSReportLocationData.ID = sourceGaugingPoint.IACSReportLocationData.ID;
                        averageSteelThicknessGaugingPoint.IACSReportLocationData.SetColumnNull();
                        averageSteelThicknessGaugingPoint.IACSReportLocationData.Strake = sourceGaugingPoint.IACSReportLocationData.Strake;
                        averageSteelThicknessGaugingPoint.IACSReportLocationData.IsPortSide = !(bool)sourceGaugingPoint.IACSReportLocationData.IsPortSide;

                        averageSteelThicknessGaugingPoint.Name = averageSteelThicknessGaugingPoint.IACSReportLocationData.ID.ToString();

                        //#if (DEBUG)
                        //                        newFrontGaugingPoint.Name += ((bool)newFrontGaugingPoint.IACSReportLocationData.IsPortSide) ? " P " : " S ";
                        //#endif

                        section.AddPermanentDomainEntityToGroup(averageSteelThicknessGaugingPoint, true, false);
                        //section.Vessel.Document.DocumentStateController.BroadcastEntityCreation(this, averageSteelThicknessGaugingPoint);

                        targetGaugingPoints.Add(averageSteelThicknessGaugingPoint);
                        pointsToBeDeleted.Add(averageSteelThicknessGaugingPoint);
                    }

                    #endregion

                    List<SectionElement> sectionElements = this.GetSectionElementsVisibleInSketch(section, targetGaugingPoints);

                    // Generate thumbnail
                    Bitmap thumbnail = originalThumbnail.Clone() as Bitmap;

                    Rectangle rectangle = this.GetRectangleOfRenderizedArea(sectionElements);
                    for (int i = 0; i < thumbnail.Width; i++)
                    {
                        for (int j = 0; j < thumbnail.Height; j++)
                        {
                            if (this.IsPixelOfRectangle(i, j, rectangle, 3))
                            {
                                thumbnail.SetPixel(i, j, Color.Red);
                            }
                        }
                    }

                    //int newWidht = (int)(thumbnail.Width / 5);
                    //int newHeight = (int)(thumbnail.Height / 5);
                    //Image image = thumbnail.GetThumbnailImage(newWidht, newHeight, null, IntPtr.Zero);
                    //thumbnail = new Bitmap(image);

                    string thumbName = thumbnail.RawFormat.Guid.ToString() + "-" + this.bitmapCount.ToString() + ".jpg";
                    this.bitmapCount++;
开发者ID:phdsoft,项目名称:Teste_de_Codigo,代码行数:67,代码来源:CampaignConverter.cs

示例2: AddAverageGaugingPointsInSection

        private void AddAverageGaugingPointsInSection(Section section, List<SteelThicknessGaugingPoint> averageGaugingPoints)
        {
            if (averageGaugingPoints != null)
            {
                foreach (SteelThicknessGaugingPoint averageGaugingPoint in averageGaugingPoints)
                {
                    averageGaugingPoint.Name = averageGaugingPoint.IACSReportLocationData.ID.ToString();
                    averageGaugingPoint.Section = section;
                    averageGaugingPoint.Campaign = this.averageCampaign;
                    averageGaugingPoint.CampaignReport = this.currentAverageCampaignReport;

                    section.AddPermanentDomainEntityToGroup(averageGaugingPoint, true, false);
                    this.steelThicknessGaugingPointVerifier.DoVerifyCompartments(averageGaugingPoint);
                }
            }
        }
开发者ID:phdsoft,项目名称:Teste_de_Codigo,代码行数:16,代码来源:CampaignConverter.cs


注:本文中的Section.AddPermanentDomainEntityToGroup方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。