// Изменен выбранный элемент списка установленного ПО private void ListViewSelectionChanged(object sender, EventArgs e) { if (_installedSoftView != null && _installedSoftView.View != null && _installedSoftView.View.CurrentItem == null) { if (InstalledSoft.Count > 0) { SelectedListItem = InstalledSoft.First(); } if (InstalledSoftView.Count > 0) { InstalledSoftView.MoveCurrentToFirst(); OnPropertyChanged("DelButtonIsEnable"); } } }
public InstallVM(Install inst, List <string> allSoft) { this.NsName = inst.NsName; this.UserFio = inst.UserFio; foreach (string softName in allSoft) { InstalledSoftVM isvm = new InstalledSoftVM(softName); string installedSoft = inst.InstalledSoft.Find(x => x == softName); if (installedSoft != null) { isvm.IsInstalled = true; } InstalledSoft.Add(isvm); } }