Exemplo n.º 1
0
        public string GetPaypalCode(string price, string days)
        {
            string    buff = disk.Read(pricelocal);
            ArrayList temp = new ArrayList();
            string    ret  = string.Empty;

            temp = utils.GetTokensBetween(buff, "{PRICETAG}{AMOUNT}" + price + "{/AMOUNT}", "{/PRICETAG}");
            for (int i = 0; i < temp.Count; i++)
            {
                if (temp[i].ToString().Contains("{DAYS}" + days + "{/DAYS}"))
                {
                    ret = utils.GetStrBetween(buff, "{PAYPAL}", "{/PAYPAL}");
                    break;
                }
            }
            return(ret);
        }
Exemplo n.º 2
0
        public void LoadConfig()
        {
            GGDisk disk = new GGDisk();

            MyUtils.MyUtils utils     = new MyUtils.MyUtils();
            string          buff      = disk.Read(disk.filecfg);
            string          stridelay = string.Empty;
            string          strfdelay = string.Empty;
            string          strmiph   = string.Empty;

            if (buff.Length != 0)
            {
                string invitedelay     = string.Empty;
                string invitefaildelay = string.Empty;
                string gatherpref      = string.Empty;

                uname      = utils.GetStrBetween(buff, "<STNAME>", "</STNAME>");
                upass      = utils.GetStrBetween(buff, "<STPASS>", "</STPASS>");
                gatherpref = utils.GetStrBetween(buff, "<GPREF>", "</GPREF>");
                stridelay  = utils.GetStrBetween(buff, "<IWAIT>", "</IWAIT>");
                strfdelay  = utils.GetStrBetween(buff, "<FWAIT>", "</FWAIT>");
                string tmp = utils.GetStrBetween(buff, "<RNDFAILON>", "</RNDFAILON>");
                if (tmp == "0")
                {
                    israndomdelayon = false;
                }
                else
                {
                    israndomdelayon = true;
                }
                strmiph    = utils.GetStrBetween(buff, "<MIPH>", "</MIPH>");
                gatoremail = utils.GetStrBetween(buff, "<GGNAME>", "</GGNAME>");
                gatorpass  = utils.GetStrBetween(buff, "<GGPASS>", "</GGPASS>");
                sessid     = utils.GetStrBetween(buff, "<SESSID>", "</SESSID>");
                string nti  = utils.GetStrBetween(buff, "<INVTOTAL>", "</INVTOTAL>");;
                string ntbl = utils.GetStrBetween(buff, "<BLTOTAL>", "</BLTOTAL>");;


                try
                {
                    ntotalblacklist = Convert.ToInt32(ntbl);
                    ntotalinvite    = Convert.ToInt32(nti);
                }
                catch (Exception ex)
                {
                    ntotalinvite    = 0;
                    ntotalblacklist = 0;
                }

                if (gatherpref == string.Empty)
                {
                    gatherpref = "6";
                }
                try
                {
                    gpref = Convert.ToInt32(gatherpref);
                }
                catch (Exception ex)
                {
                    gpref = 6;
                }
                try
                {
                    miph = Convert.ToInt32(strmiph);
                }
                catch (Exception ex)
                {
                    miph = 100;
                }

                try
                {
                    idelay = Convert.ToInt32(stridelay);
                }
                catch (Exception ex)
                {
                    idelay = 18;
                }

                try
                {
                    fdelay = Convert.ToInt32(strfdelay);
                }
                catch (Exception ex)
                {
                    fdelay = 0;
                }
            }
        }
Exemplo n.º 3
0
        private void PluginWindow_Load(object sender, EventArgs e)
        {
            this.Text = capt;
            //label1.Text = capt;

            //"<GGID>" + txtDBName.Text + "</GGID><GGPASS>" + txtDBPass.Text + "</GGPASS>";
            //towrite = towrite + "<LIC>PAID</LIC>";
            //disk.Write(towrite, disk.filedbdetails);

            GGDisk disk = new GGDisk();

            MyUtils.MyUtils utils = new MyUtils.MyUtils();
            string          buff  = disk.Read(disk.filedbdetails);

            usr  = utils.GetStrBetween(buff, "<GGID>", "</GGID>");
            pass = utils.GetStrBetween(buff, "<GGPASS>", "</GGPASS>");
            if (buff.Contains("<LIC>DEMO</LIC>"))
            {
                lic = Constants.SoftLicense.Demo;
                usr = "******";
            }
            else
            {
                FingerPrint fp  = new FingerPrint();
                string      mid = fp.GetComuputerID();

                WebService            serv  = new WebService();
                WebService.ServerData sdata = new WebService.ServerData();
                sdata.email    = usr;
                sdata.pass     = pass;
                sdata.hid      = mid;
                sdata.lockcomp = "false";
                Constants.ServerResponse resp = serv.Login(sdata);
                lic = Constants.SoftLicense.Demo;

                if (resp == Constants.ServerResponse.Valid)
                {
                    lic = Constants.SoftLicense.Paid;
                }
                else
                {
                    lic = Constants.SoftLicense.Demo;
                }
            }

            if (lic == Constants.SoftLicense.Demo)
            {
                lblUserMail1.Text = "*****@*****.**";
            }
            else
            {
                lblUserMail1.Text = usr;
            }


            ThreadStart tsSK = new ThreadStart(SideKick);
            Thread      tSK  = new Thread(tsSK);

            tSK.IsBackground = true;
            tSK.Start( );
        }
Exemplo n.º 4
0
 private void LoadForEdit()
 {
     if (price != null)
     {
         string buff = string.Empty;
         buff = cboPriceEdit.Text;
         if (buff != string.Empty)
         {
             //$100.00 OR 1000 Points = 400 Days (75% Savings!)
             int beg, end;
             beg = end = -1;
             beg = 1;
             end = buff.IndexOf(" ");
             txtSetPrice.Text = buff.Substring(beg, end - beg);
             beg                = end + " OR ".Length;
             end                = buff.IndexOf(" ", beg);
             txtSetGP.Text      = buff.Substring(beg, end - beg);
             beg                = end + " Points = ".Length;
             end                = buff.IndexOf(" ", beg);
             txtSetDays.Text    = buff.Substring(beg, end - beg);
             beg                = end + " Days (".Length;
             end                = buff.IndexOf("%", beg);
             txtSetSavings.Text = buff.Substring(beg, end - beg);
             string tmp  = string.Empty;
             GGDisk disk = new GGDisk();
             tmp = disk.Read(price.pricelocal);
             if (tmp == string.Empty)
             {
                 price.GetAll();
                 tmp = disk.Read(price.pricelocal);
             }
             if (tmp != string.Empty)
             {
                 //"{PRICETAG}{AMOUNT}{/AMOUNT}){GP}{/GP}{PROMO}{/PROMO}{DAYS}{/DAYS}{PAYPAL}{/PAYPAL}{SAVE}{/SAVE}{/PRICETAG}
                 MyUtils.MyUtils utils = new MyUtils.MyUtils();
                 //string ppal = utils.GetStrBetween(tmp, "{/PROMO}{DAYS}" + txtSetDays.Text + "{/DAYS}{PAYPAL}", "{/PAYPAL}");
                 //txtSetPayPal.Text = price.GetPaypalCode( txtSetDays.Text );//, txtSetDays.Text);
                 txtSetPayPal.Text = utils.GetStrBetween(tmp, "{DAYS}" + txtSetDays.Text + "{/DAYS}{PAYPAL}", "{/PAYPAL}");
                 string promo = utils.GetStrBetween(tmp, "{PROMO}", "{/PROMO}{DAYS}" + txtSetDays.Text + "{/DAYS}{PAYPAL}");
                 if (promo == "0 ")
                 {
                     optNo.Checked = true;
                 }
                 else
                 {
                     optYes.Checked = true;
                 }
             }
             string txt1 = "$" + txtSetPrice.Text + " = " + txtSetDays.Text + " Days (" + txtSetSavings.Text + "% Savings!)";
             if (txtSetSavings.Text == "0")
             {
                 txt1 = "$" + txtSetPrice.Text + " = " + txtSetDays.Text + " Days (" + txtSetSavings.Text + "Trail Price)";
             }
             string txt2 = txtSetGP.Text + "GP = " + txtSetDays.Text + " Days";
             txtPaypalEdit.Text = txt1;
             txtGPEdit.Text     = txt2;
             //lblPayment1.Text = txt1;
             //lblPayment2.Text = txt2;
         }
     }
 }