Пример #1
0
        private void SampleCSV(CSVData csv)
        {
            string outputL = "";

            foreach (string l in csv.headers)
            {
                outputL += "[" + l + "]";
            }
            Console.WriteLine(outputL);

            foreach (List <string> r in csv.content)
            {
                string outputC = "";
                foreach (string s in r)
                {
                    outputC += "[" + s + "]";
                }
                Console.WriteLine(outputC);
            }
        }
Пример #2
0
        // Draw Tab

        private void drawTabView(CSVData csv)
        {
            for (int i = 0; i < csv.headers.Count; i++)
            {
                CreateTabObject <Label>("header_" + i, csv.headers[i], new Point(30 + (i * 150), 20), new Size(125, 23), true).Click += new EventHandler(label_Edit);
            }

            for (int row = 0; row < csv.content.Count; row++)
            {
                for (int col = 0; col < csv.content[row].Count; col++)
                {
                    CreateTabObject <TextBox>("content_" + row + "_" + col, csv.content[row][col], new Point(30 + (col * 150), 60 + (row * 25)), new Size(125, 23)).TextChanged += new EventHandler(textbox_Changed);
                }
            }

            CreateTabObject <Button>("add header button", "+", new Point(30 + (csv.headers.Count * 150), 20), new Size(125, 23));
            CreateTabObject <Button>("add row button", "+", new Point(30, 60 + (csv.content.Count * 25)), new Size(125, 23));

            SampleCSV(csv);
        }