예제 #1
0
        private void Add()
        {
            var newEntry = new Entry(destinationText.Text, redirectingText.Text, true);

            this.SetDefaultInput();
            this.fileIO.Entries.Add(newEntry);
            this.fileIO.WriteEntriesToFile();
            this.UpdateLists();
        }
예제 #2
0
 private void DeleteFromList(ListBox.SelectedObjectCollection searchItems, Entry searchEntry)
 {
     for (int i = 0; i < searchItems.Count; i++)
     {
         var entry = (Entry) searchItems[i];
         if (entry.EqualToEntry(searchEntry))
         {
             this.fileIO.Entries.Remove(entry);
             return;
         }
     }
 }
예제 #3
0
 public bool EqualToEntry(Entry compare)
 {
     return ((compare.Destination == this.Destination) && (compare.Redirecting == this.Redirecting));
 }