public SelectableOptionViewModel(ISyncSelectionOption option, SyncOptionListViewModel parentList, SelectableOptionViewModel parent, string filter) { string str; this.isExpanded = true; this.lockObject = new object(); if (option == null) { throw new ArgumentNullException("option"); } this.Option = option; this.parentVm = parent; this.parentListVm = parentList; this.filterString = filter; if (parentList != null) { this.isAutoSelected = parentList.IsAutoSelected; this.autoSelectionValue = parentList.AutoSelectionValue; } if (StringUtilities.HasArticlePrefix(option.Label, out str)) { this.sortString = str; } this.InitViewModel(); }
private void RemoveOption(ISyncSelectionOption option) { SelectableOptionViewModel item = (from vmo in this where vmo.Option == option select vmo).FirstOrDefault <SelectableOptionViewModel>(); if (item != null) { base.Remove(item); item.Dispose(); } }
public void RemoveChildSelectableOption(ISyncSelectionOption childOption) { throw new NotImplementedException(); }
public SelectableOptionViewModel(ISyncSelectionOption option, SyncOptionListViewModel parentList, string filter) : this(option, parentList, null, filter) { }
public SelectableOptionViewModel(ISyncSelectionOption option, SyncOptionListViewModel parentList, SelectableOptionViewModel parent) : this(option, parentList, parent, null) { }
private void AddNewOption(ISyncSelectionOption newOption) { base.Add(new SelectableOptionViewModel(newOption, this, this.parent, this.FilterString)); }