本文整理汇总了C#中Section.AddRange方法的典型用法代码示例。如果您正苦于以下问题:C# Section.AddRange方法的具体用法?C# Section.AddRange怎么用?C# Section.AddRange使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Section
的用法示例。
在下文中一共展示了Section.AddRange方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ConstructReportSection
protected Section ConstructReportSection(ReportSections section, CycleList cycles)
{
Section sec = null;
if (!(bool)selectedReportSections.GetValue((int)section))
return sec;
try
{
switch (section)
{
// these have multiple rows based on the report content
case ReportSections.CycleSource:
sec = new Section(typeof(CycleSource), 1, 1, 1, "Cycle");
sec[1].Add(0, "Cycle source");
break;
case ReportSections.MultiplicityDistributions:
sec = DoAcrossForManyMults("Cycle multiplicity distributions", typeof(eMultiplicityDistributions), true);
break;
case ReportSections.ChannelCounts:
break;
case ReportSections.ChannelRates:
break;
case ReportSections.ComputedMultiplicityIntermediates:
sec = DoAcrossForManyMults("Cycle moments (NNV)", typeof(ComputedMultiplicityIntermediates), true);
break;
case ReportSections.RawCycles:
{
ConstructedSource src = ConstructedSource.Unknown;
InstrType inst = InstrType.Unknown;
if (cycles.Count > 0)
{
src = cycles[0].DataSourceId.source;
inst = cycles[0].DataSourceId.SRType;
}
if (cycles.Count > 0 && src.MightHaveScalerData(inst)) // anything that might have Scaler data
sec = DoAcrossForManyMults("Cycle raw data", typeof(INCCCycles), true);
else
sec = DoAcrossForManyMults("Cycle raw data", typeof(RawCycles), true);
}
break;
case ReportSections.DTCRateCycles:
sec = DoAcrossForManyMults("Cycle DTC rate data", typeof(DTCRateCycles), true);
break;
case ReportSections.RateCycles:
sec = DoAcrossForManyMults("Cycle rate data", typeof(RateCycles), true);
break;
case ReportSections.RepResults:
break;
case ReportSections.RepDytlewskiResults:
break;
}
if (sec == null) // no mult-based data
return sec;
Row[] temp = null;
foreach (Cycle cyc in cycles)
{
switch (section)
{
// these have multiple rows based on the report content
case ReportSections.MultiplicityDistributions:
int repeat = meas.CountingAnalysisResults.GetResultsCount(typeof(Multiplicity));
temp = GenMultDistRows(cyc.CountingAnalysisResults, cyc.seq); // done: uses # of analyzers and goes across
Section sec2 = new Section(typeof(eMultiplicityDistributions), 0, 0, temp.Length, "Cycle " + cyc.seq, repeat);
sec.AddRange(sec2);
sec.AddRange(temp);
break;
case ReportSections.ChannelCounts:
// sec.Add(GenChannelCountsRows(cyc));
break;
case ReportSections.ChannelRates:
// sec.Add(GenChannelCountsRows(cyc));
break;
case ReportSections.ComputedMultiplicityIntermediates:
temp = GenMultiplicityIntermediatesRow(cyc.CountingAnalysisResults, cyc); // alpha and beta are only in the summary because they do not change (gatelength-based)
sec.AddRange(temp);
break;
case ReportSections.RawCycles:
if (cyc.DataSourceId.source.SRDAQ(cyc.DataSourceId.SRType))
sec.Add(GenINCCCycleRow(cyc));
else
sec.Add(GenRawCycleRow(cyc)); // done: uses # of analyzers and goes across
break;
case ReportSections.DTCRateCycles:
sec.Add(GenRateCycleRow(cyc, dtc:true)); // # of analyzers and goes across
break;
case ReportSections.RateCycles:
sec.Add(GenRateCycleRow(cyc));
break;
case ReportSections.RepResults:
// sec.Add(GenResultsCycleRow(cyc));
break;
case ReportSections.RepDytlewskiResults:
// sec.Add(GenDytlewskiResultsCycleRow(cyc));
break;
case ReportSections.CycleSource:
sec.Add(GenCycleSourceRow(cyc));
break;
}
}
}
//.........这里部分代码省略.........