Example #1
0
        /// <summary>
        /// Implementation for <see cref="ExportResultsCommand" />.
        /// Exports results of a data set to a file.
        /// </summary>
        private void ExportResultsImplementation()
        {
            var exportDatasetViewModel = new ExportDatasetViewModel(this.dialogService, this.DataSets);

            if (this.dialogService.ExportDatasetWindow(exportDatasetViewModel))
            {
                var writer = new IcFileWriter(exportDatasetViewModel.OutputFilePath);
                writer.Write(exportDatasetViewModel.SelectedDataset.ScanViewModel.Data.Where(prsm => prsm.Sequence.Count > 0));
            }
        }
Example #2
0
        /// <summary>
        /// Open a window for selecting a dataset to export to file.
        /// </summary>
        /// <param name="exportDatasetViewModel">The view model for the dialog.</param>
        /// <returns>A value indicating whether the user clicked OK on the dialog.</returns>
        public bool ExportDatasetWindow(ExportDatasetViewModel exportDatasetViewModel)
        {
            var exportDatasetDialog = new ExportDatasetWindow {
                DataContext = exportDatasetViewModel
            };

            exportDatasetViewModel.ReadyToClose += (o, e) => exportDatasetDialog.Close();
            exportDatasetDialog.ShowDialog();
            return(exportDatasetViewModel.Status);
        }
Example #3
0
 public bool ExportDatasetWindow(ExportDatasetViewModel exportDatasetViewModel)
 {
     throw new NotImplementedException();
 }