本文整理汇总了C#中CsvFileReader.ReadLine方法的典型用法代码示例。如果您正苦于以下问题:C# CsvFileReader.ReadLine方法的具体用法?C# CsvFileReader.ReadLine怎么用?C# CsvFileReader.ReadLine使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CsvFileReader
的用法示例。
在下文中一共展示了CsvFileReader.ReadLine方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: createAndSaveFrameImg
void createAndSaveFrameImg()
{
try
{
using (CsvFileReader myFileReader = new CsvFileReader(CorrDataFileName))
{
for (int i = 0; i < CurrentInterval.Value.start - 1; i++)
{
myFileReader.ReadLine();
myFileReader.ReadLine();
}
Bitmap myBitmap = new Bitmap(ImWidth, ImHeight);
for (int i = CurrentInterval.Value.start; i <= CurrentInterval.Value.end; i++)
{
CorrData myCorrData;
myFileReader.ReadCorrData(out myCorrData);
for (int j = 0; j < myCorrData.Corrout_abs.Length && j < myCorrData.distance.Length; j++)
{
double theta = myCorrData.angle / 360.0 * 2 * Math.PI;
double r = ImHeight * (myCorrData.distance[j] - 15.0) / normalizeConstant; // subtract local leakage offset and normalize to image size
if (r < 0)
{
continue;
}
Int32 nx = clipIndex(r * Math.Sin(theta) + 0.5 * ImWidth, ImWidth - 1);
Int32 ny = clipIndex(ImHeight - r * Math.Cos(theta), ImHeight - 1);
int intensity = (int)(255.0 * myCorrData.Corrout_abs[j]);
myBitmap.SetPixel(nx, ny, Color.FromArgb(intensity, intensity, intensity));
}
}
myBitmap.Save(CurrentInterval.Value.imgFileName,ImageFormat.Bmp);
}
}
catch (IOException)
{
throw;
}
}