本文整理汇总了C#中Section.GetDefaultView方法的典型用法代码示例。如果您正苦于以下问题:C# Section.GetDefaultView方法的具体用法?C# Section.GetDefaultView怎么用?C# Section.GetDefaultView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Section
的用法示例。
在下文中一共展示了Section.GetDefaultView方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateSketch
public List<string> CreateSketch(Section section, Section symmetricSection, CampaignReport campaignReport, List<SteelThicknessGaugingPoint> steelThicknessGaugingPoints, out SortedList<int, List<SteelThicknessGaugingPoint>> pointsPerSketch)
{
try
{
if (section == null)
{
throw new ArgumentNullException("section");
}
if (symmetricSection == null)
{
throw new ArgumentNullException("symmetricSection");
}
if (campaignReport == null)
{
throw new ArgumentNullException("campaignReport");
}
int index = 0;
pointsPerSketch = new SortedList<int, List<SteelThicknessGaugingPoint>>();
if (!section.SectionType.Name.Equals("Shell") && !section.SectionType.Name.Equals("Longitudinal") &&
!section.SectionType.Name.Equals("LongitudinalBulkheads") && !symmetricSection.SectionType.Name.Equals("Shell") &&
!symmetricSection.SectionType.Name.Equals("Longitudinal") && !symmetricSection.SectionType.Name.Equals("LongitudinalBulkheads")
)
{
return null;
}
string sectionDrawerCurrentViewModeName = section.SectionDrawer.CurrentViewModeName;
section.SectionDrawer.CurrentViewModeName = "SketchFormat";
Vessel vessel = section.Vessel;
Document document = vessel.Document as Document;
if (!this.sectionThumbnails.ContainsKey(vessel.GUID))
{
this.sectionThumbnails.Add(vessel.GUID, new Dictionary<int, Bitmap>());
}
if (!this.sectionThumbnails[vessel.GUID].ContainsKey(section.ID))
{
this.sectionThumbnails[vessel.GUID].Add(section.ID, null);
}
if (this.sectionThumbnails[vessel.GUID][section.ID] == null)
{
CaptionsModel.Instance.SetCaptionPropertySelection("Plate", "IACSSketchDescription", false);
section.SectionDrawer.CurrentViewModeName = "Wireframe";
section.SectionDrawer.ConfigureView(this.glPanel, section.GetDefaultView(), true);
section.SectionDrawer.UpdateLastCamera(this.glPanel);
section.SectionDrawer.DrawAxis = false;
bool isWireframeVisible = ViewModesData.Instance.IsVisible(section.SectionDrawer.CurrentViewModeName, "Wireframe");
if (!isWireframeVisible)
{
ViewModesData.Instance.SetVisibility(section.SectionDrawer.CurrentViewModeName, "Wireframe", true, true);
}
Bitmap bitmap = section.SectionDrawer.DrawModelImmediateMode(this.glPanel);
if (!isWireframeVisible)
{
ViewModesData.Instance.SetVisibility(section.SectionDrawer.CurrentViewModeName, "Wireframe", false, true);
}
section.SectionDrawer.DrawAxis = true;
this.sectionThumbnails[vessel.GUID][section.ID] = bitmap;
section.SectionDrawer.CurrentViewModeName = "SketchFormat";
CaptionsModel.Instance.SetCaptionPropertySelection("Plate", "IACSSketchDescription", true);
}
Bitmap originalThumbnail = this.sectionThumbnails[vessel.GUID][section.ID];
List<string> bitmaps = new List<string>();
List<SteelThicknessGaugingPoint> sectionSteelThicknessGaugingPoints = new List<SteelThicknessGaugingPoint>();
List<SteelThicknessGaugingPoint> symmetricSteelThicknessGaugingPoints = new List<SteelThicknessGaugingPoint>();
foreach (SteelThicknessGaugingPoint steelThicknessGaugingPoint in steelThicknessGaugingPoints)
{
if (steelThicknessGaugingPoint.Section.ID == section.ID)
{
sectionSteelThicknessGaugingPoints.Add(steelThicknessGaugingPoint);
}
else if (steelThicknessGaugingPoint.Section.ID == symmetricSection.ID)
{
symmetricSteelThicknessGaugingPoints.Add(steelThicknessGaugingPoint);
}
}
if (sectionSteelThicknessGaugingPoints != null || symmetricSteelThicknessGaugingPoints != null)
{
#region Old Code
//int numberOfSketches = 9;
//.........这里部分代码省略.........