本文整理汇总了C#中System.Windows.Forms.DataVisualization.Charting.Chart.Dispose方法的典型用法代码示例。如果您正苦于以下问题:C# Chart.Dispose方法的具体用法?C# Chart.Dispose怎么用?C# Chart.Dispose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.DataVisualization.Charting.Chart
的用法示例。
在下文中一共展示了Chart.Dispose方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DumpColRowsPlot
//.........这里部分代码省略.........
tg.NColumns, tg.NRows, tg.ThumbWidth, tg.ThumbHeight,
wastedWidth, wastedHeight,
extraWidth, extraHeight,
newContainer.Width, newContainer.Height,
extraWidthPercent, extraHeightPercent,
newContainer.AspectRatio
));
int index;
if (plotThresholds)
{
index = seriesWW.Points.AddXY (aspectRatio, wastedWidth * 100.0);
if (wastedWidth == 0.0)
seriesWW.Points[index].IsEmpty = true;
index = seriesWH.Points.AddXY (aspectRatio, wastedHeight * 100.0);
if (wastedHeight == 0.0)
seriesWH.Points[index].IsEmpty = true;
}
seriesNCols.Points.AddXY (aspectRatio, tg.NColumns);
seriesNRows.Points.AddXY (aspectRatio, tg.NRows);
}
chartArea.RecalculateAxesScale ();
AddARAnnotation (chart, "Fullscreen 4:3\n(1.33)", 1.33, annotationFont, plotThresholds);
AddARAnnotation (chart, "HD 16:9\n(1.78)", 1.78, annotationFont, plotThresholds);
AddARAnnotation (chart, "Widescreen\n(1.85)", 1.85, annotationFont, plotThresholds);
AddARAnnotation (chart, "CinemaScope\n(2.35)", 2.35, annotationFont, plotThresholds);
AddARAnnotation (chart, "Ultra-Panavision\n(2.76)", 2.76, annotationFont, plotThresholds);
AddARAnnotation (chart,
String.Format ("Layout Threshold\n({0:F2})",
crossoverThreshold),
crossoverThreshold,
_tnSettings.LayoutMode == ThumbnailSettings.LayoutModes.Auto ?
annotationFont : annotationItFont,
plotThresholds,
true);
if (_tnSettings.RCOptimization && plotThresholds)
{
switch (_tnSettings.LayoutMode)
{
case ThumbnailSettings.LayoutModes.Auto:
if (_tnSettings.WidthThreshold == _tnSettings.HeightThreshold)
AddThresholdAnnotation (chart,
String.Format ("Width & Height Threshold\n" +
"({0:F2})", _tnSettings.WidthThreshold),
_tnSettings.WidthThreshold,
annotationFont);
else
{
AddThresholdAnnotation (chart,
String.Format ("Width Threshold\n" +
"({0:F2})", _tnSettings.WidthThreshold),
_tnSettings.WidthThreshold,
annotationFont);
AddThresholdAnnotation (chart,
String.Format ("Height Threshold\n" +
"({0:F2})", _tnSettings.HeightThreshold),
_tnSettings.HeightThreshold,
annotationFont);
}
break;
case ThumbnailSettings.LayoutModes.RowPriority:
AddThresholdAnnotation (chart,
String.Format ("Width Threshold\n" +
"({0:F2})", _tnSettings.WidthThreshold),
_tnSettings.WidthThreshold,
annotationFont);
break;
case ThumbnailSettings.LayoutModes.ColumnPriority:
AddThresholdAnnotation (chart,
String.Format ("Height Threshold\n" +
"({0:F2})", _tnSettings.HeightThreshold),
_tnSettings.HeightThreshold,
annotationFont);
break;
}
}
chart.SaveImage (filename, Charting.ChartImageFormat.Png);
THelper.Information ("'{0}' created.", filename);
labelStyle1.Dispose ();
labelStyle2.Dispose ();
labelStyle3.Dispose ();
titleFont.Dispose ();
subTitleFont.Dispose ();
axisFont.Dispose ();
annotationFont.Dispose ();
annotationItFont.Dispose ();
chart.Dispose ();
}