From 1fbb85c1016e0530eaa74ac7afaeb2f9b77876f1 Mon Sep 17 00:00:00 2001 From: "Valeriano A.R" Date: Wed, 1 Feb 2017 08:23:44 +0100 Subject: [PATCH] Add filtering to file browser --- FrmCsvViewer.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/FrmCsvViewer.cs b/FrmCsvViewer.cs index 133dcad..a9d896d 100644 --- a/FrmCsvViewer.cs +++ b/FrmCsvViewer.cs @@ -17,6 +17,8 @@ namespace CsvView { OpenFileDialog loadDialog = new OpenFileDialog(); loadDialog.InitialDirectory = Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location); + loadDialog.DefaultExt = "csv"; + loadDialog.Filter = "CSV Files|*.csv|Any File|*"; DialogResult result = loadDialog.ShowDialog(); if (result == DialogResult.OK) {