Exemple #1
0
 public void DeleteCurrentIp()
 {
     if (AllowIpHistory.Remove(AllowIp))
     {
         AllowIp = AllowIpHistory.FirstOrDefault();
         SaveCurrentProfile();
     }
 }
Exemple #2
0
        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}");
        }