/// <summary> /// Indicates that the sequence files have to be /// parsed. /// </summary> /// <param name="sender">OpenFileDialog instance</param> /// <param name="e">Event data</param> private void OnFileImport(object sender, ImportFileEventArgs e) { this.fileInfo = e.FileInfo; if (this.ImportFile != null) { this.ImportFile(sender, e); } }
/// <summary> /// On import button click would inform the controller to import files, /// would also pass the list of filenames and the molecule type as event args. /// </summary> /// <param name="sender">Framework Element</param> /// <param name="e">Routed event args</param> private void OnImportButtonClick(object sender, RoutedEventArgs e) { //// Creates the collection of the File names. foreach (string file in this.fileNames) { FileInfo info = new FileInfo(file); if (this.fileInfo == null) { this.fileInfo = new Collection <FileSystemInfo>(); } this.fileInfo.Add(info); } ImportFileEventArgs importArgs = new ImportFileEventArgs(this.fileNames, this.molecule, this.fileInfo, this.selectedParserName); buttonPanel.Visibility = Visibility.Collapsed; animationPanel.Visibility = Visibility.Visible; if (this.ImportFile != null) { this.ImportFile(sender, importArgs); } }