Beispiel #1
0
        public static void Initialize()
        {
            Document arg_0A_0 = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
            Editor   editor   = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;

            try
            {
                LicenseManager.IsInitialized = false;
                try
                {
                    LicenseManager.LicenseFile = Reg.GetComputationalCADRegistryValue("LICENSEFILE");
                    if (File.Exists(LicenseManager.LicenseFile))
                    {
                        Class50.smethod_5(LicenseManager.LicenseFile);
                    }
                }
                catch
                {
                    LicenseManager.LicenseFile = "";
                }
                LicenseManager.IsLicensed     = Class50.smethod_6();
                LicenseManager.IsTrialLicense = Class50.smethod_12();
                LicenseManager.HardwareID     = Class50.smethod_40(true, true, true, false);
                if (LicenseManager.IsLicensed)
                {
                    try
                    {
                        LicenseManager.Description = Class50.smethod_38().GetByIndex(0).ToString();
                        goto IL_D2;
                    }
                    catch
                    {
                        LicenseManager.Description = "FULL";
                        goto IL_D2;
                    }
                }
                int num  = Class50.smethod_22();
                int num2 = Class50.smethod_24();
                if (num > num2 && num > 0)
                {
                    LicenseManager.Description = "Trial";
                    LicenseManager.IsLicensed  = true;
                }
                else
                {
                    LicenseManager.Description = "Expired";
                }
IL_D2:
                LicenseManager.IsInitialized = true;
            }
            catch (System.Exception ex)
            {
                editor.WriteMessage("\n" + ex.ToString());
            }
        }
Beispiel #2
0
        public void Info()
        {
            Document arg_0A_0 = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
            Editor   editor   = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;

            editor.WriteMessage("\nLicense file           : " + LicenseManager.LicenseFile);
            editor.WriteMessage("\nLicensed               : " + LicenseManager.IsLicensed.ToString());
            editor.WriteMessage("\nEvaluation_Lock_Enabled: " + LicenseManager.IsTrialLicense.ToString());
            editor.WriteMessage("\nTrial days             : " + Class50.smethod_22().ToString());
            editor.WriteMessage("\nCurrent day            : " + Class50.smethod_24().ToString());
            editor.WriteMessage("\nDescription            : " + LicenseManager.Description);
        }