private void btnInputFile_Click(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); ofd.DefaultExt = ".xls"; // Default file extension ofd.Filter = "Excel documents|*.xlsx"; // Filter files by extension if (ofd.ShowDialog() == DialogResult.OK) { inputFileTextBox.Text = ofd.FileName; inputFileTextBox.SelectionStart = inputFileTextBox.Text.Length; inputFileTextBox.ScrollToCaret(); inputFileTextBox.Refresh(); } Data = null; }
private void tbInputFile_TextChanged(object sender, EventArgs e) { EnableControl(controlsGroupBox, File.Exists(inputFileTextBox.Text)); Data = null; ReportStatus("Ready to serve you, Master!"); }