public void DeleteCurrentIp() { if (AllowIpHistory.Remove(AllowIp)) { AllowIp = AllowIpHistory.FirstOrDefault(); SaveCurrentProfile(); } }
public void SaveCurrentProfile() { if (!AllowIpHistory.Contains(AllowIp)) { AllowIpHistory.Add(AllowIp); SetValue(string.Join("|", AllowIpHistory), $"AllowIpHistory"); } StoredValues[nameof(CurrentProfile)] = CurrentProfile; if (!Profiles.Contains(CurrentProfile)) { Profiles.Add(CurrentProfile); StoredValues[nameof(Profiles)] = string.Join("|", Profiles); } SetValue(ProtocolPort, $"ProtocolPort.{CurrentProfile}"); SetValue(NatAccess, $"NatAccess.{CurrentProfile}"); }