private void Button_Click(object sender, RoutedEventArgs e)
        {
            OpenFileDialog dialog = new OpenFileDialog();
              dialog.Filter = "CSV Files (*.csv)|*.csv|All files (*.*)|*.*";
              dialog.FilterIndex = 1;
              dialog.Multiselect = false;

              bool? ok = dialog.ShowDialog();

              if (ok == true) {
            this.file = new File(dialog.File);
            this.RefreshText();
            this.OnFileSelected(new FileSelectedEventArgs(this.file));
              }
        }
 public FileSelectedEventArgs(File file)
 {
     this.file = file;
 }