Exemple #1
0
        public static byte[] PictureCompanyGet()
        {
            String mPath = Path.Combine(C_Variables.Path_.dir_setting, "company.png");

            if (File.Exists(mPath))
            {
                return(F_File.FileRead_Bytes(mPath));
            }
            else
            {
                var mImage = F_Image.Image2Bytes(Properties.Resources.DefaultCompany);
                F_File.FileWrite(mImage, mPath);
                return(mImage);
            }
        }
Exemple #2
0
 public static void Exit()
 {
     try
     {
         //System.Windows.Forms.Application.Exit();
     }
     catch (Exception e)
     {
         F_File.LogError(e);
     }
     try
     {
         System.Environment.Exit(1);
     }
     catch (Exception e)
     {
         F_File.LogError(e);
     }
 }
Exemple #3
0
 ///////////////////////////////////////////////////////////////////////////////////
 #region ID
 public static string get_CPU_ID()
 {
     try
     {
         string                     cpuInfo     = "";
         ManagementClass            managClass  = new ManagementClass("win32_processor");
         ManagementObjectCollection managCollec = managClass.GetInstances();
         foreach (ManagementObject managObj in managCollec)
         {
             if (cpuInfo == "")
             {
                 cpuInfo = managObj.Properties["processorID"].Value.ToString();
                 break;
             }
         }
         return(cpuInfo);
     }
     catch (Exception e) { F_File.LogError(e); return(""); }
 }
Exemple #4
0
        public static void PictureCompanySet(byte[] p_bitmapImage)
        {
            String mPath = Path.Combine(C_Variables.Path_.dir_setting, "company.png");

            F_File.FileWrite(p_bitmapImage, mPath);
        }