private void BgwOnRunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { if (e.Result is ImportedData fi) { Files = new DocumentCollectionViewModel(fi.files); Recipients = new RecipientsSelectionViewModel(fi.recipients); } }
public TransmittalViewModel() { ///This method shouldn't be used other than for debug OkayCommand = new RelayCommand(OkayCommandExecute, OkayCommandCanExecute); CancelCommand = new RelayCommand(CancelCommandExecute, CancelCommandCanExecute); AddFileCommand = new RelayCommand(AddFileExecute, FileEditCanExecute); RemoveFileCommand = new RelayCommand(RemoveFileExecute, FileRemoveCanExecute); EditRecipientsCommand = new RelayCommand(EditRecipientExecute, FileRemoveCanExecute); transmittalModel = new Transmittal(); TransmittalStatus = TransmittalStatus.Preparing; files = new DocumentCollectionViewModel(); ViewStatus = ViewStatusTypes.NewlyCreated & ViewStatusTypes.Editable; }