Exemplo n.º 1
0
 //Dispose method
 public void Dispose()
 {
     if (GenderCollection != null)
     {
         GenderCollection.Clear();
     }
     if (EmploymentCollection != null)
     {
         EmploymentCollection.Clear();
     }
     if (EducationCollection != null)
     {
         EducationCollection.Clear();
     }
     if (MaritalCollection != null)
     {
         MaritalCollection.Clear();
     }
     if (OccupationCollection != null)
     {
         OccupationCollection.Clear();
     }
     if (AccountsCollection != null)
     {
         AccountsCollection.Clear();
     }
 }
Exemplo n.º 2
0
 public override void Deserialize(NetworkReader reader)
 {
     success = reader.ReadBoolean();
     if (success)
     {
         friends = reader.ReadMessage <AccountsCollection>();
     }
 }
Exemplo n.º 3
0
    public IEnumerator GetAccountsCollection(AccountsCollection col)
    {
        for (int i = 0; i < members.Count; ++i)
        {
            Result <AccountInfo> res = AccountManager.instance.GetAccountByUserID(members[i]);
            yield return(res.WaitUntilDone());

            col.accounts.Add(res.Value);
        }
        yield break;
    }
Exemplo n.º 4
0
        public void InitializeVariables()
        {
            AccountsCollection accounts = _accountService.GetAccountData().Result;

            foreach (Account acc in accounts.Accounts)
            {
                Console.WriteLine($"{acc.AccountKey}");
                Console.WriteLine($"{acc.Currency}");
            }

            ClientKey  = accounts.Accounts.FirstOrDefault().ClientKey;
            AccountKey = accounts.Accounts.FirstOrDefault().AccountKey;
        }
Exemplo n.º 5
0
    private IEnumerator HandleGetFriendsListRequest(NetworkMessage x)
    {
        var user = GetAccountByConnection(x.conn);
        GetFriendsListResponseData resp = new GetFriendsListResponseData();

        if (user != null)
        {
            Result <LobbyUserGroupInfo> res = GetFriends(user.userID);
            yield return(res.WaitUntilDone());

            var friends = res.Value;

            resp.success = true;
            AccountsCollection col = new AccountsCollection();
            yield return(StartCoroutine(friends.GetAccountsCollection(col)));

            resp.friends = col;
        }
        else
        {
            resp.success = false;
        }
        x.conn.Send((short)CustomMessageTypes.GetFriendslistResponse, resp);
    }
Exemplo n.º 6
0
        private void GetComboBoxCollection()
        {
            GenderCollection.Add("Male");
            GenderCollection.Add("Female");

            EmploymentCollection.Add("Consultant");
            EmploymentCollection.Add("Private");
            EmploymentCollection.Add("PSFederal");
            EmploymentCollection.Add("PSLocal");
            EmploymentCollection.Add("PSState");
            EmploymentCollection.Add("SelfEmp");
            EmploymentCollection.Add("Volunteer");

            EducationCollection.Add("Associate");
            EducationCollection.Add("Bachelor");
            EducationCollection.Add("College");
            EducationCollection.Add("Doctorate");
            EducationCollection.Add("HSgrad");
            EducationCollection.Add("Master");
            EducationCollection.Add("Preschool");
            EducationCollection.Add("Professional");
            EducationCollection.Add("Vocational");
            EducationCollection.Add("Yr9");
            EducationCollection.Add("Yr10");
            EducationCollection.Add("Yr11");
            EducationCollection.Add("Yr12");
            EducationCollection.Add("Yr1t4");
            EducationCollection.Add("Yr5t6");
            EducationCollection.Add("Yr7t8");

            MaritalCollection.Add("Absent");
            MaritalCollection.Add("Divorced");
            MaritalCollection.Add("Married");
            MaritalCollection.Add("Married-spouse-absent");
            MaritalCollection.Add("Unmarried");
            MaritalCollection.Add("Widowed");

            OccupationCollection.Add("Cleaner");
            OccupationCollection.Add("Clerical");
            OccupationCollection.Add("Executive");
            OccupationCollection.Add("Farming");
            OccupationCollection.Add("Home");
            OccupationCollection.Add("Machinist");
            OccupationCollection.Add("Military");
            OccupationCollection.Add("Professional");
            OccupationCollection.Add("Protective");
            OccupationCollection.Add("Repair");
            OccupationCollection.Add("Sales");
            OccupationCollection.Add("Service");
            OccupationCollection.Add("Support");
            OccupationCollection.Add("Transport");

            AccountsCollection.Add("Canada");
            AccountsCollection.Add("China");
            AccountsCollection.Add("Columbia");
            AccountsCollection.Add("Cuba");
            AccountsCollection.Add("Ecuador");
            AccountsCollection.Add("England");
            AccountsCollection.Add("Fiji");
            AccountsCollection.Add("Germany");
            AccountsCollection.Add("Greece");
            AccountsCollection.Add("Guatemala");
            AccountsCollection.Add("Hong");
            AccountsCollection.Add("Hungary");
            AccountsCollection.Add("India");
            AccountsCollection.Add("Indonesia");
            AccountsCollection.Add("Iran");
            AccountsCollection.Add("Ireland");
            AccountsCollection.Add("Italy");
            AccountsCollection.Add("Jamaica");
            AccountsCollection.Add("Japan");
            AccountsCollection.Add("Malaysia");
            AccountsCollection.Add("Mexico");
            AccountsCollection.Add("NewZealand");
            AccountsCollection.Add("Nicaragua");
            AccountsCollection.Add("Philippines");
            AccountsCollection.Add("Poland");
            AccountsCollection.Add("Portugal");
            AccountsCollection.Add("Scotland");
            AccountsCollection.Add("Singapore");
            AccountsCollection.Add("Taiwan");
            AccountsCollection.Add("UnitedStates");
            AccountsCollection.Add("Vietnam");
            AccountsCollection.Add("Yugoslavia");
        }