Ejemplo n.º 1
0
        internal override bool TryReadValue(out long value)
        {
            RegistryEditor regedit     = new RegistryEditor(Registry.CurrentUser, path);
            String         valueString = regedit.Read(Key);

            // Check if the registry contains good data.
            if (valueString != null && long.TryParse(valueString, out value))
            {
                return(true);
            }

            value = 0;
            return(false);
        }
Ejemplo n.º 2
0
        internal override bool TryReadValue(out long value)
        {
            RegistryEditor regedit = new RegistryEditor(Registry.CurrentUser, path);
            String valueString = regedit.Read(Key);

            // Check if the registry contains good data.
            if (valueString != null && long.TryParse(valueString, out value))
            {
                return true;
            }

            value = 0;
            return false;
        }
Ejemplo n.º 3
0
        }                                                                                   // Is trial

        public GraphicsDeviceManager(String productName)
        {
            this.productName = productName;

            // Initialize the current license status.
            license            = new GraphicsDevice(productName);
            license.HardwareId = FindHardwareId();
            RegistryEditor regedit = new RegistryEditor(Registry.CurrentUser, "Software/The Complot/" + productName);

            license.License     = regedit.Read("License");
            license.TimeEnabled = false;

            // Listen for when the license becomes valid.
            license.LicenseStatusChanged += new EventHandler(license_LicenseStatusChanged);

            // No license written yet?
            if (license.License == null)
            {
                license.License = String.Empty;
            }
            CheckLicense();
        }
Ejemplo n.º 4
0
        public GraphicsDeviceManager(String productName)
        {
            this.productName = productName;

            // Initialize the current license status.
            license = new GraphicsDevice(productName);
            license.HardwareId = FindHardwareId();
            RegistryEditor regedit = new RegistryEditor(Registry.CurrentUser, "Software/The Complot/" + productName);
            license.License = regedit.Read("License");
            license.TimeEnabled = false;

            // Listen for when the license becomes valid.
            license.LicenseStatusChanged += new EventHandler(license_LicenseStatusChanged);

            // No license written yet?
            if (license.License == null)
            {
                license.License = String.Empty;
            }
            CheckLicense();
        }
Ejemplo n.º 5
0
        internal override bool HasBeenWrittenBefore()
        {
            RegistryEditor regedit = new RegistryEditor(Registry.CurrentUser, path);

            return(regedit.Read(Key) != null);
        }
Ejemplo n.º 6
0
 internal override bool HasBeenWrittenBefore()
 {
     RegistryEditor regedit = new RegistryEditor(Registry.CurrentUser, path);
     return regedit.Read(Key) != null;
 }