Example #1
0
        public void AddReplacement(KeyReplacement key)
        {
            if (replacements.Any(x => x.Equals(key)))
            {
                throw new Exception($"Replacement \"{key.ToString()}\" already exists");
            }

            replacements.Add(key);
            statistics.Add(key, new KeyStatistics());
        }
Example #2
0
        public void RemoveReplacement(KeyReplacement key)
        {
            if (!replacements.Contains(key))
            {
                throw new Exception($"Replacement \"{key.ToString()}\" not found");
            }

            replacements.Remove(key);
            statistics.Remove(key);
        }
Example #3
0
 public KeyStatsEventArgs(KeyReplacement replacement, KeyStatistics statistics)
 {
     Replacement = replacement;
     Statistics  = statistics;
 }