Пример #1
0
        private void CheckDreads()
        {
            string        prevKey = mTool.GetKey(true, true).Replace("#", "Key=");
            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   = mTool.GetPlayerField(i, "Photo");
                photo_i = Int32.Parse(photo);
                if (ff.CheckFace(photo_i, "Dreads"))
                {
                    dreads = mTool.GetPlayerField(i, "Dreads");
                    if (dreads != "Yes")
                    {
                        sb.Append(
                            String.Format("{0},{1},{2},Yes\n",
                                          mTool.GetPlayerField(i, "Position"),
                                          mTool.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 work)\n");
                MessageForm.ShowMessage("Verify Theese", sb.ToString());
            }
            ff.Dispose();
            mTool.SetKey(prevKey);
        }
Пример #2
0
        private void CheckFaces()
        {
            string        prevKey = mTool.GetKey(true, true).Replace("#", "Key=");
            FaceForm      ff      = new FaceForm();
            StringBuilder sb      = new StringBuilder();

            mTool.SetKey("Key=Position,fname,lname,Photo,Skin");
            sb.Append(mTool.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    = mTool.GetPlayerField(player, "Skin");
                face    = mTool.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(mTool.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(mTool.GetPlayerData(player, true, true));
                        sb.Append("\n");
                    }
                    break;
                }
            }
            MessageForm.ShowMessage("Results", sb.ToString(), SystemIcons.Information, false, false);
            ff.Dispose();
            mTool.SetKey(prevKey);
        }
Пример #3
0
 private void mFacePictureBox_Click(object sender, EventArgs e)
 {
     FaceForm form = new FaceForm();
     form.ShowDialog(this);
     form.Dispose();
 }