Exemplo n.º 1
0
        public bool check_license()
        {
            string license_file = Task.pFind_license;

            if (!File.Exists(license_file))
            {
                License_Dialog ld = new License_Dialog();
                ld.Show();
                return(false);
            }
            bool        flag    = true;
            string      license = File_Help.get_license(license_file, ref flag);
            MachineCode mc      = new MachineCode();
            string      code    = mc.Get_Code();

            code = mc.MD5_PWD(code);
            string code_license = mc.MD5(code);

            if (code_license != license || !flag)
            {
                MessageBox.Show(Message_Help.LICENSE_WRONG);
                License_Dialog ld = new License_Dialog();
                ld.Show();
                return(false);
            }
            return(true);
        }
Exemplo n.º 2
0
        public License_Dialog()
        {
            InitializeComponent();
            update_countrys();
            MachineCode mc           = new MachineCode();
            string      machine_code = mc.Get_Code();

            machine_code       = mc.MD5_PWD(machine_code);
            this.code_txt.Text = machine_code;
        }