/// <summary> /// Creates a new <see cref="AddSendToItemForm"/>. /// </summary> /// <param name="sendToList">The <see cref="SendToList"/> that receives the new item</param> public AddSendToItemForm(SendToList sendToList, ParametersChecker parametersChecker) { _sendToList = sendToList; _parametersChecker = parametersChecker; InitializeComponent(); }
/// <summary> /// Creates a new <see cref="EditSendToItemForm"/>. /// </summary> /// <param name="sendToList">The <see cref="SendToList"/> containing the item to edit</param> public EditSendToItemForm(SendToList sendToList, ParametersChecker parametersChecker) { _checker = parametersChecker; _sendToList = sendToList; InitializeComponent(); }
public Memento(SendToList currentList) { _mementoedList = currentList; foreach (var currentItem in currentList._items) { _originalItems.Add(currentItem.Key, currentItem.Value.DeepClone()); } }
public SendToForm(SendToList sendToList, IFormFactory formFactory, ParametersChecker parametersChecker) { _sendToList = sendToList; _formFactory = formFactory; _parametersChecker = parametersChecker; _itemBackup = _sendToList.GetStateMemento(); // Create copy of list in case 'Cancel' is pressed InitializeComponent(); _sendToList.CollectionChanged += SendToList_CollectionChanged; SendToList_CollectionChanged(_sendToList, EventArgs.Empty); }