Пример #1
0
        private void CheckFaces()
        {
            FaceForm      ff = new FaceForm();
            StringBuilder sb = new StringBuilder();

            Tool.SetKey("Key=Position,fname,lname,Photo,Skin");
            sb.Append(Tool.GetKey(true, true).Replace("#", "Key="));
            sb.Append("\nLookupAndModify\n" +
                      "#Team=FreeAgents   (This line is a comment, but allows the player editor to function on this data)\n\n");

            string skin        = "";
            string face        = "";
            int    faceInt     = 0;
            int    playerLimit = 1928;

            for (int player = 0; player < playerLimit; player++)
            {
                skin    = Tool.GetPlayerField(player, "Skin");
                face    = Tool.GetAttribute(player, PlayerOffsets.Photo);
                faceInt = Int32.Parse(face);
                switch (skin)
                {
                case "Skin1":       // white guys
                case "Skin9":
                case "Skin17":
                    if (!ff.CheckFace(faceInt, "lightPlayers"))
                    {
                        sb.Append(Tool.GetPlayerData(player, true, true));
                        sb.Append("\n");
                    }
                    break;

                case "Skin2":      // mixed White&black(light) guys, Samoans
                case "Skin18":     // mixed White&black(light) guys, Samoans, Latino, White,
                    break;

                // dark guys
                case "Skin3":     // inconsistently assigned
                case "Skin4":
                case "Skin5":
                case "Skin6":
                case "Skin10":
                case "Skin11":
                case "Skin12":
                case "Skin13":
                case "Skin14":
                case "Skin19":
                case "Skin20":
                case "Skin21":
                case "Skin22":
                    if (!ff.CheckFace(faceInt, "darkPlayers"))
                    {
                        sb.Append(Tool.GetPlayerData(player, true, true));
                        sb.Append("\n");
                    }
                    break;
                }
            }
            MessageForm.ShowMessage("Results", sb.ToString(), SystemIcons.Information, false, false);
        }
Пример #2
0
        private void CheckDreads()
        {
            StringBuilder sb = new StringBuilder();
            FaceForm      ff = new FaceForm();
            string        dreads, photo;
            int           photo_i     = 0;
            int           playerLimit = 1928;

            for (int i = 0; i < playerLimit; i++)
            {
                photo   = Tool.GetPlayerField(i, "Photo");
                photo_i = Int32.Parse(photo);
                if (ff.CheckFace(photo_i, "Dreads"))
                {
                    dreads = Tool.GetPlayerField(i, "Dreads");
                    if (dreads != "Yes")
                    {
                        sb.Append(
                            String.Format("{0},{1},{2},Yes\n",
                                          Tool.GetPlayerField(i, "Position"),
                                          Tool.GetPlayerName(i, ','),
                                          photo
                                          ));
                    }
                }
            }
            if (sb.Length > 0)
            {
                sb.Insert(0,
                          "#Check these players\n\nLookupAndModify\n" +
                          "Key=Position,fname,lname,Photo,Dreads\n\n" +
                          "#Team=FreeAgents    (This line is a comment, but allows the player editor to function on this data)\n");
                MessageForm.ShowMessage("Verify Theese", sb.ToString());
            }
        }