void item_PropertyChanged(object sender, PropertyChangedEventArgs e) { if (item.IsNew && !item.IsEmpty) { item.IsNew = false; editor.AddNewItem(); } editor.UpdateValue(); var handler = PropertyChanged; if (handler != null) { handler(this, e); } }
#pragma warning restore 67 public void Execute(object parameter) { if (editor.list.Count < 2) { editor.list[0].IsNew = false; item.Key = string.Empty; item.Value = string.Empty; } else { editor.list.Remove(item); editor.UpdateValue(); } if (editor.list.Count == 1) { editor.list[0].IsNew = true; } }