protected void OnError(ImportExportError Error)
 {
     if (_Error != null)
     {
         _Error(this, Error);
     }
 }
        public ImportExportErrorEventArgsViewModel(ImportExportError iArg)
        {
            _IEEA = iArg as ConfirmationNeededEventArgs;
            Title = iArg.WindowName;
            Message = iArg.What;
            MessageAdditional =iArg.Who;

            ConfirmationNeeded = (_IEEA != null);
        }
        //internal static IWindow GetWindowFromImporterror(ImportExportErrorEventArgs Ev, IMusicSession ims)
        //{
        //    CorruptedRarOrMissingPasswordArgs cmp = Ev as CorruptedRarOrMissingPasswordArgs;
        //    if (cmp != null)
        //    {
        //        return new RarPasswordWindow(cmp);
        //    }

        //    AmbigueousCDInformationArgs acdia = Ev as AmbigueousCDInformationArgs;
        //    if (acdia != null)
        //    {
        //        var cdinfos = new CDAlbumDescriptorCreatorViewModel(acdia,ims);
        //        return new CDImportInfoEditor() { ModelView = cdinfos };
        //    }

        //    CDCoverInformationArgs cdia = Ev as CDCoverInformationArgs;
        //    if (cdia != null)
        //    {
        //        WebAlbumFoundSelectorViewModel waw = new WebAlbumFoundSelectorViewModel(cdia, ims.Strategy);
        //        return new InternetResultWindow() { ModelView = waw };
        //    }

        //    return new CustoMessageBox(Ev);
        //}

        internal static ViewModelBase GetViewModelBaseFromImporterror(ImportExportError Ev, IMusicSession ims)
        {
            CorruptedRarOrMissingPasswordArgs cmp = Ev as CorruptedRarOrMissingPasswordArgs;
            if (cmp != null)
            {
                return new RarPasswordViewModel(cmp);
            }

            AmbigueousCDInformationArgs acdia = Ev as AmbigueousCDInformationArgs;
            if (acdia != null)
            {
                return new CDAlbumDescriptorCreatorViewModel(acdia, ims);
            }

            CDCoverInformationArgs cdia = Ev as CDCoverInformationArgs;
            if (cdia != null)
            {
               return new WebAlbumFoundSelectorViewModel(cdia, ims.Strategy);
            }

            return new ImportExportErrorEventArgsViewModel(Ev);
        }
 private void ImportError(object sender, ImportExportError e)
 {
     OtherAlbumsConfirmationNeededEventArgs oa = e as OtherAlbumsConfirmationNeededEventArgs;
     if (oa!=null)
         oa.Continue = true;
 }
 private void OnImportError(ImportExportError error)
 {
     IWindow res = this.Window.CreateFromViewModel(ViewModelFactory.GetViewModelBaseFromImporterror(error, _IMusicSession));
     res.ShowDialog();
 }
 static internal ImportExportException FromError(ImportExportError ireason)
 {
     return new ImportExportException(ireason);
 }
 internal ImportExportException(ImportExportError ireason)
 {
     _Reason = ireason;
 }