示例#1
0
 public void Remove(DriverTag tag)
 {
     Removed.Add(new RemovedTag(tag));
     DriverTag.Remove(tag.Id);
     Update();
     _restoreDeletedCommand.RaiseCanExecuteChanged();
 }
示例#2
0
            public TagEntry(ViewModel model, DriverTag tag)
            {
                _model = model;

                Tag       = tag;
                IsBuiltIn = ReferenceEquals(tag, DriverTag.FriendTag);
            }
示例#3
0
            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;
                }
            }
示例#4
0
 public RemovedTag(DriverTag tag)
 {
     Tag   = tag;
     Names = DriverTag.GetNames(tag.Id).ToList();
 }
示例#5
0
 private IEnumerable <TagEntry> GetList()
 {
     return(DriverTag.GetTags().Select(x => new TagEntry(this, x)));
 }