private void OKANDCHOOSEANOTHERCOLUMN_Click(object sender, EventArgs e) { THEORDEROFTHECOLUMN openForm2 = new THEORDEROFTHECOLUMN(); openForm2.Show(); this.Hide(); }
private void GOTOSECONDFORM_Click(object sender, EventArgs e) { if ( (string.IsNullOrEmpty(TEXTFILEPATH.Text) || string.IsNullOrEmpty(ROWDELIMITER.Text) || string.IsNullOrEmpty(COLUMNDELIMITER.Text)) && string.IsNullOrEmpty(EXCELFILEPATH.Text) ) { MessageBox.Show("Please enter all needed information", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { if (string.IsNullOrEmpty(ROWDELIMITER.Text) && string.IsNullOrEmpty(COLUMNDELIMITER.Text) && string.IsNullOrEmpty(TEXTFILEPATH.Text)) { Globals.getExcel(); THEORDEROFTHECOLUMN Openform = new THEORDEROFTHECOLUMN(); Openform.Show(); this.Visible = false; } else { if (ROWDELIMITER.Text == COLUMNDELIMITER.Text) { MessageBox.Show("Row delimiter can't be the same as the column delimiter. Please edit the text file.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { if (ROWDELIMITER.Text == "\n") { Globals.rowDelimiter = '\n'; Globals.columDelimiter = COLUMNDELIMITER.Text[0]; } else if (COLUMNDELIMITER.Text == "\n") { Globals.rowDelimiter = ROWDELIMITER.Text[0]; Globals.columDelimiter = '\n'; } else { Globals.rowDelimiter = ROWDELIMITER.Text[0]; Globals.columDelimiter = COLUMNDELIMITER.Text[0]; } Globals.getText(); THEORDEROFTHECOLUMN Openform = new THEORDEROFTHECOLUMN(); Openform.Show(); this.Visible = false; } } } }