コード例 #1
0
ファイル: Form1.cs プロジェクト: vjb-tmh/dotnet
 // Help button
 private void materialRaisedButton1_Click(object sender, EventArgs e)
 {
     string colName = HelpPrompt.ShowDialog("To use this program, first convert your data into a tab delimited file.\n\n" +
                                            "After loading the file, you can edit the data, add rows/columns,\nand save the data back to a tab delimited file.\n\n" +
                                            "The file can then be loaded into a spreadsheet or database.\n\n" +
                                            "Support: [email protected]", "Help");
 }
コード例 #2
0
ファイル: Form1.cs プロジェクト: vjb-tmh/dotnet
        // Add a column button
        private void addCol_Click(object sender, EventArgs e)
        {
            string colName = Prompt.ShowDialog("Column Name", "Enter New Column Name");

            // Check that a file is selected
            if (thePath == "")
            {
                HelpPrompt.ShowDialog("No file selected!\n\n" +
                                      "Please select a file before adding columns.\n\n" +
                                      "To load a file, click the Load File button and navigate to your file.\n\n" +
                                      "The file should be in a tab delimited format before attempting to load it.", "Warning");
                return;
            }

            // Reload data table with new column
            var dt = readCSVwithCol(thePath, colName);

            this.dataGridView1.Visible = true;
            dataGridView1.DataSource   = dt;
        }