예제 #1
0
        private void FrmCapchaLogin_Load(object sender, EventArgs e)
        {
            try
            {
                Globals.CapchaTag = true;
                image             = Properties.Resources.background;
                txtDBpath.Text    = Globals.path_AppDataFolder;

                clsDBQueryManager DataBase = new clsDBQueryManager();
                DataTable         dt       = DataBase.SelectSettingData();
                foreach (DataRow dRow in dt.Rows)
                {
                    if ("Captcha_ID" == dRow[1].ToString())
                    {
                        txtCapchaID.Text = StringEncoderDecoder.Decode(dRow[2].ToString());
                    }
                    if ("Captcha_Password" == dRow[1].ToString())
                    {
                        txtCapchaPaswrd.Text = StringEncoderDecoder.Decode(dRow[2].ToString());
                    }

                    Globals.CapchaLoginID       = txtCapchaID.Text;
                    Globals.CapchaLoginPassword = txtCapchaPaswrd.Text;
                }

                //string[] arr1 = new string[] { BaseLib.Globals.CapchaLoginID, BaseLib.Globals.CapchaLoginPassword};
                //DeathByCaptcha.Client clnt = null;
                //string capcthaResponse = DecodeDBC(arr1, out clnt);
            }
            catch
            {
            }
        }
예제 #2
0
        public void LoadFileData()
        {
            string accountData = string.Empty;
            string laoddata    = string.Empty;

            clsDBQueryManager DataBase = new clsDBQueryManager();
            DataTable         dt       = DataBase.SelectSettingData();

            foreach (DataRow row in dt.Rows)
            {
                if ("LoadAccounts" == row[1].ToString())
                {
                    accountData = StringEncoderDecoder.Decode(row[2].ToString());
                }
            }

            if (File.Exists(accountData))
            {
                txtAccountFile.Text = accountData;
                AddToListBox("[ " + DateTime.Now + " ] => [ Last Accounts Loaded From : " + accountData + " ]");
            }
            else
            {
                AddToListBox("[ " + DateTime.Now + " ] => [ File : " + accountData + " : Does not exsist ]");
            }
        }
예제 #3
0
        private void btnSaveDBC_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(txtDBCUsername.Text.Trim()) && !string.IsNullOrEmpty(txtDBCPassword.Text.Trim()))
            {
                BaseLib.Globals.DBCUsername = txtDBCUsername.Text;
                BaseLib.Globals.DBCPassword = txtDBCPassword.Text;

                //***  Save tb_Setting**************************///////

                clsDBQueryManager objclsSettingDB = new clsDBQueryManager();

                try
                {
                    DataTable dt = objclsSettingDB.SelectSettingData();
                    foreach (DataRow row in dt.Rows)
                    {
                        if ("DeathByCaptcha" == row[1].ToString())
                        {
                            objclsSettingDB.DeleteDBCDecaptcherData("DeathByCaptcha");
                        }
                    }
                    objclsSettingDB.InsertDBCData(StringEncoderDecoder.Encode(txtDBCUsername.Text), "DeathByCaptcha", StringEncoderDecoder.Encode(txtDBCPassword.Text));
                    MessageBox.Show("Settings Saved");
                    this.Close();
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.StackTrace);
                }
            }
            else
            {
                MessageBox.Show("Please fill all Death By Captcha Details");
            }
        }
예제 #4
0
        private void LoadDefaultsFiles()
        {
            try
            {
                #region TD Ubdate by me
                lstMessage.Clear();


                string MessageSettings = string.Empty;


                #endregion

                //Globussoft1.GlobusHttpHelper
                DataTable dt = objclsSettingDB.SelectSettingData();
                foreach (DataRow row in dt.Rows)
                {
                    try
                    {
                        if ("MentionReplyInterface" == row[0].ToString())
                        {
                            if ("Message" == row[1].ToString())
                            {
                                MessageSettings = StringEncoderDecoder.Decode(row[2].ToString());
                            }
                        }
                    }
                    catch
                    {
                    }
                }

                if (File.Exists(MessageSettings))
                {
                    lstMessage    = GlobusFileHelper.ReadFiletoStringList(MessageSettings);
                    textBox1.Text = MessageSettings;
                    BindDataIntoDropDownList();
                    AddToReplyInterfaceLog("[ " + DateTime.Now + " ] => [ " + lstMessage.Count + " Message loaded ]");
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }
        }
예제 #5
0
        private void LoadDBCSettings()
        {
            clsDBQueryManager objclsSettingDB = new clsDBQueryManager();

            try
            {
                DataTable dt = objclsSettingDB.SelectSettingData();
                foreach (DataRow row in dt.Rows)
                {
                    if ("DeathByCaptcha" == row[1].ToString())
                    {
                        txtDBCUsername.Text         = StringEncoderDecoder.Decode(row[0].ToString());
                        txtDBCPassword.Text         = StringEncoderDecoder.Decode(row[2].ToString());
                        BaseLib.Globals.DBCUsername = StringEncoderDecoder.Decode(txtDBCUsername.Text);
                        BaseLib.Globals.DBCPassword = StringEncoderDecoder.Decode(txtDBCPassword.Text);
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }
        }
예제 #6
0
        public static void LoadDecaptchaSettings()
        {
            try
            {
                Globals.CapchaTag = true;

                clsDBQueryManager DataBase = new clsDBQueryManager();
                DataTable         dt       = DataBase.SelectSettingData();
                foreach (DataRow dRow in dt.Rows)
                {
                    if ("Captcha_ID" == dRow[1].ToString())
                    {
                        Globals.CapchaLoginID = StringEncoderDecoder.Decode(dRow[2].ToString());
                    }
                    if ("Captcha_Password" == dRow[1].ToString())
                    {
                        Globals.CapchaLoginPassword = StringEncoderDecoder.Decode(dRow[2].ToString());
                    }
                }
            }
            catch
            {
            }
        }