本文整理汇总了C#中ZedGraph.PointPairList.LongCount方法的典型用法代码示例。如果您正苦于以下问题:C# PointPairList.LongCount方法的具体用法?C# PointPairList.LongCount怎么用?C# PointPairList.LongCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZedGraph.PointPairList
的用法示例。
在下文中一共展示了PointPairList.LongCount方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SaveBothListsToFile
// function to save both graphs' data
public void SaveBothListsToFile(string FileLocation, PointPairList listA, PointPairList listB)
{
MetaData(1)[4] = this.filedescription.Text;
string LHSfile = FileLocation + "Pane1.txt";
string RHSfile = FileLocation + "Pane2.txt";
File.AppendAllText(LHSfile, "Data from Pane1 Graph" + "\r\n");
File.AppendAllText(LHSfile, MetaData(1)[0] + "\r\n");
File.AppendAllText(LHSfile, MetaData(1)[1] + "\r\n");
File.AppendAllText(LHSfile, MetaData(1)[2] + "\r\n");
File.AppendAllText(LHSfile, MetaData(1)[3] + "\r\n");
File.AppendAllText(LHSfile, MetaData(1)[4] + "\r\n");
// Array of values to be saved (LHS Graph)
double[][] SaveArray1 = new double[Convert.ToInt32(listA.LongCount())][];
SaveArray1[0] = listA.Select(P => P.X).ToArray();
SaveArray1[1] = listA.Select(P => P.Y).ToArray();
for (int j = 0; j < SaveArray1.Length; j++)
{
string Reading = SaveArray1[0][j].ToString() + "\t" + SaveArray1[1][j] + "\r\n";
File.AppendAllText(LHSfile, Reading);
}
File.AppendAllText(RHSfile, "Data from Pane2 Graph" + "\r\n");
File.AppendAllText(RHSfile, MetaData(2)[0] + "\r\n");
File.AppendAllText(RHSfile, MetaData(2)[1] + "\r\n");
File.AppendAllText(RHSfile, MetaData(2)[2] + "\r\n");
File.AppendAllText(RHSfile, MetaData(2)[3] + "Environment time = " + Convert.ToString(Environment.TickCount - tickStart) + "\r\n");
File.AppendAllText(RHSfile, MetaData(2)[4] + "\r\n");
double[][] SaveArray2 = new double[Convert.ToInt32(listB.LongCount())][];
SaveArray2[0] = listB.Select(P => P.X).ToArray();
SaveArray2[1] = listB.Select(P => P.Y).ToArray();
for (int j = 0; j < SaveArray2.Length; j++)
{
string Reading = SaveArray2[0][j].ToString() + "\t" + SaveArray2[1][j].ToString() + "\r\n";
File.AppendAllText(RHSfile, Reading);
}
Reset(zgc);
Reset(Window2.zgc2);
}
示例2: SaveListToFile
// function to save a given list's values to file
public void SaveListToFile(string FileLocation, PointPairList list, int Pane)
{
MetaData(1)[4] = this.filedescription.Text;
//Add some MetaData at beginning of file
File.AppendAllText(FileLocation, MetaData(Pane)[0] + "\r\n");
File.AppendAllText(FileLocation, MetaData(Pane)[1] + "\r\n");
File.AppendAllText(FileLocation, MetaData(Pane)[2] + "\r\n");
File.AppendAllText(FileLocation, MetaData(Pane)[3] + "\r\n");
File.AppendAllText(FileLocation, MetaData(Pane)[4] + "\r\n");
//List converted to array for saving
double[][] SaveArray = new double[Convert.ToInt32(list.LongCount())][];
SaveArray[0] = list.Select(P => P.X).ToArray();
SaveArray[1] = list.Select(P => P.Y).ToArray();
for (int j = 0; j < SaveArray.Length; j++)
{
string Reading = SaveArray[0][j].ToString() + "\t" + SaveArray[1][j] + "\r\n";
File.AppendAllText(FileLocation, Reading);
}
}