private void OnStatusUpdate(object sender, ActionEventArgs e)
 {
     switch (e.Status)
     {
         case PropertyNames.RemovedAttachment:
             {
                 RemoveAttachment(e.Attachment);
                 break;
             }
         case PropertyNames.ItemDiscoveryCompleted:
             {
                 RemoveAttachment(e.Attachment);
                 break;
             }
         case PropertyNames.RequiresPassword:
             {
                 AddAttachment(e.Attachment);
                 break;
             }
         case PropertyNames.Decrypted:
             {
                 if (!_presenter.AnyAttachmentsOf(SearchModel.PasswordProtected))
                 {
                     _presenter.ShowPage(_presenter.AnyAttachmentsOf(SearchModel.Supported)
                                             ? PageType.SupportedFiles
                                             : PageType.UnsupportedFiles);
                 }
                 break;
             }
     }
 }
Exemple #2
0
        private void OnStatusUpdate(object sender, ActionEventArgs e)
        {
            if (e.Status == PropertyNames.Progress)
            {
                SetProgressText(e.Task);
            }

            if (e.Status == PropertyNames.DiscoveryCompleted)
            {
                SetProgressText("Please wait...");
            }
        }
        private void OnStatusUpdate(object sender, ActionEventArgs e)
        {
            switch (e.Status)
            {
                case PropertyNames.AddedAttachment:
                    {
                        UpdateControlVisiblity();
                        break;
                    }
                case PropertyNames.RemovedAttachment:
                    {
                        RemoveAttachment(e.Attachment, true);

                        ShowUnsupportedFilesNotification(_presenter.AnyAttachmentsOf(SearchModel.UnSupported));
                        ShowPasswordProtectedFilesNotification(_presenter.AnyAttachmentsOf(SearchModel.PasswordProtected));

                        break;
                    }
                case PropertyNames.Decrypted:
                    {
                        UpdateControlVisiblity();
                        ShowPasswordProtectedFilesNotification(_presenter.AnyAttachmentsOf(SearchModel.PasswordProtected));

                        if (!e.Attachment.IsCollection)
                            AddAttachment(e.Attachment);
                        break;
                    }
                case PropertyNames.ItemDiscoveryCompleted:
                    {
                        UpdateControlVisiblity();
                        AddAttachment(e.Attachment);
                        break;
                    }
                case PropertyNames.MetadataSummaryChanged:
                    {
                        SetRiskAnalysisSummary(_presenter.RiskAnalysisSummary);    
                        break;
                    }
                case PropertyNames.RequiresPassword:
                    {
                        ShowPasswordProtectedFilesNotification(true);
                        SetRiskAnalysisSummary(Constants.RequiresPassword);
                        UpdateControlVisiblity();
                        AddAttachment(e.Attachment);
                        break;
                    }
                case PropertyNames.UnsupportedFileFormat:
                    {
                        ShowUnsupportedFilesNotification(true);
                        break;
                    }
                case PropertyNames.NoSupportedFileFormats:
                    {
                        SetRiskAnalysisSummary(Constants.MetadataDiscoveryNotAvailble);
                        break;
                    }
                case PropertyNames.AppliedAllActions:
                    {
                        ResetChildControls();
                        break;
                    }
            }
        }
 private void OnStatusUpdate(object sender, ActionEventArgs e)
 {
     switch (e.Status)
     {
         case PropertyNames.UnsupportedFileFormat:
             {
                 AddAttachment(e.Attachment, Constants.UnsupportedFiles);
                 break;
             }
         case PropertyNames.RemovedAttachment:
             {
                 RemoveAttachment(e.Attachment);
                 break;
             }
     }
 }
 private void OnStatusUpdate(object sender, ActionEventArgs e)
 {
     switch (e.Status)
     {
         case PropertyNames.CriticalException:
             {
                 _view.ShowMessage(e);
                 _view.ShowPage(PageType.LastPageShown);
                 break;
             }
         case PropertyNames.NoSupportedFileFormats:
         case PropertyNames.DiscoveryCompleted:
             {
                 if (_view.CurrentPage != PageType.PasswordProtectedFiles)
                 {
                     _view.ShowPage(PageType.SupportedFiles);
                 }
                 break;
             }
         case PropertyNames.AppliedAllActions:
             {
                 OnAppliedAllActions();
                 break;
             }
         case PropertyNames.AppliedActionsWithException:
             {
                 OnAppliedActionsWithException();
                 break;
             }
         case PropertyNames.Exception:
             {
                 ShowPage(PageType.LastPageShown);
                 break;
             }
         case PropertyNames.RemovedAttachment:
             {
                 OnRemovedAttachment();
                 break;
             }
         case PropertyNames.AllAttachmentsRemoved:
             {
                 _view.Close();
                 break;
             }
     }
 }