当前位置: 首页>>代码示例>>C#>>正文


C# PointPairList.LongCount方法代码示例

本文整理汇总了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);
        }
开发者ID:seth-obi-msci,项目名称:CSharp,代码行数:43,代码来源:Form1.cs

示例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);
            }
        }
开发者ID:seth-obi-msci,项目名称:CSharp,代码行数:23,代码来源:Form1.cs


注:本文中的ZedGraph.PointPairList.LongCount方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。