public void RemoveSelectedGameBase() { if (SelectedGameBase == null) { throw new GameBaseException("The GameBase that you want to delete has to be selected first"); } else { LGameBases.Remove(SelectedGameBase); SelectedGameBase = null; } }
public void AddBaseToList() { if (String.IsNullOrWhiteSpace(TempBase.Name)) { throw new GameBaseException($"A BaseName with no value is not valid!"); } if (String.IsNullOrWhiteSpace(TempBase.Tid)) { throw new GameBaseException($"A TitleID with no value is not valid!"); } if (String.IsNullOrWhiteSpace(NonHashedKey)) { throw new GameBaseException($"A TitleKey with no value is not valid!"); } TempBase.KeyHash = NonHashedKey.ToLower().GetHashCode(); NonHashedKey = string.Empty; LGameBases.Add(TempBase); TempBase = new GameBases(); }