using System;
using System.Collections.Generic;
using System.Drawing;
using DelftTools.Shell.Core;
using Ringtoets.Piping.Data;
using WtiFormsResources = Ringtoets.Piping.Forms.Properties.Resources;
using ApplicationResources = Ringtoets.Piping.Plugin.Properties.Resources;
namespace Ringtoets.Piping.Plugin.FileImporter
{
///
/// Imports .soil files (SqlLite database files) created with the DSoilModel application.
///
public class PipingSoilProfilesImporter : IFileImporter
{
public string Name
{
get
{
return WtiFormsResources.PipingSoilProfilesCollectionName;
}
}
public string Category
{
get
{
return ApplicationResources.WtiApplicationName;
}
}
public Bitmap Image
{
get
{
return WtiFormsResources.PipingSoilProfileIcon;
}
}
public IEnumerable SupportedItemTypes
{
get
{
return new[]
{
typeof(IEnumerable)
};
}
}
public bool CanImportOnRootLevel
{
get
{
return false;
}
}
public string FileFilter
{
get
{
return String.Format("{0} {1} (*.soil)|*.soil",
WtiFormsResources.PipingSoilProfilesCollectionName, ApplicationResources.SoilFileName);
}
}
public string TargetDataDirectory { get; set; }
public bool ShouldCancel { get; set; }
public ImportProgressChangedDelegate ProgressChanged { get; set; }
public bool OpenViewAfterImport
{
get
{
return false;
}
}
public bool CanImportOn(object targetObject)
{
return targetObject is ICollection;
}
public object ImportItem(string path, object target = null)
{
return target;
}
}
}