장비관리를 별도의 프로젝트로 분리 -
개별 프로젝트 참조를 위한 뼈대 생성 - 공용은 fcommon 으로 이 관
This commit is contained in:
@@ -8,15 +8,6 @@ namespace Project
|
||||
{
|
||||
public static class Pub
|
||||
{
|
||||
public struct sUserInfo
|
||||
{
|
||||
public string no;
|
||||
public string name;
|
||||
public string dept;
|
||||
public string email;
|
||||
public int level;
|
||||
}
|
||||
|
||||
//Variable
|
||||
public static Device.Barcode barcode;
|
||||
|
||||
@@ -24,36 +15,48 @@ namespace Project
|
||||
public static Setting setting; //global setting
|
||||
|
||||
public static arUtil.Log log; //global logging system
|
||||
public static sUserInfo Login;
|
||||
|
||||
|
||||
public static DateTime LastInputTime = DateTime.Now;
|
||||
public static CResult Result = new CResult();
|
||||
|
||||
|
||||
public static void init()
|
||||
{
|
||||
string Path = Util.CurrentPath;
|
||||
FCOMMON.info.Path = Util.CurrentPath;
|
||||
if (Util.isLocalApplication())
|
||||
{
|
||||
Path = @"c:\Amkor\GroupWare\";
|
||||
if (!System.IO.Directory.Exists(Path))
|
||||
System.IO.Directory.CreateDirectory(Path);
|
||||
FCOMMON.info.Path = @"c:\Amkor\GroupWare\";
|
||||
if (!System.IO.Directory.Exists(FCOMMON.info.Path))
|
||||
System.IO.Directory.CreateDirectory(FCOMMON.info.Path);
|
||||
}
|
||||
|
||||
//setting
|
||||
setting = new Setting();
|
||||
setting = new Setting(FCOMMON.info.Path.MakeFilePath("Setting", "Setting.xml"));
|
||||
setting.Load();
|
||||
|
||||
uSetting = new UserSetting();
|
||||
uSetting = new UserSetting(FCOMMON.info.Path.MakeFilePath("Setting", "UserSet.xml"));
|
||||
uSetting.Load();
|
||||
|
||||
//log
|
||||
log = new arUtil.Log();
|
||||
Login = new sUserInfo();
|
||||
|
||||
//clear login info
|
||||
FCOMMON.info.Login = new FCOMMON.info.sUserInfo();
|
||||
|
||||
//language
|
||||
Lang.Loading(Pub.setting.Language + ".ini");
|
||||
}
|
||||
|
||||
public static string MakePasswordEnc(string data)
|
||||
{
|
||||
var sha1 = new System.Security.Cryptography.SHA1CryptoServiceProvider();
|
||||
var buffer = System.Text.Encoding.Default.GetBytes(data);
|
||||
var hashbuf = sha1.ComputeHash(buffer);
|
||||
var encpass = hashbuf.GetHexString();
|
||||
var ta = new dsMSSQLTableAdapters.UsersTableAdapter();
|
||||
encpass = encpass.Replace(" ", "");
|
||||
return encpass;
|
||||
}
|
||||
public static void SetFormStatus(ref System.Windows.Forms.Form f, string formid,Boolean read)
|
||||
{
|
||||
var fi = new System.IO.FileInfo(Util.CurrentPath + "formSetting\\" + formid + ".xml");
|
||||
|
||||
Reference in New Issue
Block a user