Beispiel #1
0
        private static Contact CreateContact(int seed)
        {
            Contact contact = new Contact();

            contact.Name = FirstNames.GetSeededEntry(seed) + " " + LastNames.GetSeededEntry(seed);
            return(contact);
        }
Beispiel #2
0
        public ParsedName Parse(string rawName)
        {
            var match = Rx.Match(rawName);

            if (!match.Success)
            {
                return(null);
            }
            var firstName = match.Groups["first"].Value;

            if (!FirstNames.Contains(firstName.ToLowerInvariant()))
            {
                return(null);
            }

            var pn = new ParsedName(this.GetType().Name)
            {
                Title       = match.Groups["title"].Value,
                FirstName   = match.Groups["first"].Value,
                LastName    = $"{match.Groups["last1"].Value} {match.Groups["last2"].Value}",
                DisplayName = $"{match.Groups["first"].Value} {match.Groups["last1"].Value} {match.Groups["last2"].Value}",
                Score       = 100
            };

            return(pn);
        }
Beispiel #3
0
        public ParsedFullName Parse(string rawName)
        {
            var match = Rx.Match(rawName);

            if (!match.Success)
            {
                return(null);
            }
            var firstName1 = match.Groups["first1"].Value;
            var firstName2 = match.Groups["first2"].Value;

            if (!FirstNames.Contains(firstName1.ToLowerInvariant()))
            {
                return(null);
            }

            if (!FirstNames.Contains(firstName2.ToLowerInvariant()))
            {
                return(null);
            }

            var pn = new ParsedFullName
            {
                Title       = match.Groups["title"].Value,
                FirstName   = $"{match.Groups["first1"].Value}-{match.Groups["first2"].Value}",
                LastName    = match.Groups["last"].Value,
                DisplayName = $"{match.Groups["first1"].Value}-{match.Groups["first2"].Value} {match.Groups["last"].Value}",
                Score       = 200
            };

            return(pn);
        }
Beispiel #4
0
        public List <UserEntity> Generate(int count)
        {
            var fn = new FirstNames();
            var ln = new LastNames();
            var d  = new Departments();
            var t  = new Titles();
            var r  = new Random();

            List <UserEntity> users = new List <UserEntity>();

            for (int i = 0; i < count; i++)
            {
                var user = new UserEntity
                {
                    Id         = i + 1,
                    Age        = r.Next(1, 100),
                    Department = d.GetRandom(),
                    FirstName  = fn.GetRandom(),
                    LastName   = ln.GetRandom(),
                    Title      = t.GetRandom()
                };
                users.Add(user);
            }

            return(users);
        }
Beispiel #5
0
 public void InitNull(IdStorage ids)
 {
     Cities.InitNull(ids);
     Countries.InitNull(ids);
     Interests.InitNull(ids);
     FirstNames.InitNull(ids);
     LastNames.InitNull(ids);
     Phones.InitNull(ids);
     Premiums.InitNull(ids);
 }
Beispiel #6
0
        private string GetCouplesInitials()
        {
            string[] couplesNames     = FirstNames.Split('&');
            string[] husbandsNames    = couplesNames[0].Trim().Split(' ');
            string[] wifesNames       = couplesNames[1].Trim().Split(' ');
            string   husbandsInitials = GetFirstLetters(husbandsNames);
            string   wifesInitials    = GetFirstLetters(wifesNames);

            return(husbandsInitials + "& " + wifesInitials.TrimEnd());
        }
        // look up the last name using the switch/case user the FirstNamesEnum value from the Student class
        static string ReturnLastName(FirstNames firstName)
        {
            switch (firstName)
            {
            case FirstNames.NoName:
                Console.Write("xxx - " + FirstNames.NoName + " - ");
                return("NoName");

            case FirstNames.Abby:
                Console.Write("xxx - " + FirstNames.Abby + " - ");
                return("Smith");

            case FirstNames.Alex:
                Console.Write("xxx - " + FirstNames.Alex + " - ");
                return("Wallen");

            case FirstNames.Lauren:
                Console.Write("xxx - " + FirstNames.Lauren + " - ");
                return("Jones");

            case FirstNames.Drew:
                Console.Write("xxx - " + FirstNames.Drew + " - ");
                return("Star");

            case FirstNames.Sara:
                Console.Write("xxx - " + FirstNames.Sara + " - ");
                return("Jordan");

            case FirstNames.Cameron:
                Console.Write("xxx - " + FirstNames.Cameron + " - ");
                return("Barnes");

            case FirstNames.Lindsey:
                Console.Write("xxx - " + FirstNames.Lindsey + " - ");
                return("Pointer");

            case FirstNames.Ashley:
                Console.Write("xxx - " + FirstNames.Ashley + " - ");
                return("Fletcher");

            case FirstNames.Jaden:
                Console.Write("xxx - " + FirstNames.Jaden + " - ");
                return("Williams");

            case FirstNames.Danielle:
                Console.Write("xxx - " + FirstNames.Danielle + " - ");
                return("Powers");

            default:
                return("You entered bad input");
            }
        }
        public override void Process(XFireClient context)
        {
            var usernames = context.Server.Database.QueryUsers(_queryByUsername).Select(a => a.Username).ToList();

            Usernames.AddRange(usernames);

            // Don't really care about these but they're necessary to work properly
            var unknowns = usernames.Select(a => "Unknown").ToList();

            FirstNames.AddRange(unknowns);
            LastNames.AddRange(unknowns);
            Emails.AddRange(unknowns);
        }
Beispiel #9
0
        static void DoSomeStuff(LastName lname, FirstNames fnames, Email email)
        {
            var person = new Person
            {
                FirstNames = fnames,
                LastName   = lname,
                Email      = email
            };

            var json = Serialize(person);

            Console.WriteLine(json);
            var p = Deserialize <Person>(json);
        }
Beispiel #10
0
        public void Process(Context context)
        {
            var users     = context.Server.Database.QueryUsers(queryByUsername);
            var usernames = users.Select(a => a.Username);

            Usernames.AddRange(usernames);

            // Don't really care about these but they're necessary to work properly
            var unknowns = usernames.Select(a => "Unknown");

            FirstNames.AddRange(unknowns);
            LastNames.AddRange(unknowns);
            Emails.AddRange(unknowns);
        }
Beispiel #11
0
        public string GetExportFileName()
        {
            StringBuilder b = new StringBuilder();

            b.Append(SecondName.Exchange);
            b.Append("_");
            b.Append(SecondName.Ticker);
            FirstNames.ForEach((f) => {
                b.Append("_");
                b.Append(f.Exchange);
                b.Append("_");
                b.Append(f.Ticker);
            });
            return(b.ToString());
        }
Beispiel #12
0
 public void LoadEnded()
 {
     Emails.LoadEnded();
     FirstNames.LoadEnded();
     LastNames.LoadEnded();
     Phones.LoadEnded();
     Sex.LoadEnded();
     Countries.LoadEnded();
     Cities.LoadEnded();
     Statuses.LoadEnded();
     Joined.LoadEnded();
     Birth.LoadEnded();
     Interests.LoadEnded();
     Premiums.LoadEnded();
 }
Beispiel #13
0
 public void Compress()
 {
     Emails.Compress();
     FirstNames.Compress();
     LastNames.Compress();
     Phones.Compress();
     Sex.Compress();
     Countries.Compress();
     Cities.Compress();
     Statuses.Compress();
     Joined.Compress();
     Birth.Compress();
     Interests.Compress();
     Premiums.Compress();
 }
Beispiel #14
0
        string GetDirectoryName()
        {
            StringBuilder b = new StringBuilder();

            b.Append("Arbitrage\\Dependency\\");
            b.Append(SecondName.Exchange);
            b.Append("_");
            b.Append(SecondName.Ticker);
            FirstNames.ForEach((f) => {
                b.Append("_");
                b.Append(f.Exchange);
                b.Append("_");
                b.Append(f.Ticker);
            });
            return(b.ToString());
        }
        public ParsedName Parse(string rawName)
        {
            var match = Rx.Match(rawName);

            if (!match.Success)
            {
                return(null);
            }
            var firstName = match.Groups["first"].Value;

            if (!FirstNames.Contains(firstName))
            {
                return(null);
            }

            var pn = new ParsedName {
                FirstName   = match.Groups["first"].Value,
                LastName    = $"{match.Groups["last1"].Value} {match.Groups["last2"].Value}",
                DisplayName = $"{match.Groups["first"].Value} {match.Groups["last1"].Value} {match.Groups["last2"].Value}",
                Score       = 100
            };

            return(pn);
        }
        public ContactPersonalData CreateValueObject()
        {
            if (string.IsNullOrEmpty(FirstName) || string.IsNullOrEmpty(LastName))
            {
                throw new NoRequiredDataProvidedForPersonalData(this);
            }

            FirstNames firstNames      = new FirstNames(FirstName, AdditionalFirstNames.Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries));
            var        tmpLastAddNames = AdditionalLastNames.Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries);
            LastNames  lastNames       = UseDashBeetwenLastNames && tmpLastAddNames.Length == 1 ? new LastNames(LastName, AdditionalLastNames) : new LastNames(LastName, tmpLastAddNames);

            DateTime?    dateOfBirth = DateOfBirthNotSpecified ? new DateTime?() : DateOfBirth;
            Sex          sex         = IsMale ? Sex.Male : (IsFemale ? Sex.Female : Sex.Unknown);
            RelationType relation    = RelationType.None;

            foreach (var relationType in Relations.Where(c => c.IsChecked))
            {
                relation = relation | relationType.RelationType;
            }

            ContactPersonalData contactPersonalData = new ContactPersonalData(firstNames, lastNames, dateOfBirth, sex, relation);

            return(contactPersonalData);
        }
Beispiel #17
0
        public void SetupPrimaryNation(Vic2World world)
        {
            if (Name == "british_north_america")
            {
                Console.WriteLine();
            }
            //if(isNeoCulture)
            //{
            //	return;
            //}
            if (world.CultureNations.GetSublist("except").Values.Contains(Name))
            {
                // this culture is blacklisted
                return;
            }
            if (world.CultureNations.GetSublist("primary").KeyValuePairs.ContainsKey(Name))
            {
                var tag = world.CultureNations.GetSublist("primary").GetString(Name);
                PrimaryNation = world.Vic2Countries.Find(c => c.CountryTag == tag) ?? new Vic2Country(world, tag, this);
            }
            else if (primaryKey != null)
            {
                PrimaryNation = world.Vic2Countries.Find(c => c.CountryTag == primaryKey) ?? new Vic2Country(world, primaryKey, this);
            }
            else if (eu4Cultures.Count == 1 && (eu4Cultures[0].PrimaryNation != null || isNeoCulture))
            {
                if (isNeoCulture)
                {
                    //find colonial nation matching the culture-region
                    PrimaryNation = world.Vic2Countries.Where(c => (c.Eu4Country?.Overlord ?? string.Empty) == PrimaryNation?.Eu4Country?.CountryTag && c.Eu4Country.IsColonialNation && world.Eu4Save.Continents.Where(cul => cul.Value == eu4Cultures[0].Continent && cul.Value.Provinces.Contains(c.Capital)).Count() != 0).FirstOrDefault();
                }
                else if (eu4Cultures[0].PrimaryNation != null)
                {
                    PrimaryNation = world.GetCountry(eu4Cultures[0].PrimaryNation) ?? new Vic2Country(world, world.V2Mapper.GetV2Country(eu4Cultures[0].PrimaryNation), this);
                }
            }
            else if (Group.Union == null && !isNeoCulture)
            {
                var tag = 'P' + world.NumCultureNations.ToString("D2");
                world.NumCultureNations++;
                PrimaryNation = new Vic2Country(world, tag, this);
            }


            if (PrimaryNation?.FemaleLeaders ?? false)
            {
                foreach (var eu4Culture in eu4Cultures)
                {
                    FirstNames.AddRange(eu4Culture.FemaleNames);
                }
            }
            if (Colour == null)
            {
                Colour = PrimaryNation?.MapColour;
                if (Colour == null)
                {
                    byte r          = 0;
                    byte g          = 0;
                    byte b          = 240;
                    byte threshhold = 8;
                    while (!isUnique(r, g, b, (byte)(threshhold * 4)))
                    {
                        r += (byte)(threshhold * 2);
                        if (r < threshhold * 2)
                        {
                            g += (byte)(threshhold * 4);


                            if (g < threshhold * 4)
                            {
                                b += (byte)(threshhold * 3);
                            }
                        }
                    }
                    Colour = new Colour(r, g, b);
                }

                if (PrimaryNation != null && PrimaryNation.MapColour == null)
                {
                    PrimaryNation.MapColour = Colour;
                }
            }
        }
Beispiel #18
0
        public static IEnumerable <string> RetrieveExampleList(string word)
        {
            word = word.ToLower();
            if (!word.StartsWith("something"))
            {
                if (word.StartsWith("the title") || word.StartsWith("a title"))
                {
                    word = word.Replace("the title ", string.Empty).Replace("a title ", string.Empty);
                }
                else
                {
                    Regex firstWordRegex = new Regex(@"^\w+ ");
                    word = firstWordRegex.Replace(word, "");
                    word = word.Replace("type of ", string.Empty);
                    word = word.Replace("kind of ", string.Empty);
                }
            }
            switch (word)
            {
            case "noun":
                return(Nouns.Take(3));

            case "adjective":
                return(Adjectives.Take(3));

            case "plural noun":
            case "noun (plural)":
                return(PluralNouns.Take(3));

            case "verb":
                return(Verbs.Take(3));

            case "number":
                Random rand = new Random();
                return(new List <string>()
                {
                    rand.Next(1, 999).ToString(), rand.Next(1, 999).ToString(), rand.Next(1, 999).ToString()
                });

            case @"verb ending in ""ing""":
                return(GerundVerbs.Take(3));

            case "adverb":
                return(Adverbs.Take(3));

            case "part of the body":
            case "body part":
                return(PartsOfBody.Take(3));

            case "liquid":
                return(Liquids.Take(3));

            case "place":
                return(Places.Take(3));

            case "animal":
                return(Animals.Take(3));

            case "food":
                return(Foods.Take(3));

            case "color":
                return(Colors.Take(3));

            case "verb (past tense)":
                return(PastTenseVerbs.Take(3));

            case "celebrity":
                return(Celebrities.Take(3));

            case "exclamation":
                return(Exclamations.Take(3));

            case "part of the body (plural)":
            case "body part (plural)":
                return(PluralBodyParts.Take(3));

            case "silly word":
                return(SillyWords.Take(3));

            case "animal (plural)":
                return(PluralAnimals.Take(3));

            case "city":
                return(Cities.Take(3));

            case "nonsense word":
                return(NonsenseWords.Take(3));

            case "famous person":
                return(FamousPeople.Take(3));

            case "article of clothing":
                return(Clothing.Take(3));

            case "vehicle":
                return(Vehicles.Take(3));

            case "something alive (plural)":
                return(PluralAliveSomethings.Take(3));

            case "geographical location":
                return(GeographicalLocations.Take(3));

            case "town":
                return(Towns.Take(3));

            case "country":
                return(Countries.Take(3));

            case "container":
                return(Containers.Take(3));

            case "last name":
                return(LastNames.Take(3));

            case "name":
                return(Names.Take(3));

            case @"verb ending in ""s""":
                return(VerbsEndingInS.Take(3));

            case "occupation":
            case "occupation or job":
            case "profession":
                return(Occupations.Take(3));

            case "silly noise":
                return(SillyNoises.Take(3));

            case "male celebrity":
            case "celebrity (male)":
                return(MaleCelebrities.Take(3));

            case "article of clothing (plural)":
                return(PluralClothing.Take(3));

            case "name of a school":
            case "school":
                return(Schools.Take(3));

            case "building":
                return(Buildings.Take(3));

            case "bird":
                return(Birds.Take(3));

            case @"adjective ending in ""est""":
            case "adjective (superlative)":
                return(Superlatives.Take(3));

            case "letter":
                return(Letters.Take(3));

            case "game":
                return(Games.Take(3));

            case "holiday":
                return(Holidays.Take(3));

            case "silly word (plural)":
                return(PluralSillyWords.Take(3));

            case "something round":
                return(RoundSomethings.Take(3));

            case "piece of furniture":
                return(Furniture.Take(3));

            case "vegetable":
                return(Vegetables.Take(3));

            case "spanish word":
                return(SpanishWords.Take(3));

            case "tv actor":
                return(TVActors.Take(3));

            case "boy's name":
                return(BoyNames.Take(3));

            case "something alive":
                return(AliveSomethings.Take(3));

            case "female celebrity":
            case "celebrity (female)":
                return(FemaleCelebrities.Take(3));

            case "italian word":
                return(ItalianWords.Take(3));

            case "occupation (plural)":
                return(PluralOccupations.Take(3));

            case "first name":
                return(FirstNames.Take(3));

            case "room in a house":
                return(HouseRooms.Take(3));

            case "relative":
                return(Relatives.Take(3));

            case "movie star":
                return(MovieStars.Take(3));

            case "disease":
                return(Diseases.Take(3));

            case "sport":
                return(Sports.Take(3));

            case "something icky":
                return(IckySomethings.Take(3));

            case "actor":
                return(Actors.Take(3));

            case "concept or ideal":
                return(Concepts.Take(3));

            default:
                return(new string[3] {
                    string.Empty, string.Empty, string.Empty
                });
            }
        }
Beispiel #19
0
 public Person(FirstNames firstNames, LastName lastName, Email email)
 {
     FirstNames = firstNames;
     LastName   = lastName;
     Email      = email;
 }
        public TableRecordModel ConstructRecordModel(int recno)
        {
            TableRecordModel newRecord = null;
            string           tablename = name;

            // Need to reverse the name if BE
            if (BigEndian)
            {
                string rev = ConvertBE(name);
                tablename = rev;
            }

            switch (tablename)
            {
            case EditorModel.CITY_TABLE:
                newRecord = new CityRecord(recno, this, parentModel);
                break;

            case EditorModel.COACH_TABLE:
            {
                // coch table in streameddata is different than ros/fra
                if (parentModel.FileType == MaddenFileType.Streameddata)
                {
                    newRecord = new CoachCollection(recno, this, parentModel);
                }
                else
                {
                    newRecord = new CoachRecord(recno, this, parentModel);
                }
                break;
            }

            case EditorModel.SALARY_CAP_TABLE:
                newRecord = new SalaryCapRecord(recno, this, parentModel);
                break;

            case EditorModel.COACH_SLIDER_TABLE:
                newRecord = new CoachPrioritySliderRecord(recno, this, parentModel);
                break;

            case EditorModel.TEAM_CAPTAIN_TABLE:
                newRecord = new TeamCaptainRecord(recno, this, parentModel);
                break;

            case EditorModel.OWNER_TABLE:
                newRecord = new OwnerRecord(recno, this, parentModel);
                break;

            case EditorModel.DEPTH_CHART_TABLE:
                newRecord = new DepthChartRecord(recno, this, parentModel);
                break;

            case EditorModel.INJURY_TABLE:
                newRecord = new InjuryRecord(recno, this, parentModel);
                break;

            case EditorModel.PLAYER_TABLE:
                newRecord = new PlayerRecord(recno, this, parentModel);
                break;

            case EditorModel.TEAM_TABLE:
                newRecord = new TeamRecord(recno, this, parentModel);
                break;

            case EditorModel.SCHEDULE_TABLE:
                newRecord = new ScheduleRecord(recno, this, parentModel);
                break;

            case EditorModel.STADIUM_TABLE:
                newRecord = new StadiumRecord(recno, this, parentModel);
                break;

            case EditorModel.UNIFORM_TABLE:
                newRecord = new UniformRecord(recno, this, parentModel);
                break;

            // MADDEN DRAFT EDIT
            case EditorModel.DRAFT_PICK_TABLE:
                newRecord = new DraftPickRecord(recno, this, parentModel);
                break;

            case EditorModel.DRAFTED_PLAYERS_TABLE:
                newRecord = new RookieRecord(recno, this, parentModel);
                break;

            case EditorModel.BOXSCORE_DEFENSE_TABLE:
                newRecord = new BoxScoreDefenseRecord(recno, this, parentModel);
                break;

            case EditorModel.BOXSCORE_OFFENSE_TABLE:
                newRecord = new BoxScoreOffenseRecord(recno, this, parentModel);
                break;

            case EditorModel.CAREER_STATS_DEFENSE_TABLE:
                newRecord = new CareerStatsDefenseRecord(recno, this, parentModel);
                break;

            case EditorModel.CAREER_STATS_OFFENSE_TABLE:
                newRecord = new CareerStatsOffenseRecord(recno, this, parentModel);
                break;

            case EditorModel.SEASON_STATS_DEFENSE_TABLE:
                newRecord = new SeasonStatsDefenseRecord(recno, this, parentModel);
                break;

            case EditorModel.SEASON_STATS_OFFENSE_TABLE:
                newRecord = new SeasonStatsOffenseRecord(recno, this, parentModel);
                break;

            case EditorModel.TEAM_SEASON_STATS:
                newRecord = new TeamSeasonStatsRecord(recno, this, parentModel);
                break;

            case EditorModel.FRANCHISE_TIME_TABLE:
                newRecord = new FranchiseTimeRecord(recno, this, parentModel);
                break;

            case EditorModel.BOXSCORE_TEAM_TABLE:
                newRecord = new BoxScoreTeamStats(recno, this, parentModel);
                break;

            case EditorModel.BOXSCORE_OFFENSIVE_LINE_TABLE:
                newRecord = new BoxScoreOffensiveLineRecord(recno, this, parentModel);
                break;

            case EditorModel.SEASON_STATS_OFFENSIVE_LINE_TABLE:
                newRecord = new SeasonStatsOffensiveLineRecord(recno, this, parentModel);
                break;

            case EditorModel.CAREER_STATS_OFFENSIVE_LINE_TABLE:
                newRecord = new CareerStatsOffensiveLineRecord(recno, this, parentModel);
                break;

            case EditorModel.CAREER_GAMES_PLAYED_TABLE:
                newRecord = new CareerGamesPlayedRecord(recno, this, parentModel);
                break;

            case EditorModel.SEASON_GAMES_PLAYED_TABLE:
                newRecord = new SeasonGamesPlayedRecord(recno, this, parentModel);
                break;

            case EditorModel.CAREER_STATS_KICKPUNT_TABLE:
                newRecord = new CareerPuntKickRecord(recno, this, parentModel);
                break;

            case EditorModel.SEASON_STATS_KICKPUNT_TABLE:
                newRecord = new SeasonPuntKickRecord(recno, this, parentModel);
                break;

            case EditorModel.CAREER_STATS_KICKPUNT_RETURN_TABLE:
                newRecord = new CareerPKReturnRecord(recno, this, parentModel);
                break;

            case EditorModel.SEASON_STATS_KICKPUNT_RETURN_TABLE:
                newRecord = new SeasonPKReturnRecord(recno, this, parentModel);
                break;

            case EditorModel.SCOUTING_STATE_TABLE:
                newRecord = new ScoutingStateRecord(recno, this, parentModel);
                break;

            case EditorModel.RFA_STATE_TABLE:
                newRecord = new RFAStateRecord(recno, this, parentModel);
                break;

            case EditorModel.RFA_PLAYERS:
                newRecord = new RestrictedFreeAgentPlayers(recno, this, parentModel);
                break;

            case EditorModel.RFA_SALARY_TENDERS:
                newRecord = new RestrictedFreeAgentSigningTenders(recno, this, parentModel);
                break;

            case EditorModel.RESIGN_PLAYERS_STATE_TABLE:
                newRecord = new ResignPlayersStateRecord(recno, this, parentModel);
                break;

            case EditorModel.FREE_AGENCY_STATE_TABLE:
                newRecord = new FreeAgencyStateRecord(recno, this, parentModel);
                break;

            case EditorModel.DRAFT_STATE_TABLE:
                newRecord = new DraftStateRecord(recno, this, parentModel);
                break;

            case EditorModel.FRANCHISE_STAGE_TABLE:
                newRecord = new FranchiseStageRecord(recno, this, parentModel);
                break;

            case EditorModel.GAME_OPTIONS_TABLE:
                newRecord = new GameOptionRecord(recno, this, parentModel);
                break;

            case EditorModel.PLAYER_AWARDS_TABLE:
                newRecord = new YearlyAwards(recno, this, parentModel);
                break;

            case EditorModel.FREE_AGENT_PLAYERS:
                newRecord = new FreeAgentPlayers(recno, this, parentModel);
                break;

            case EditorModel.COACHES_EXPECTED_SALARY:
                newRecord = new CoachExpectedSalary(recno, this, parentModel);
                break;

            case EditorModel.COACHING_HISTORY_TABLE:
                newRecord = new CoachHistory(recno, this, parentModel);
                break;

            case EditorModel.PROGRESSION_SCHEDULE:
                newRecord = new ProgressionSchedule(recno, this, parentModel);
                break;

            case EditorModel.USER_OPTIONS_TABLE:
                newRecord = new UserOptionRecord(recno, this, parentModel);
                break;

            case EditorModel.TEAM_RIVAL_HISTORY:
                newRecord = new TeamRivalHistory(recno, this, parentModel);
                break;

            case EditorModel.PRO_BOWL_PLAYERS:
                newRecord = new ProBowlPlayer(recno, this, parentModel);
                break;

            case EditorModel.USER_INFO_TABLE:
                newRecord = new UserInfoRecord(recno, this, parentModel);
                break;

                #region Streamed Data
            case EditorModel.COLLEGES_TABLE:
                newRecord = new CollegesRecord(recno, this, parentModel);
                break;

            case EditorModel.PLAYER_FIRST_NAMES:
                newRecord = new FirstNames(recno, this, parentModel);
                break;

            case EditorModel.PLAYER_LAST_NAMES:
                newRecord = new LastNames(recno, this, parentModel);
                break;

            case EditorModel.ROLES_DEFINE:
                newRecord = new PRDF(recno, this, parentModel);
                break;

            case EditorModel.ROLES_INFO:
                newRecord = new RoleInfo(recno, this, parentModel);
                break;

            case EditorModel.ROLES_PLAYER_EFFECTS:
                newRecord = new RolePlayerEffects(recno, this, parentModel);
                break;

            case EditorModel.ROLES_TEAM_EFFECTS:
                newRecord = new RoleTeamEffects(recno, this, parentModel);
                break;

            case EditorModel.STATS_REQUIRED:
                newRecord = new SuperStarStatsRequired(recno, this, parentModel);
                break;

            case EditorModel.PROGRESSION:
                newRecord = new PlayerProgression(recno, this, parentModel);
                break;

            case EditorModel.REGRESSION:
                newRecord = new PlayerRegression(recno, this, parentModel);
                break;

            case EditorModel.PTCB:
                newRecord = new ProgressionTracking(recno, this, parentModel);
                break;

            case EditorModel.PTCE:
                newRecord = new ProgressionTracking(recno, this, parentModel);
                break;

            case EditorModel.PTDE:
                newRecord = new ProgressionTracking(recno, this, parentModel);
                break;

            case EditorModel.PTDT:
                newRecord = new ProgressionTracking(recno, this, parentModel);
                break;

            case EditorModel.PTFB:
                newRecord = new ProgressionTracking(recno, this, parentModel);
                break;

            case EditorModel.PTFS:
                newRecord = new ProgressionTracking(recno, this, parentModel);
                break;

            case EditorModel.PTGA:
                newRecord = new ProgressionTracking(recno, this, parentModel);
                break;

            case EditorModel.PTHB:
                newRecord = new ProgressionTracking(recno, this, parentModel);
                break;

            case EditorModel.PTKI:
                newRecord = new ProgressionTracking(recno, this, parentModel);
                break;

            case EditorModel.PTKP:
                newRecord = new ProgressionTracking(recno, this, parentModel);
                break;

            case EditorModel.PTMB:
                newRecord = new ProgressionTracking(recno, this, parentModel);
                break;

            case EditorModel.PTOB:
                newRecord = new ProgressionTracking(recno, this, parentModel);
                break;

            case EditorModel.PTPU:
                newRecord = new ProgressionTracking(recno, this, parentModel);
                break;

            case EditorModel.PTQB:
                newRecord = new ProgressionTracking(recno, this, parentModel);
                break;

            case EditorModel.PTSS:
                newRecord = new ProgressionTracking(recno, this, parentModel);
                break;

            case EditorModel.PTTA:
                newRecord = new ProgressionTracking(recno, this, parentModel);
                break;

            case EditorModel.PTTE:
                newRecord = new ProgressionTracking(recno, this, parentModel);
                break;

            case EditorModel.PTWR:
                newRecord = new ProgressionTracking(recno, this, parentModel);
                break;

                #endregion

            case EditorModel.POSITION_SUBS:
                newRecord = new PlayerSubs(recno, this, parentModel);
                break;

            case EditorModel.DEPTH_CHART_SUBS:
                newRecord = new DepthChartSubs(recno, this, parentModel);
                break;

            case EditorModel.SALARY_CAP_INCREASE:
                newRecord = new SalaryCapIncrease(recno, this, parentModel);
                break;

            case EditorModel.PLAYER_MINIMUM_SALARY_TABLE:
                newRecord = new SalaryYearsPro(recno, this, parentModel);
                break;

            case EditorModel.PLAYER_SALARY_DEMAND_TABLE:
                newRecord = new PlayerSalaryDemands(recno, this, parentModel);
                break;

            case EditorModel.INACTIVE_TABLE:
                newRecord = new InactiveRecord(recno, this, parentModel);
                break;

            case EditorModel.LEAGUE_REVENUE_TABLE:
                newRecord = new LeagueRevenue(recno, this, parentModel);
                break;

            case EditorModel.OWNER_REVENUE_TABLE:
                newRecord = new OwnerRevenue(recno, this, parentModel);
                break;

            case EditorModel.WEEKLY_INCOME_TABLE:
                newRecord = new Income(recno, this, parentModel);
                break;

            case EditorModel.TEAM_WIN_LOSS_RECORD:
                newRecord = new TeamWinLossRecord(recno, this, parentModel);
                break;

            // DB Templates
            case EditorModel.PLAYER_OVERALL_CALC:
                newRecord = new OverallRecord(recno, this, parentModel);
                break;

            case EditorModel.PLAYBOOK_TABLE:
                newRecord = new FRAPlayBooks(recno, this, parentModel);
                break;

            default:
                newRecord = new TableRecordModel(recno, this, parentModel);
                break;
            }

            //Add the new record to our list of records
            recordList.Add(newRecord);

            return(newRecord);
        }
Beispiel #21
0
 public static Host GenerateHost() => new Host
 {
     Name     = $"{FirstNames.GetRandom()} {LastNames.GetRandom()}",
     Job      = $"{Jobs1.GetRandom()} {Jobs2.GetRandom()}",
     ImageUrl = ImageUrls.GetRandom(),
 };
Beispiel #22
0
 public IActionResult OnFirstNameAutoComplete(string prefix)
 {
     return new JsonResult( FirstNames.Where(x => x.StartsWith(prefix)) );
 }
        public string GetFirstName(int localeId)
        {
            var nameDTO = FirstNames.FirstOrDefault(f => f.LocaleId == localeId);

            return(nameDTO?.Name);
        }