Ejemplo n.º 1
0
        private void UpdateItemsUsingDialog(UpdateInfo updateInfo, object target)
        {
            string oldPath  = updateInfo.CurrentPath(target);
            string filePath = oldPath;

            if (!File.Exists(filePath))
            {
                filePath = inquiryHelper.GetSourceFileLocation(updateInfo.FileFilterGenerator.Filter);
            }

            if (filePath != null && updateInfo.VerifyUpdates(target))
            {
                RunUpdateActivity(updateInfo.CreateFileImporter(target, filePath), updateInfo.Name);
            }
            else
            {
                if (!string.IsNullOrEmpty(oldPath))
                {
                    log.InfoFormat(Resources.GuiUpdateHandler_UpdateItemsUsingDialog_Updating_from_Path_0_cancelled, oldPath);
                }
                else
                {
                    log.InfoFormat(Resources.GuiUpdateHandler_UpdateItemsUsingDialog_Updating_cancelled);
                }
            }
        }
Ejemplo n.º 2
0
        private void ImportItemsUsingDialog(ImportInfo importInfo, object target)
        {
            string fileDialogResult = inquiryHelper.GetSourceFileLocation(importInfo.FileFilterGenerator.Filter);

            if (fileDialogResult != null && importInfo.VerifyUpdates(target))
            {
                RunImportActivity(importInfo.CreateFileImporter(target, fileDialogResult), importInfo.Name);
            }
            else
            {
                log.InfoFormat(Resources.GuiImportHandler_ImportItemsUsingDialog_Importing_cancelled);
            }
        }
Ejemplo n.º 3
0
 public string GetFilePath()
 {
     return(inquiryHelper.GetSourceFileLocation(RiskeerStorageResources.RiskeerProject_FileFilter));
 }