本文整理汇总了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++;
示例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);
}
}
}