Пример #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);
        }