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()); } }
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); }
public void RemoveDups() { List <int> cur = null; for (int i = 0; i < this.categories.Length; i++) { cur = new List <int>(this.categories[i].values); FaceForm.RemoveDups(cur); this.categories[i].values = cur.ToArray(); } }
private void mFacePictureBox_Click(object sender, EventArgs e) { if (sFaceForm == null) { sFaceForm = new FaceForm(); } if (sFaceForm.ShowDialog(this) == DialogResult.OK) { SetControlValue("Photo", sFaceForm.SelectedFace); } }
public string[] GetPhotos(string key) { string[] retVal = null; GenericArrayObj target = null; foreach (GenericArrayObj current in this.categories) { if (key == current.key) { target = current; break; } } if (target != null) { List <int> pictures = new List <int>(target.values); FaceForm.RemoveDups(pictures); retVal = FaceForm.GetPictures(pictures); } return(retVal); }
private string GetUnclassifiedPlayers() { List <int> classifiedPlayers = new List <int>(); foreach (GenericArrayObj dude in mCategories.categories) { classifiedPlayers.AddRange(dude.values); } FaceForm.RemoveDups(classifiedPlayers); List <string> classifiedPlayerPics = new List <string>(FaceForm.GetPictures(classifiedPlayers)); StringBuilder builder = new StringBuilder(); foreach (string pfile in mAllPhotoFiles) { if (classifiedPlayerPics.IndexOf(pfile) == -1) { builder.Append(pfile); builder.Append("\r\n"); } } return(builder.ToString()); }
private void mFacePictureBox_Click(object sender, EventArgs e) { FaceForm form = new FaceForm(); form.ShowDialog(this); form.Dispose(); }