// Removes a notification form from the static list. private static void RemoveForm(Notification form) { if (_notificationForms.Contains(form)) { _notificationForms[_notificationForms.IndexOf(form)] = null; } }
// Adds a notification form to the static list. private static int AddForm(Notification form) { int indexPosition = 0; for (int i = 0; i <= _notificationForms.Count; i++) { if (i == _notificationForms.Count) { indexPosition = i; _notificationForms.Add(form); break; } if (_notificationForms[i] == null) { indexPosition = i; _notificationForms[i] = form; break; } } return indexPosition; }