Helper类
albert528108
十年以上C#.NET开发,熟悉MES系统
展开
-
利用SharpZipLib进行文件的压缩和解压缩
在项目里引用SharpZipLib.dll。然后修改其中的关于压缩和解压缩的类。实现源码如下///<summary>///压缩文件///</summary>usingSystem;usingSystem.IO;usingICSharpCode.SharpZipLib.Checksums;usingICSharpCode.Shar...翻译 2019-11-13 14:31:21 · 336 阅读 · 0 评论 -
RoleFunctionHelper
/// <summary> /// Role function. /// </summary> public class RoleFunction { public string FunctionCode { get; set; } public string Descrip...原创 2019-11-08 10:49:07 · 161 阅读 · 0 评论 -
EncrptyHelper
public class EncryptHelper { public const string ENCRYPT_KEY = "FLEX-SQL"; public const string ENCRYPT_IV = "VER2.0.1"; public const string SPLITTER = " = "; pub...原创 2019-11-08 10:37:14 · 181 阅读 · 0 评论 -
EnumHelper
/// <summary> /// Enum helper. /// </summary> public static class EnumHelper { #region Get Enum Descriptor /// <summary> /// Get all enum d...原创 2019-11-08 10:34:17 · 185 阅读 · 0 评论 -
ColorHelper
public static class ColorHelper { /// <summary> /// Get contrasting color according to target color. /// </summary> /// <param name="targetColor"&...原创 2019-11-08 10:32:19 · 219 阅读 · 0 评论 -
ExcelHelper(with template)
public static class ExcelHelper { private static Dictionary<int, DataTable> _DataSource = new Dictionary<int, DataTable>(); #region Create excel file public ...原创 2019-11-08 10:23:31 · 851 阅读 · 0 评论 -
ControlHelper
public static class ControlHelper { #region Set Required Format /// <summary> /// Set Layout Control Item required format. /// </summary> ///...原创 2019-11-08 10:20:57 · 695 阅读 · 0 评论 -
PersistenceHelper
public class PersistenceHelper { private const uint MAX_CYCLE_TIME = 3600 * 1000; // Define the signal queue. private Queue<SignalData> _Queue; private Sig...原创 2019-11-08 10:16:10 · 454 阅读 · 0 评论 -
ValueHelper
public class ValueHelper { private bool _LittleEndian = false; private IConverter _Converter; private ValueHelper() { unsafe { int tester = 1;...原创 2019-11-08 10:13:19 · 187 阅读 · 0 评论 -
RegistryKeyHelper
添加引用:using Microsoft.Win32; public class RegistryKeyHelper { private const string _RegisterKey = "CultureInfo_Language"; private const string _CurrentLang = "CultureInfo"; ...原创 2019-11-08 09:58:56 · 102 阅读 · 0 评论 -
ImageHelper
public class ImageHelper { public static void DrawTransparent(byte[] data, int width, int height, string imgPath, Color color) { Rectangle rec = new Rectangle(0, 0...原创 2019-11-08 09:57:01 · 195 阅读 · 0 评论 -
ExcelHelper
public static DataTable Read(string filePath, bool isfirstRowColumn) { if (!File.Exists(filePath)) throw new Exception("FilePath is not exists"); ...原创 2019-11-08 09:53:30 · 128 阅读 · 0 评论 -
Localization
/// <summary> /// Localization dictionary. /// </summary> public class LocalizationDictionary { #region Text Dictionary private Dictionary<String, ICol...原创 2019-10-28 15:44:25 · 1230 阅读 · 0 评论 -
SQLHelper
/// <summary> /// Sql helper. /// </summary> public static class SqlHelper { #region Get Connection String /// <summary> /// Get connection st...原创 2019-10-28 15:34:54 · 166 阅读 · 0 评论 -
FTPClient
/// <summary> /// Ftp client is based on FTP protocal, and talk to remote FTP server. /// It is easy to use to list server folder structure, download file, upload file and remove fil...原创 2019-10-28 15:31:49 · 192 阅读 · 0 评论 -
EmailUtil
public static class EmailUtil { #region Template public const string EMAIL_TEMPLATE = @"<!DOCTYPE html><html lang='en' xmlns='http://www.w3.org/1999/xhtml'><h...原创 2019-10-28 15:24:15 · 196 阅读 · 0 评论 -
GlobalSettingHelper
public class GlobalSettingHelper { // Parameter Dictionary. private Dictionary<String, String> _ParamDictionary = null; #region Singleton Instance protec...原创 2019-10-09 10:35:33 · 134 阅读 · 0 评论 -
LocalSettingHelper
public class LocalSettingHelper { private const string FILE_NAME = "Setting.xml"; // Parameter Dictionary. private Dictionary<String, String> _ParamDictionary = nul...原创 2019-10-09 10:24:56 · 157 阅读 · 0 评论