private string GetMappingDetailsAsString(ImportMappingInfo mapping)
{
string sSubItem = string.Empty;
// if the style is excluded then don't display anything in the details column
if (!mapping.IsExcluded)
{
switch (mapping.Domain)
{
case MarkerDomain.BackTrans:
sSubItem = ScrImportComponents.kstidImportWizMappingDetailBackTrans;
break;
case MarkerDomain.Note:
sSubItem = ScrImportComponents.kstidImportWizMappingDetailNotes;
break;
case MarkerDomain.Footnote:
sSubItem = ScrImportComponents.kstidImportWizMappingDetailFootnotes;
break;
case MarkerDomain.Footnote | MarkerDomain.BackTrans:
sSubItem = ScrImportComponents.kstidImportWizMappingDetailBTFootnotes;
break;
case MarkerDomain.Default:
break;
default:
throw new Exception("Unexpected domain");
}
// Figure out what the writing system's name is to display it in the list view.
if (mapping.WsId != null)
{
IWritingSystem ws = m_cache.ServiceLocator.WritingSystemManager.Get(mapping.WsId);
string wsName = ws.DisplayLabel;
if (wsName != null)
{
if (sSubItem != string.Empty)
sSubItem += ", ";
sSubItem += wsName;
}
}
}
return sSubItem;
}