Ejemplo n.º 1
0
        public Constants.ServerResponse GetTimeRemaining(string email, ref string tremain)
        {
            Constants.ServerResponse ret = Constants.ServerResponse.Failed;
            tremain = "0";
            NameValueCollection nvm = new NameValueCollection();

            nvm.Clear();
            nvm["email"] = email;
            MyWeb.MyWeb web  = new MyWeb.MyWeb();
            string      resp = string.Empty;

            while (resp == string.Empty)
            {
                resp = web.PostPage(urlgettime, nvm, 0, 0);
                if (resp == string.Empty)
                {
                    System.Threading.Thread.Sleep(2000);
                }
            }
            if (resp.Contains("agettime:fail"))
            {
                ret = Constants.ServerResponse.Failed;
            }
            else if (resp.Contains("agettime:succss"))
            {
                ret = Constants.ServerResponse.Success;
                MyUtils.MyUtils utils = new MyUtils.MyUtils();
                tremain = utils.GetStrBetween(resp, "rem{", "}");
                tremain = tremain.Replace(",", string.Empty);
            }
            return(ret);
        }
Ejemplo n.º 2
0
        public Constants.ServerResponse AdminCheck(string aname, string apass)
        {
            NameValueCollection nvm = new NameValueCollection();

            nvm.Clear();
            nvm["email"]    = aname;
            nvm["password"] = apass;
            nvm["uniqueid"] = mid;
            MyWeb.MyWeb web  = new MyWeb.MyWeb();
            string      resp = string.Empty;

            while (resp == string.Empty)
            {
                resp = web.PostPage(urlacheck, nvm, 0, 0);
                if (resp == string.Empty)
                {
                    System.Threading.Thread.Sleep(2000);
                }
            }
            Constants.ServerResponse ret = Constants.ServerResponse.AcheckFailed;
            if (resp.Contains("acheck:failed"))
            {
                ret = Constants.ServerResponse.AcheckFailed;
            }
            if (resp.Contains("acheck:success"))
            {
                ret = Constants.ServerResponse.AcheckSuccess;
            }

            return(ret);
        }
Ejemplo n.º 3
0
        public Constants.ServerResponse Unlock(string emailToUnlock, string adminname, string adminpass)
        {
            Constants.ServerResponse ret = Constants.ServerResponse.UnlockFailNotAdmin;
            NameValueCollection      nvm = new NameValueCollection();

            nvm.Clear();
            nvm["emailtounlock"] = emailToUnlock;
            nvm["adminname"]     = adminname;
            nvm["adminpass"]     = adminpass;
            nvm["uniqueid"]      = mid;
            MyWeb.MyWeb web  = new MyWeb.MyWeb();
            string      resp = string.Empty;

            while (resp == string.Empty)
            {
                resp = web.PostPage(urladminunlock, nvm, 0, 0);
                if (resp == string.Empty)
                {
                    System.Threading.Thread.Sleep(2000);
                }
            }
            if (resp.Contains("aunlock:fail_NoAccount"))
            {
                ret = Constants.ServerResponse.UnlockFailWrongAccount;
            }
            if (resp.Contains("aunlock:fail_NotAdmin"))
            {
                ret = Constants.ServerResponse.UnlockFailNotAdmin;
            }
            if (resp.Contains("aunlock:success"))
            {
                ret = Constants.ServerResponse.UnlockSuccess;
            }
            return(ret);
        }
Ejemplo n.º 4
0
        private void AdminLoginClick()
        {
            WebService serv = new WebService();

            //Log(GetTime() + "Attempting to log in as admin.. ", Constants.LogMsgType.Success, false);
            Constants.ServerResponse res = serv.AdminCheck(txtAdminName.Text, txtAdminPass.Text);
            if (res == Constants.ServerResponse.AcheckSuccess)
            {
                panAdminLI.Visible = true;
                panAdminLO.Visible = false;
                //Log("Success!", Constants.LogMsgType.Success, true);
                //tmrGGStats.Enabled = true;
                if (price == null)
                {
                    price = new Price(txtAdminName.Text, txtAdminPass.Text);
                }
                UpdateAdminStats();
                if (cboPriceEdit.Items.Count > 0)
                {
                    cboPriceEdit.SelectedIndex = 0;
                }
            }
            else
            {
                panAdminLI.Visible = false;
                panAdminLO.Visible = true;
                MessageBox.Show("Your attempt to login as administrator failed because your account is not valid", "Login Failed!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                //Log("Failed! Your administrator account is not valid", Constants.LogMsgType.Error, true);
            }
        }
Ejemplo n.º 5
0
        public Constants.ServerResponse VerifyCaptcha(string captchatext, string email, string pass)
        {
            NameValueCollection nvm = new NameValueCollection();

            nvm.Clear();
            nvm["captchatxt"] = captchatext;
            nvm["email"]      = email;
            nvm["password"]   = pass;
            MyWeb.MyWeb web  = new MyWeb.MyWeb();
            string      resp = string.Empty;

            while (resp == string.Empty)
            {
                resp = web.PostPage(urlcaptchaverfiy, nvm, 0, 0);
                if (resp == string.Empty)
                {
                    System.Threading.Thread.Sleep(2000);
                }
            }
            Constants.ServerResponse ret = Constants.ServerResponse.NoAccount;
            if (resp.Contains("captcha:failed"))
            {
                ret = Constants.ServerResponse.CaptchaBad;
            }
            if (resp.Contains("account:duped"))
            {
                ret = Constants.ServerResponse.AccountDuped;
            }
            if (resp.Contains("account:created"))
            {
                ret = Constants.ServerResponse.AccountCreated;
            }

            return(ret);
        }
Ejemplo n.º 6
0
        public Constants.ServerResponse Login(ServerData sdata)
        {
            //email
            //password
            //computer
            //lockcomputer
            //status
            Constants.ServerResponse ret = Constants.ServerResponse.NoAccount;
            NameValueCollection      nvm = new NameValueCollection();

            nvm.Clear();
            nvm["email"]        = sdata.email;
            nvm["password"]     = sdata.pass;
            nvm["computer"]     = mid;
            nvm["lockcomputer"] = sdata.lockcomp;
            MyWeb.MyWeb web  = new MyWeb.MyWeb();
            string      resp = string.Empty;

            while (resp == string.Empty)
            {
                resp = web.PostPage(urllogin, nvm, 0, 0);
                if (resp == string.Empty)
                {
                    System.Threading.Thread.Sleep(2000);
                }
            }
            if (resp.Contains("login:noaccount"))
            {
                ret = Constants.ServerResponse.NoAccount;
            }
            else if (resp.Contains("login:expired"))
            {
                ret = Constants.ServerResponse.Expired;
            }
            else if (resp.Contains("login:notlocked"))
            {
                ret = Constants.ServerResponse.NotLocked;
            }
            else if (resp.Contains("login:wrongdevice"))
            {
                ret = Constants.ServerResponse.WrongComputer;
            }
            else if (resp.Contains("login:valid"))
            {
                ret = Constants.ServerResponse.Valid;
            }
            else if (resp.Contains("login:justlocked"))
            {
                ret = Constants.ServerResponse.JustLocked;
            }
            return(ret);
        }
Ejemplo n.º 7
0
        //public void DonorLogOffClick()
        //    {
        //    panMain.Visible = true;
        //    tabControl1.Visible = false;
        //    panAdminLO.Visible = false;
        //    panAdminLI.Visible = false;
        //    txtAdminName.Text = "";
        //    txtAdminPass.Text = "";
        //    lblUsersOnline.Text = "";
        //    lblTimeLeft.Text = "";
        //    lblUserMail.Text = "FREE USER";

        //    //disable unlock and other options for freeuser
        //    btnSurvey.Visible = false;

        //    label64.Visible = false;
        //    txtDonAcToGiftTo.Visible = false;
        //    btnGift.Visible = false;
        //    btnUnlock.Visible = false;

        //    label66.Visible = false;
        //    tmrGGStats.Enabled = false;
        //    label10.Visible = false;
        //    txtDonDaysToGift.Visible = false;
        //    TabDecorate(Constants.TabSituation.DonorLogOff);

        //    if (mylist != null)
        //        {
        //        if (mylist.IsInviting == true)
        //            mylist.InviteStop();
        //        if (mylist.IsGathering == true)
        //            mylist.GatherStop();
        //        System.Threading.Thread.Sleep(2000);
        //        UnSavedListCheck();
        //        }
        //    profile.SaveConfig();

        //    }
        //public void DonorLoggedInMakeup(string loggeduser)
        //    {
        //    profile.gatoremail = txtDBName.Text;
        //    profile.gatorpass = txtDBPass.Text;

        //    lblFreeRem.Visible = false;
        //    panAdminLO.Visible = true;
        //    panAdminLI.Visible = false;
        //    TabDecorate(Constants.TabSituation.DonorLogIn);
        //    tabControl1.Visible = true;
        //    panMain.Visible = false;

        //    lblUserMail.Text = loggeduser;
        //    UpdateGGStats();
        //    tmrGGStats.Enabled = true;

        //    //enable unlock and other options for paid user
        //    btnSurvey.Visible = true;

        //    label64.Visible = true;
        //    txtDonAcToGiftTo.Visible = true;
        //    btnGift.Visible = true;
        //    btnUnlock.Visible = true;

        //    label66.Visible = true;
        //    label10.Visible = true;
        //    txtDonDaysToGift.Visible = true;

        //    WebService serv = new WebService();
        //    string trem = "0";
        //    serv.GetTimeRemaining(loggeduser, ref trem);
        //    double dbltime = 0.0;
        //    try
        //        {
        //        dbltime = Convert.ToDouble(trem);
        //        }
        //    catch (Exception ex)
        //        {
        //        Log(GetTime() + "Conversion exception in LoggedInMakeup " + ex.Message, Constants.LogMsgType.Error, true);
        //        }
        //    TimeSpan t = TimeSpan.FromSeconds(dbltime);
        //    lblRemDays.Text = t.Days.ToString();
        //    lblRemHours.Text = t.Hours.ToString();
        //    lblRemMinutes.Text = t.Minutes.ToString();
        //    lblRemSeconds.Text = t.Seconds.ToString();
        //    lblFreeRem.Visible = false;
        //    lblRemDays.Visible = true;
        //    lblRemHours.Visible = true;
        //    lblRemMinutes.Visible = true;
        //    lblRemSeconds.Visible = true;
        //    label70.Visible = true;
        //    label71.Visible = true;
        //    label72.Visible = true;
        //    label73.Visible = true;

        //    lblTimeLeft.Visible = false;
        //    label57.Visible = false;


        //    }
        ////private void StartFreeVersionClick()
        ////    {
        ////    btnStartFreeVersion.Enabled = false;
        ////    panAdminLI.Visible = false;
        ////    panAdminLO.Visible = false;
        ////    FingerPrint fp = new FingerPrint();
        ////    string mid = fp.GetComuputerID();
        ////    lic = Constants.SoftLicense.Demo;
        ////    WebService serv = new WebService();
        ////    serv.mid = mid;
        ////    serv.Enter(Constants.SoftLicense.Demo);
        ////    TabDecorate(Constants.TabSituation.FreeLogin);
        ////    tabControl1.Visible = true;
        ////    panMain.Visible = false;

        ////    lblRemDays.Visible = false;
        ////    lblRemHours.Visible = false;
        ////    lblRemMinutes.Visible = false;
        ////    lblRemSeconds.Visible = false;
        ////    label70.Visible = false;
        ////    label71.Visible = false;
        ////    label72.Visible = false;
        ////    label73.Visible = false;

        ////    WebService.ServerData sd = serv.CheckUsage();
        ////    lblUserMail.Text = "FREEUSER";
        ////    Log("Thank you for trying free version of GroupGATOR " + cversion, Constants.LogMsgType.Error, true);
        ////    Log("You have " + sd.iremain.ToString() + " invites and " + sd.gremain.ToString() + " gathers remaining", Constants.LogMsgType.Error, true);

        ////    lblFreeRem.Visible = true;
        ////    lblFreeRem.Text = sd.iremain.ToString() + " INVITES and " + sd.gremain.ToString() + " GATHERS";

        ////    btnStartFreeVersion.Enabled = true;
        ////    }
        private void UnlockNormalClick()
        {
            DialogResult dlgres = MessageBox.Show("You will lose a day from your subscription period as a fee, everytime you unlock the software license. Are you sure you want to unlock?", "Confirmation Required", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (dlgres == System.Windows.Forms.DialogResult.Yes)
            {
                WebService serv = new WebService( );

                string timerem = "0";

                Constants.ServerResponse res = serv.GetTimeRemaining(usr, ref timerem);
                double dbltime = 0.0;
                try
                {
                    dbltime = Convert.ToDouble(timerem);
                }
                catch (Exception ex)
                {
                    dbltime = 0.0;
                }
                TimeSpan ts     = TimeSpan.FromSeconds(dbltime);
                int      cur    = ts.Days;
                double   dblcur = Convert.ToDouble(cur);

                if (dblcur < 1.0)
                {
                    MessageBox.Show("You do not have sufficient days left in your account perform the unlocking. Please buy more time for continuing unlocking", "Insufficient Time", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                //Log(GetTime() + "Attempting to unlock account - " + usr + " ", Constants.LogMsgType.Success, false);
                res = serv.UnlockNormal(usr, pass);
                if (res == Constants.ServerResponse.UnlockSuccess)
                {
                    //Log("Success!", Constants.LogMsgType.Success, true);
                    //MessageBox.Show("Account (" + profile.gatoremail + ") unlocked successfully", "Success", MessageBoxButtons.OK);
                    MessageBox.Show("The account (" + usr + ") has been unlocked. Please exit and restart GroupGATOR on the machine of your choice", "Unlocked!", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    //DonorLogOffClick();
                    Environment.Exit(0);
                }
                else if (res == Constants.ServerResponse.UnlockFailWrongAccount)
                {
                    //Log("Failed! The provided account is not valid for unlocking", Constants.LogMsgType.Error, true);
                    MessageBox.Show("Failed! The provided account is not valid for unlocking", "Failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Ejemplo n.º 8
0
        private void btnGP11_Click(object sender, EventArgs e)
        {
            if (cboGPRates1.Text == string.Empty)
            {
                return;
            }
            if (usr == "*****@*****.**")
            {
                return;
            }

            string tmp = cboGPRates1.Text;
            int    tag = tmp.IndexOf(" ");

            if (tag != -1)
            {
                string price = tmp.Substring(0, tag);
                int    cash  = 0;
                try
                {
                    cash = Convert.ToInt32(price);
                }
                catch (Exception ex)
                {
                    cash = 0;
                }
                WebService ws  = new WebService( );
                int        rev = adapi.GetUserBalance( );
                Constants.ServerResponse sresp = ws.BuyWithGP(usr, cash.ToString( ), rev);
                if (sresp == Constants.ServerResponse.GPBought)
                {
                    MessageBox.Show("Your purchase was successful!", "Success!", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else if (sresp == Constants.ServerResponse.GPNoAccount)
                {
                    MessageBox.Show("Your purchase failed because no existing account found with this email", "Failed!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                else if (sresp == Constants.ServerResponse.GPNotEnough)
                {
                    MessageBox.Show("Your purchase failed because the current user does not have enough credit left to make the purchase", "Failed!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Ejemplo n.º 9
0
        private void GetTimeRemainingClick(string email)
        {
            label57.Visible     = true;
            lblTimeLeft.Visible = true;
            WebService serv = new WebService();
            //Log(GetTime() + "checking remaining time for account - " + email + " ", Constants.LogMsgType.Success, false);
            string tremain = string.Empty;

            Constants.ServerResponse res = serv.GetTimeRemaining(txtAcGetTime.Text, ref tremain);
            if (res == Constants.ServerResponse.Success)
            {
                //Log("Success!", Constants.LogMsgType.Success, true);
                lblTimeLeft.Text = FormatTime(tremain, Constants.FormatTimeType.Dot);
            }
            else if (res == Constants.ServerResponse.Failed)
            {
                MessageBox.Show("Checking remaining time for account failed!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                //Log("Failed!", Constants.LogMsgType.Error, true);
            }
        }
Ejemplo n.º 10
0
        public Constants.ServerResponse GiftDays(string emailToGift, string donormail, string donorpass, string days)
        {
            Constants.ServerResponse ret = Constants.ServerResponse.UnlockFailNotAdmin;
            NameValueCollection      nvm = new NameValueCollection();

            nvm.Clear();
            nvm["emailtogift"] = emailToGift;
            nvm["donormail"]   = donormail;
            nvm["donorpass"]   = donorpass;
            nvm["uniqueid"]    = mid;
            nvm["days"]        = days;
            MyWeb.MyWeb web  = new MyWeb.MyWeb();
            string      resp = string.Empty;

            while (resp == string.Empty)
            {
                resp = web.PostPage(urldonorgift, nvm, 0, 0);
                if (resp == string.Empty)
                {
                    System.Threading.Thread.Sleep(2000);
                }
            }
            if (resp.Contains("gifttime:fail_NoDonorAccount"))
            {
                ret = Constants.ServerResponse.GiftFailNoDonor;
            }
            if (resp.Contains("gifttime:fail_NotEnough"))
            {
                ret = Constants.ServerResponse.GiftFailNotEnough;
            }
            if (resp.Contains("gifttime:fail_NoReceiverAccount"))
            {
                ret = Constants.ServerResponse.GiftFailNoReceiver;
            }
            if (resp.Contains("gifttime:success"))
            {
                ret = Constants.ServerResponse.GiftSuccess;
            }
            return(ret);
        }
Ejemplo n.º 11
0
        private void AddTimeClick()
        {
            WebService serv = new WebService();

            //Log(GetTime() + "Attempting to add " + txtDaysToAdd.Text + "days to " + txtAcAddTime.Text, Constants.LogMsgType.Success, false);
            Constants.ServerResponse res = serv.AddTime(txtAcAddTime.Text, txtAdminName.Text, txtAdminPass.Text, txtDaysToAdd.Text);
            if (res == Constants.ServerResponse.UnlockSuccess)
            {
                //Log("Success!", Constants.LogMsgType.Success, true);
                MessageBox.Show("Account (" + txtAcAddTime.Text + ") added with " + txtDaysToAdd.Text + " days", "Success", MessageBoxButtons.OK);
            }
            else if (res == Constants.ServerResponse.UnlockFailNotAdmin)
            {
                //Log("Failed! You must be logged in as administrator to add days", Constants.LogMsgType.Error, true);
                MessageBox.Show("Failed! You must have administrator privileges to add days", "Failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else if (res == Constants.ServerResponse.UnlockFailWrongAccount)
            {
                //Log("Failed! The provided account does not exist", Constants.LogMsgType.Error, true);
                MessageBox.Show("Failed! The provided account does not exist", "Failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Ejemplo n.º 12
0
        public Constants.ServerResponse BuyWithGP(string ggemail, string ggpts, int totalrev)
        {
            Constants.ServerResponse ret = Constants.ServerResponse.GPNotEnough;

            NameValueCollection nvm = new NameValueCollection( );

            nvm.Clear( );
            nvm["email"] = ggemail;
            nvm["ggpts"] = "0";
            nvm["rev"]   = totalrev.ToString();

            MyWeb.MyWeb web  = new MyWeb.MyWeb( );
            string      resp = string.Empty;

            while (resp == string.Empty)
            {
                resp = web.PostPage(urlggpts, nvm, 0, 0);
                if (resp == string.Empty)
                {
                    System.Threading.Thread.Sleep(2000);
                }
            }

            if (resp.Contains("{GGPTS:NOACCOUNT}"))
            {
                ret = Constants.ServerResponse.GPNoAccount;
            }
            else if (resp.Contains("{GGPTS:NOTENOUGH}"))
            {
                ret = Constants.ServerResponse.GPNotEnough;
            }
            else if (resp.Contains("{GGPTS:BOUGHT}"))
            {
                ret = Constants.ServerResponse.GPBought;
            }


            return(ret);
        }
Ejemplo n.º 13
0
        private void UnlockAccountClick()
        {
            WebService serv = new WebService();

            //Log(GetTime() + "Attempting to unlock account - " + txtAcUnlock.Text + " ", Constants.LogMsgType.Success, false);
            Constants.ServerResponse res = serv.Unlock(txtAcUnlock.Text, txtAdminName.Text, txtAdminPass.Text);
            if (res == Constants.ServerResponse.UnlockSuccess)
            {
                //Log("Success!", Constants.LogMsgType.Success, true);
                MessageBox.Show("Account (" + txtAcUnlock.Text + ") unlocked successfully", "Success", MessageBoxButtons.OK);
                //if (txtAcUnlock.Text == profile.gatoremail)
                //    {
                //    if (mylist != null)
                //        {
                //        if (mylist.IsInviting == true)
                //            mylist.InviteStop();
                //        if (mylist.IsGathering == true)
                //            mylist.GatherStop();
                //        System.Threading.Thread.Sleep(2000);
                //        UnSavedListCheck();
                //        }
                //    profile.SaveConfig();
                //    Environment.Exit(0);
                //    }
            }
            else if (res == Constants.ServerResponse.UnlockFailNotAdmin)
            {
                //Log("Failed! You must be logged in as administrator to unlock", Constants.LogMsgType.Error, true);
                MessageBox.Show("Failed! You must have administrator privileges to unlock", "Failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else if (res == Constants.ServerResponse.UnlockFailWrongAccount)
            {
                //Log("Failed! The provided account does not exist", Constants.LogMsgType.Error, true);
                MessageBox.Show("Failed! The provided account does not exist", "Failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Ejemplo n.º 14
0
        private void DonorGiftClick()
        {
            DialogResult dlgres = MessageBox.Show("This will deduct " + txtDonDaysToGift1.Text + "days from your subscription and will add the amount to " + txtDonAcToGiftTo1.Text + ". An additional 3 days will be deducted from your subscription as the fee for gifting. Are you sure you want to continue?", "Confirmation Required", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            WebService serv    = new WebService( );
            string     timerem = "0";
            double     reqd    = 0.0;

            try
            {
                reqd = Convert.ToDouble(txtDonDaysToGift1.Text);
            }
            catch (Exception ex)
            {
                reqd = 0;
            }

            Constants.ServerResponse res = serv.GetTimeRemaining(usr, ref timerem);
            double dbltime = 0.0;

            try
            {
                dbltime = Convert.ToDouble(timerem);
            }
            catch (Exception ex)
            {
                dbltime = 0.0;
            }
            TimeSpan ts     = TimeSpan.FromSeconds(dbltime);
            int      cur    = ts.Days;
            double   dblcur = Convert.ToDouble(cur);

            if (dblcur < reqd)
            {
                MessageBox.Show("You do not have sufficient days left in your account to send this gift. Try reducing the number of days to gift, or buy more time for continuing with this gift", "Insufficient Time", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            if (dlgres == DialogResult.Yes)
            {
                //Log(GetTime() + "Attempting to gift " + txtDonDaysToGift.Text + "days to " + txtDonAcToGiftTo.Text + "...", Constants.LogMsgType.Success, false);
                res = serv.GiftDays(txtDonAcToGiftTo1.Text, usr, pass, txtDonDaysToGift1.Text);
                if (res == Constants.ServerResponse.GiftSuccess)
                {
                    //Log("Success!", Constants.LogMsgType.Success, true);
                    MessageBox.Show("Account (" + txtDonAcToGiftTo1.Text + ") gifted with " + txtDonDaysToGift1.Text + " days", "Success", MessageBoxButtons.OK);
                }
                else if (res == Constants.ServerResponse.GiftFailNoDonor)
                {
                    //Log("Failed! You are not a valid donor to gift days", Constants.LogMsgType.Error, true);
                    MessageBox.Show("Failed! You are not a valid donor to gift days", "Failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                else if (res == Constants.ServerResponse.GiftFailNoReceiver)
                {
                    //Log("Failed! The provided receiver account does not exist", Constants.LogMsgType.Error, true);
                    MessageBox.Show("Failed! The provided receiver account does not exist", "Failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                else if (res == Constants.ServerResponse.GiftFailNotEnough)
                {
                    //Log("Failed! You dont have sufficient time left in your account to gift", Constants.LogMsgType.Error, true);
                    MessageBox.Show("Failed! You dont have sufficient time left in your account to gift", "Failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Ejemplo n.º 15
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( );
        }