Beispiel #1
0
        private void RaiseLanguageRemoveInteractionRequest(GeneralLanguage selectedItem)
        {
            var confirmation = new ConditionalConfirmation
            {
                Title   = "Remove confirmation".Localize(null, LocalizationScope.DefaultCategory),
                Content = string.Format("Are you sure you want to remove Language '{0}'?".Localize(), selectedItem.LanguageCode)
            };

            LanguageCommonConfirmRequest.Raise(confirmation,
                                               (x) =>
            {
                if (x.Confirmed)
                {
                    if (AddedItems.Contains(selectedItem))
                    {
                        AddedItems.Remove(selectedItem);
                    }
                    else
                    {
                        if (UpdatedItems.Contains(selectedItem))
                        {
                            UpdatedItems.Remove(selectedItem);
                        }
                        RemovedItems.Add(selectedItem);
                    }
                    InnerItems.Remove(selectedItem);
                }
            });
        }
Beispiel #2
0
 public void Remove(T item)
 {
     if (AddedItems.Contains(item))
     {
         AddedItems.Remove(item);
     }
     else
     {
         if (UpdatedItems.Contains(item))
         {
             UpdatedItems.Remove(item);
         }
         RemovedItems.Add(item);
     }
     InnerItems.Remove(item);
     item.PropertyChanged -= OnPropertyChanged;
 }