using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace HashCalculator.GUI { internal class Model { private readonly ViewModel _viewModel; private readonly FileSystemSuggestions _suggestions = new FileSystemSuggestions(); public Model(ViewModel viewModel) { _viewModel = viewModel; } public void UpdateMainInputSuggestions() { var mainInput = _viewModel.MainInput; var inputValue = mainInput.Text; if (inputValue != null) { mainInput.Items = _suggestions.ProvideFileSystemSuggestions(inputValue) .Prepend(new InputEntry(InputEntryType.Text, inputValue, inputValue)); } } } }