public AddEditDocumentVersionDialog(Document document, DocumentVersion documentVersion) { // Required to initialize variables InitializeComponent(); Title = "Edit Document Version"; mInEditMode = true; mModel = new AddDocumentVersionModel(document, documentVersion); mModel.DialogView = this; DataContext = mModel; mModel.OKButtonClicked += ModelOkButtonClicked; mModel.CancelButtonClicked += ModelCancelButtonClicked; mModel.TransferCompleted += () => { //busyIndicator.IsBusy = false; this.Close(); }; mModel.ErrorOccurred += (message) => { //busyIndicator.IsBusy = false; List<string> errors = new List<string>(); errors.Add(message); this.ValidationPopup.Show(Utils.BuildValidationResultFromServerErrors("", errors)); }; }
public AddEditDocumentVersionDialog(Document document) { // Required to initialize variables InitializeComponent(); mModel = new AddDocumentVersionModel(document, this); DataContext = mModel; mModel.OKButtonClicked += ModelOkButtonClicked; mModel.TransferCompleted += Close; mModel.ErrorOccurred += (message) => { //busyIndicator.IsBusy = false; List<string> errors = new List<string>(); errors.Add(message); ValidationPopup.Show(Utils.BuildValidationResultFromServerErrors("", errors)); }; }