public static void AddHistoryUnique(String line) { if (line == null) line = String.Empty; if (history.Count == 0 || ((string)(history[history.Count - 1])) != line) AddHistory(line); }