Beispiel #1
0
        //Writes data in lists to .al files...
        private void WriteToFile(string path)
        {
            List <string> sampleNames = new List <string>();

            List <string> treeNodePaths = new List <string>();
            List <string> sampleIndices = new List <string>();

            for (int i = 0; i < Sample.lst_Samples.Count; i++)
            {
                foreach (TreeNode treeNode in GetAllNodes(treeViewSample))
                {
                    if (((CustomTreeNode)treeNode).SampleIndex == i)
                    {
                        sampleNames.Add(treeNode.Text);
                        treeNodePaths.Add(treeNode.FullPath);
                        sampleIndices.Add(Convert.ToString(((CustomTreeNode)treeNode).SampleIndex));
                    }
                }
            }


            FileOperator fo = new FileOperator();

            fo.WriteTextFile(path, sampleNames, Sample.lst_Samples, Sample.lst_Colors, Sample.lst_State, treeNodePaths, sampleIndices);
        }