public void Remove(DriverTag tag) { Removed.Add(new RemovedTag(tag)); DriverTag.Remove(tag.Id); Update(); _restoreDeletedCommand.RaiseCanExecuteChanged(); }
public TagEntry(ViewModel model, DriverTag tag) { _model = model; Tag = tag; IsBuiltIn = ReferenceEquals(tag, DriverTag.FriendTag); }
private async void UpdateNames() { if (_updating) { return; } try { _updating = true; await Task.Delay(300); DriverTag.SetNames(Tag.Id, _data.Split('\n').Select(x => x.Trim()).Where(x => x.Length > 0)); } finally { _updating = false; } }
public RemovedTag(DriverTag tag) { Tag = tag; Names = DriverTag.GetNames(tag.Id).ToList(); }
private IEnumerable <TagEntry> GetList() { return(DriverTag.GetTags().Select(x => new TagEntry(this, x))); }