fix: hide unavalible engines from another windows

This commit is contained in:
Alex Z 2020-03-10 00:46:58 +03:00
parent 89efcb86a9
commit f3bf6dcb48
2 changed files with 6 additions and 4 deletions

View File

@ -9,6 +9,7 @@ using System.Collections.Generic;
using UniversalValveToolbox.Utils;
using System.Globalization;
using System.Collections;
using EpicMorg.SteamPathsLib;
namespace UniversalValveToolbox {
public partial class FormAddons : Form {
@ -29,7 +30,7 @@ namespace UniversalValveToolbox {
.Cast<DictionaryEntry>()
.ToArray();
model = new FormAddonViewModel(dataProvider.Addons, dataProvider.Engines, categories);
model = new FormAddonViewModel(dataProvider.Addons, dataProvider.Engines.Where(engine => SteamPathsUtil.GetSteamAppDataById(engine.Appid) != null).ToArray(), categories);
UpdateAddonsComboBox();
UpdateAddonCategoryComboBox();

View File

@ -1,4 +1,5 @@
using kasthack.binding.wf;
using EpicMorg.SteamPathsLib;
using kasthack.binding.wf;
using System;
using System.Collections.Generic;
using System.Linq;
@ -19,8 +20,8 @@ namespace UniversalValveToolbox {
public FormProjects() {
InitializeComponent();
model = new FormProjectViewModel(dataProvider.Projects, dataProvider.Engines);
model = new FormProjectViewModel(dataProvider.Projects, dataProvider.Engines.Where(engine => SteamPathsUtil.GetSteamAppDataById(engine.Appid) != null).ToArray());
UpdateComboBoxProject();
UpdateComboBoxEngine();