public void AddInput(string nInput) { if (nInput != null) { InputList.Add(nInput); InputIndex = InputList.Count; if (InputList.Count > CMD_COUNT_MAX) { int numToRemove = InputList.Count - CMD_COUNT_MAX; for (int i = 0; i < numToRemove; i++) { InputList.RemoveRange(0, numToRemove); } } } }