Пример #1
0
        private string GetStoreName()
        {
            List <string> storeNameList = new List <string>();

            storeNameList.Add("Hangout_Store_Coin");
            storeNameList.Add("Hangout_Store_Cash");
            storeNameList.Add("Test_Store");
            storeNameList.Add("Test_Store_1");
            storeNameList.Add("Test_Store_2");

            SelectForm formSelect = new SelectForm(storeNameList, "Select Store");

            formSelect.ShowDialog();

            return(formSelect.SelectedComboBox1);
        }
Пример #2
0
        private string GetUserId(string userId, Dictionary <string, string> userIdList)
        {
            if ((userId == null) || (userId.Trim().Length == 0))
            {
                List <string> userList = new List <string>();

                foreach (KeyValuePair <string, string> keyValue in userIdList)
                {
                    userList.Add(keyValue.Key);
                }

                SelectForm formSelect = new SelectForm(userList, "Select User");
                formSelect.ShowDialog();

                userId = formSelect.SelectedComboBox1;
            }
            return(userId);
        }
Пример #3
0
        public PaymentCommand CreateNewHangoutUser(string userId)
        {
            string name = RandomString(6, true);
            string dob  = RandomDate(new DateTime(1960, 1, 1), new DateTime(1995, 12, 31));

            PaymentCommand cmd = new PaymentCommand();

            cmd.Noun = "HangoutUsers";
            cmd.Verb = "CreateNewUser";

            string pattern = @"\$?[a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\xFF][a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\xFF-_\.\d]{2,63}";
            Regex  regex   = new Regex(pattern, RegexOptions.IgnoreCase);

            List <string> list = new List <string>();

            Match match = regex.Match(name);

            if (!match.Success)
            {
                SelectForm formSelect = new SelectForm(list, "User Id match Failed ");
                formSelect.ShowDialog();
            }

            // name = "PI1000011"; // "ddmqcg";

            cmd.Parameters.Add("name", name);
            //  cmd.Parameters.Add("countryCode", "US");
            //  cmd.Parameters.Add("externalKey", Guid.NewGuid().ToString());
            //  cmd.Parameters.Add("gender", "M");
            //  cmd.Parameters.Add("dateOfBirth", dob);
            //  cmd.Parameters.Add("emailAddress", name + "@hangout.net");
            cmd.Parameters.Add("ipAddress", "64.115.150.114");
            cmd.Parameters.Add("initialCoinAmount", "1500");
            cmd.Parameters.Add("initialCashAmount", "20");

            return(cmd);
        }
Пример #4
0
        private string GetUserId(string userId, bool recipientFlag)
        {
            string title = "Select User";

            if (((userId == null) || (userId.Trim().Length == 0)) || (recipientFlag == true))
            {
                List <string> userList = new List <string>();
                userList.Add("545");
                userList.Add("547");
                userList.Add("549");
                userList.Add("551");
                userList.Add("554");
                userList.Add("556");
                userList.Add("558");
                userList.Add("559");
                userList.Add("576");
                userList.Add("574");
                userList.Add("652");
                userList.Add("721");

                if (((userId != null) && (userId.Trim().Length > 0)) && (recipientFlag == true))
                {
                    if (userList.Contains(userId.Trim()))
                    {
                        userList.Remove(userId.Trim());
                        title = "Select Gift Recipient's";
                    }
                }

                SelectForm formSelect = new SelectForm(userList, title);
                formSelect.ShowDialog();

                userId = formSelect.SelectedComboBox1;
            }
            return(userId);
        }