예제 #1
0
        private void initLicense()
        {
            string   createText = EasyMD5.Hash(mac() + "inactive");
            FileInfo file       = new FileInfo(path + "\\" + mac() + "\\" + fileName);

            file.Directory.Create();
            File.WriteAllText(file.FullName, createText);
        }
예제 #2
0
        public void updateLicense(string state)
        {
            string   createText = EasyMD5.Hash(mac() + state);
            FileInfo file       = new FileInfo(path + "\\" + mac() + "\\" + fileName);

            file.Directory.Create();
            File.WriteAllText(file.FullName, createText);
        }
예제 #3
0
        public bool isActiveLicense()
        {
            try
            {
                string readText   = File.ReadAllText(path + "\\" + mac() + "\\" + fileName);
                string activeMode = EasyMD5.Hash(mac() + "active");

                return(readText == activeMode);
            }catch (Exception)
            {
            }
            return(false);
        }