public void Enter(Constants.SoftLicense type) { //uniqueid //status - enter(1) / exit (0) //type - paid(1) / free (0) NameValueCollection nvm = new NameValueCollection(); nvm.Clear(); nvm["uniqueid"] = mid; nvm["status"] = "1"; if (type == Constants.SoftLicense.Demo) { nvm["type"] = "0"; } else { nvm["type"] = "1"; } MyWeb.MyWeb web = new MyWeb.MyWeb(); string resp = string.Empty; while (!(resp.Contains("GroupGatorv2.5"))) { resp = web.PostPage(urlinout, nvm, 0, 0); if (!resp.Contains("GroupGatorv2.5")) { System.Threading.Thread.Sleep(2000); } } }
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( ); }