Restore classic SqliteLibrary item naming behavior, get test passing

- LocalLibraryAddButtonAddSingleItemToLibrary passing
This commit is contained in:
John Lewin 2017-06-03 09:03:02 -07:00
parent 6a1c0b5769
commit d54f651b42
3 changed files with 52 additions and 32 deletions

View file

@ -54,7 +54,7 @@ using System.IO.Compression;
namespace MatterHackers.MatterControl.PrinterCommunication
{
public static class ExtensionMethods
public static class PrintItemWrapperExtensionMethods
{
private static TextInfo textInfo = new CultureInfo("en-US", false).TextInfo;
@ -67,6 +67,16 @@ namespace MatterHackers.MatterControl.PrinterCommunication
return textInfo?.ToTitleCase(printItemWrapper.Name.Replace('_', ' '));
}
public static string GetFriendlyName(string fileName)
{
if (fileName == null)
{
return "";
}
return textInfo?.ToTitleCase(fileName.Replace('_', ' '));
}
}
/// <summary>