/// <summary> Default constructor. </summary> public AbelAPI() { Name = "Abel"; // Map ringing events to A-Y missing out F and J // Add bells 1-16 int command = 0; for (int i = 0; i < numberOfBells; i++) { // Skip F and J if ((char)('A' + command) == 'F' || (char)('A' + command) == 'J') { command++; } RingingCommandToChar.Add((i + 1).ToString(), (char)('A' + command++)); } // Add remaining commands foreach (string key in Abel_RingingCommandToChar.Keys) { RingingCommandToChar.Add(key, Abel_RingingCommandToChar[key]); } // For all these commands, key.ToString()[0] matches the desired character. // Therefore, there's no need to add keys to KeypressToRingingCommand. }
/// <summary> Default constructor. </summary> public BeltowerAPI() { Name = "Beltower"; for (int i = 0; i < 9; i++) { RingingCommandToChar.Add((i + 1).ToString(), (char)(i + '1')); } foreach (string key in BelTower_RingingCommandToChar.Keys) { RingingCommandToChar.Add(key, BelTower_RingingCommandToChar[key]); } foreach (string key in BelTower_KeypressToRingingCommand.Keys) { KeypressToRingingCommand.Add(key, BelTower_KeypressToRingingCommand[key]); } }