/// <summary>
        /// Display any errors that occured
        /// </summary>
        /// <param name="key">the key provided from POTENTIAL_ERRORS</param>
        /// <param name="errorStr">the error string to append to</param>
        /// <param name="reason">the reason for the error</param>
        /// <param name="isCypher">true if the error is apart of the cypher, false if it is the string</param>
        private void CheckForErrors(POTENTIAL_ERRORS key, ref string errorStr, string reason, bool isCypher = true, bool isLetterError = false)
        {
            if (errors.ContainsKey(key))
            {
                if (errorStr == "")
                {
                    errorStr += "Errors with " + (isCypher ? "Cypher: " + cypher : (isLetterError ? "Letters: " + letters : "String: " + str)) + "\n";
                }

                errorStr += reason + ": " + BasicFunctions.RunThroughList(errors[key]);
            }
        }
예제 #2
0
 /// <summary>
 /// Displays the letters that cause the rotor to rotate
 /// </summary>
 /// <returns></returns>
 private string DisplayRotationLetters()
 {
     return(BasicFunctions.RunThroughList(new List <char>(rotorRotateLetters)));
 }