public static void SkipKey() { lock (Locker) { if (_currentIntex != Keys.Count - 1) { _currentIntex++; } else { _currentIntex = 0; } CurrentKey = Keys[_currentIntex]; OnChangeCurrentKey?.Invoke(CurrentKey, null); } }
public static void LoadKeys() { CheckFileExists(Path); using (var sr = new StreamReader(Path)) { while (true) { var str = sr.ReadLine(); if (str != null) { Keys.Add(str); } else { break; } } } CurrentKey = Keys[0]; OnChangeCurrentKey?.Invoke(CurrentKey, null); }