Ejemplo n.º 1
0
 public void AddEntry()
 {
     if (!NewEntry.HasErrors)
     {
         Entries.Add(NewEntry);
         NewEntry = new IPWhitelistEntry();
     }
 }
Ejemplo n.º 2
0
 public IPWhitelist()
 {
     AddEntryCommand    = new DelegateCommand(AddEntry);
     RemoveEntryCommand = new DelegateCommand(RemoveEntry);
     Entries            = new ObservableCollection <IPWhitelistEntry>();
     NewEntry           = new IPWhitelistEntry();
     if (Settings.Default.IPWhitelist != null)
     {
         foreach (string entry in Settings.Default.IPWhitelist)
         {
             Entries.Add(new IPWhitelistEntry(entry));
         }
     }
     Entries.CollectionChanged += Entries_CollectionChanged;
 }