diff --git a/src/BIOSBuddy/BIOSBuddy.csproj b/src/BIOSBuddy/BIOSBuddy.csproj index ab258ef..79c23e7 100644 --- a/src/BIOSBuddy/BIOSBuddy.csproj +++ b/src/BIOSBuddy/BIOSBuddy.csproj @@ -1,6 +1,6 @@ - 1.0.6 + 1.0.8 WinExe net8.0-windows en diff --git a/src/BIOSBuddy/MainWindow.xaml.cs b/src/BIOSBuddy/MainWindow.xaml.cs index afa2e03..078c23a 100644 --- a/src/BIOSBuddy/MainWindow.xaml.cs +++ b/src/BIOSBuddy/MainWindow.xaml.cs @@ -40,7 +40,6 @@ public partial class MainWindow : IDisposable, IDcsBiosConnectionListener, ICate private readonly List _dcsbiosUIControlPanels = new(); private DCSBIOS _dcsBios; private bool _formLoaded; - private const int MAX_CONTROLS_ON_PAGE = 70; private DCSBIOSOutput _dcsbiosVersionOutput; private bool _checkDCSBIOSVersionOnce; private List _metaControls; @@ -309,14 +308,6 @@ private void UpdateComboBoxCategories() { var categoriesList = _loadedControls.Select(o => o.Category).DistinctBy(o => o).ToList(); - if (_loadedControls.Count() <= MAX_CONTROLS_ON_PAGE) - { - /* - * If there aren't many controls to show then allow the user to show - * all categories at once. - */ - categoriesList.Insert(0, "All"); - } ComboBoxCategory.DataContext = categoriesList; ComboBoxCategory.ItemsSource = categoriesList; ComboBoxCategory.Items.Refresh(); @@ -432,7 +423,7 @@ private void ShowControls(bool searching = false) /* * Limit only on category if user is not searching */ - if (string.IsNullOrEmpty(searchText) && ComboBoxCategory.SelectedValue != null && ComboBoxCategory.SelectedValue.ToString() != "All") + if (string.IsNullOrEmpty(searchText) && ComboBoxCategory.SelectedValue != null) { filteredControls = _loadedControls.Where(o => o.Category == ComboBoxCategory.SelectedValue.ToString()) .ToList(); @@ -444,13 +435,7 @@ private void ShowControls(bool searching = false) filteredControls = _loadedControls.Where(o => o.Description.ToLower().Contains(searchWord) || o.Identifier.ToLower().Contains(searchWord)) .ToList(); } - - if (filteredControls.Count() > MAX_CONTROLS_ON_PAGE) - { - Common.ShowMessageBox($"Query returned {filteredControls.Count()} DCS-BIOS Controls. Max controls that can be displayed at any time is {MAX_CONTROLS_ON_PAGE}."); - return; - } - + foreach (var dcsbiosControl in filteredControls) { var luaCommand = DCSBIOSControlLocator.GetLuaCommand(dcsbiosControl.Identifier, true);