Beispiel #1
0
        private void UpdateLicense(string actCode)
        {
            BusinessOnline.LicenseInfoXml V_0 = new BusinessOnline.LicenseInfoXml(txtCompanyName.Text, txtUserName.Text, txtSerialNumber.Text, actCode, string.Empty);
            this.GOC.SiteConfiguration.CheckMajorVersion(this.txtSerialNumber.Text);
            if (this.GOC.SiteConfiguration.IsEvalVersion)
            {
                this.GOC.SiteConfiguration.UpgradeEvalVersion(V_0);
            }
            this.GOC.SiteConfiguration.LicensesXml.Add(V_0);
            this.GOC.SiteConfiguration.SaveSystemParameters("\u8012\u12E1\uF581\u3912\u0E0E\u120E\uF981");
            int V_1 = RegBroker.GetSiteLicense(this.txtSerialNumber.Text);

            switch (V_1)
            {
            case 6:
            case 19:
                this.GOC.SiteConfiguration.ResetSL();
                break;

            default:
                BusinessOnline.LicenseInfoDb V_2 = new BusinessOnline.LicenseInfoDb();
                V_2.CopyFrom(V_0);
                V_2.MacAddress = RegBroker.GetValidMCode(actCode);
                V_2.RegDate    = DateTime.Now;
                V_2.ServerName = Page.Server.MachineName;
                V_2.VirtualDir = Page.Request.ApplicationPath;
                V_2.Port       = Page.Request.Url.Port.ToString();
                V_2.Save(null, null, false);
                this.GOC.RecalculatePowerUsers(true);
                break;
            }
        }
Beispiel #2
0
        private string IndicateLicense(int p, string sn)
        {
            int    V_0 = RegBroker.GetSiteLicense(sn);
            string V_1 = "\uC180\u8012\u06C1\u0120\u1101\uB183\u0705\u1201\u2981";

            if (V_0 != 1 || p == 1)
            {
                int V_2 = V_0;
                switch (V_2 - 2)
                {
                case 1:
                    break;
                }
            }
            else
            {
                V_1 = string.Empty;
            }
            return(string.Format(V_1, p));
        }
Beispiel #3
0
        public bool IsValidLicenseType(string serialNum)
        {
            /*
             * 03 28 3b 01 00 0a 0a 02 28 37 00 00 0a 6f 38 00
             * 00 0a 6f 4c 02 00 0a 2c 46 06 2c 35 06 18 2e 31
             * 06 1e 2e 2d 06 1f 09 2e 28 06 1f 0a 2e 23 06 1f
             * 0b 2e 1e 06 1f 0c 2e 19 06 1f 0d 2e 14 06 1f 0f
             * 2e 0f 06 1f 10 2e 0a 06 1f 12 2e 05 06 1f 13 33
             * 07 16 0c dd c3 00 00 00 17 0c dd bc 00 00 00 06
             * 1e 33 07 17 0c dd b1 00 00 00 03 28 69 02 00 0a
             * 18 33 0b 06 18 33 07 17 0c dd 9d 00 00 00 02 28
             * 37 00 00 0a 6f 38 00 00 0a 6f 2a 01 00 0a 0b 07
             * 17 2e 04 07 1d 33 04 06 1c 2e 14 07 1f 0f 33 05
             * 06 1f 13 2e 0a 07 1f 14 33 09 06 1f 15 33 04 17
             * 0c de 68 03 28 6a 02 00 0a 2d 04 16 0c de 5c 07
             * 1f 09 2e 07 07 1f 0a fe 01 2b 01 17 06 1f 09 2e
             * 07 06 1f 0a fe 01 2b 01 17 61 2c 04 16 0c de 3b
             * 07 1f 11 2e 07 07 1f 12 fe 01 2b 01 17 06 1f 11
             * 2e 07 06 1f 12 fe 01 2b 01 17 61 2c 04 16 0c de
             * 1a 07 1f 0b fe 01 06 1f 0c fe 01 61 2c 04 16 0c
             * de 09 17 0c de 05 26 16 0c de 00 08 2a
             */

            /*
             * 03 28 9D 00 00 06 0a 02 28 62 00 00 06 6f D1 00
             * 00 0a 6f D8 00 00 0a 2c 46 06 2c 35 06 18 2e 31
             * 06 1e 2e 2d 06 1f 09 2e 28 06 1f 0a 2e 23 06 1f
             * 0b 2e 1e 06 1f 0c 2e 19 06 1f 0d 2e 14 06 1f 0f
             * 2e 0f 06 1f 10 2e 0a 06 1f 12 2e 05 06 1f 13 33
             * 07 16 0c dd c3 00 00 00 17 0c dd bc 00 00 00 06
             * 1e 33 07 17 0c dd b1 00 00 00 03 28 99 00 00 06
             * 18 33 0b 06 18 33 07 17 0c dd 9d 00 00 00 02 28
             * 62 00 00 06 6f D1 00 00 0a 6f D9 00 00 0a 0b 07
             * 17 2e 04 07 1d 33 04 06 1c 2e 14 07 1f 0f 33 05
             * 06 1f 13 2e 0a 07 1f 14 33 09 06 1f 15 33 04 17
             * 0c de 68 03 28 9E 00 00 06 2d 04 16 0c de 5c 07
             * 1f 09 2e 07 07 1f 0a fe 01 2b 01 17 06 1f 09 2e
             * 07 06 1f 0a fe 01 2b 01 17 61 2c 04 16 0c de 3b
             * 07 1f 11 2e 07 07 1f 12 fe 01 2b 01 17 06 1f 11
             * 2e 07 06 1f 12 fe 01 2b 01 17 61 2c 04 16 0c de
             * 1a 07 1f 0b fe 01 06 1f 0c fe 01 61 2c 04 16 0c
             * de 09 17 0c de 05 26 16 0c de 00 08 2a
             */

            int  V_0 = RegBroker.GetSiteLicense(serialNum);
            bool V_2 = false;

            if (this.GOC.SiteConfiguration.IsEvalVersion)
            {
                if (V_0 == 0 || V_0 == 2 || V_0 == 8 || V_0 == 9 || V_0 == 10 || V_0 == 11 ||
                    V_0 == 12 || V_0 == 13 || V_0 == 15 || V_0 == 0x10 || V_0 == 0x12
                    )
                {
                    goto Label_1;
                }
                if (V_0 != 0x13)
                {
                    goto Label_2;
                }
            }
            else
            {
                goto Label_3;
            }

Label_1:
            V_2 = false;
            return(V_2);

Label_2:
            V_2 = true;
            return(V_2);

Label_3:
            if (V_0 != 8)
            {
                goto Label_4;
            }
            V_2 = true;
            goto Label_23;

Label_4:
            if (RegBroker.GetProductCode(serialNum) != 2)
            {
                goto Label_5;
            }
            if (V_0 != 2)
            {
                goto Label_5;
            }
            V_2 = true;
            goto Label_23;
Label_5:
            int V_1 = GOC.SiteConfiguration.SL;

            if (V_1 == 1)
            {
                goto Label_6;
            }
            if (V_1 != 7)
            {
                goto Label_7;
            }
Label_6:
            if (V_0 == 6)
            {
                goto Label_9;
            }
Label_7:
            if (V_1 != 15)
            {
                goto Label_8;
            }
            if (V_0 == 19)
            {
                goto Label_9;
            }
Label_8:
            if (V_1 != 20)
            {
                goto Label_10;
            }
            if (V_0 != 21)
            {
                goto Label_10;
            }
Label_9:
            V_2 = true;
            goto Label_23;
Label_10:
            if (RegBroker.ContainsPowerUserLicense(serialNum))
            {
                goto Label_11;
            }
            V_2 = false;
            goto Label_23;
Label_11:
            if (V_1 == 9)
            {
                var t1 = true;
                if (V_0 == 9)
                {
                    var  t2  = true;
                    bool val = t1 ^ t2;
                    if (val)
                    {
                        V_2 = false;
                        goto Label_23;
                    }
                    else
                    {
                        goto Label_16;
                    }
                }
                else
                {
                    var  t3  = V_0 == 10;
                    bool val = t1 ^ t3;
                    if (val)
                    {
                        V_2 = false;
                        goto Label_23;
                    }
                    else
                    {
                        goto Label_16;
                    }
                }
            }
            else
            {
                var tt1 = V_1 == 10;
                if (V_0 == 9)
                {
                    var  tt2 = true;
                    bool val = tt1 ^ tt2;
                    if (val)
                    {
                        V_2 = false;
                        goto Label_23;
                    }
                    else
                    {
                        goto Label_16;
                    }
                }
                else
                {
                    var  ttt1 = V_0 == 10;
                    bool val  = tt1 ^ ttt1;
                    if (val)
                    {
                        V_2 = false;
                        goto Label_23;
                    }
                    else
                    {
                        goto Label_16;
                    }
                }
            }

Label_16:
            if (V_1 == 17)
            {
                var v1 = true;
                if (V_0 == 17)
                {
                    var v2  = true;
                    var val = v1 ^ v2;
                    if (val)
                    {
                        V_2 = false;
                        goto Label_23;
                    }
                    else
                    {
                        goto Label_21;
                    }
                }
                else
                {
                    var vv2 = V_0 == 18;
                    var val = v1 ^ vv2;
                    if (val)
                    {
                        V_2 = false;
                        goto Label_23;
                    }
                    else
                    {
                        goto Label_21;
                    }
                }
            }
            else
            {
                var vv1 = V_1 == 18;
                if (V_0 == 18)
                {
                    var vv2 = true;
                    var val = vv1 ^ vv2;
                    if (val)
                    {
                        V_2 = false;
                        goto Label_23;
                    }
                    else
                    {
                        goto Label_21;
                    }
                }
                else
                {
                    var vv3 = V_0 == 18;
                    var val = vv1 ^ vv3;
                    if (val)
                    {
                        V_2 = false;
                        goto Label_23;
                    }
                    else
                    {
                        goto Label_21;
                    }
                }
            }
Label_21:
            var p1 = V_1 == 11;
            var p2 = V_0 == 12;

            if (p1 ^ p2)
            {
                V_2 = false;
                goto Label_23;
            }
            else
            {
                goto Label_22;
            }
Label_22:
            V_2 = true;
            goto Label_23;
            //pop
            //V_2 = false;
            //goto Label_23;

Label_23:
            return(V_2);
        }