private string RefactorCreatureName(string input) { input = GrangerHelpers.RemoveAllPrefixes(input); input = input.Trim(); input = input.ToLowerInvariant(); string concatworker = ""; if (input.Length > 0) { concatworker = input[0].ToString().ToUpper(); } if (input.Length > 1) { concatworker += input.Substring(1); } return(concatworker); }
private void textBoxPasteUpdate_TextChanged(object sender, EventArgs e) { if (!textBoxPasteUpdateSelfUpdating) { textBoxPasteUpdateSelfUpdating = true; CreatureTrait[] parsedTraits = GrangerHelpers.ParseTraitsFromLine(textBoxPasteUpdate.Text); if (parsedTraits.Length == 0) { textBoxPasteUpdate.Text = "> no traits found in text <"; buttonApplyTraitsFromPasteText.Enabled = false; currentParsedTraits = null; } else { currentParsedTraits = parsedTraits; buttonApplyTraitsFromPasteText.Enabled = true; textBoxPasteUpdate.Text = "Found traits: " + string.Join(", ", parsedTraits.Select(x => x.ToCompactString())); } textBoxPasteUpdateSelfUpdating = false; } }