1
Fork 0

added tools file to contain global useful functions

This commit is contained in:
Jake Howard 2014-07-27 20:55:59 +01:00
parent 4c7a7373b4
commit 637baf6e64
2 changed files with 23 additions and 0 deletions

View file

@ -39,6 +39,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="DevComponents.DotNetBar2, Version=10.0.0.3, Culture=neutral, PublicKeyToken=c39c3242a43eee2b, processorArchitecture=MSIL" />
<Reference Include="DevComponents.Instrumentation, Version=10.0.0.3, Culture=neutral, PublicKeyToken=bc4a9d761ea44ef0, processorArchitecture=MSIL" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
@ -64,6 +65,7 @@
<Compile Include="splashScreen.Designer.cs">
<DependentUpon>splashScreen.cs</DependentUpon>
</Compile>
<Compile Include="tools.cs" />
<Compile Include="USBTools.cs" />
<Compile Include="mainWindow.cs">
<SubType>Form</SubType>

View file

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Saviour_Backup_System
{
class tools
{
public static string Trim(this string value, int maxLength)
{
if (value.Length > maxLength)
{
return "..." + value.Substring(value.Length - (maxLength - 3));
}
return value;
}
}
}