public void RunProcesses(string path) { Reader reader = new Reader(); string[] contentOfFile = reader.ReadCities(path); if (contentOfFile != null) { _repository.PrepareData(contentOfFile); SearcherOfRoutes searcher = new SearcherOfRoutes(_repository); FoundRoute foundRoute = searcher.SearchRoutesInManyPlaces(); Writer.WriteInformationsAboutFoundRoute(foundRoute, path); } }
private void OpenAndReadFile(object sender, EventArgs e) { Reader reader = new Reader(); string[] contentOfFile = reader.ReadCities(); if (contentOfFile != null) { _filePath = reader.FilePath; _repository.PrepareData(contentOfFile); _travellingSalesmanGui.EnableSearchButton(); _travellingSalesmanGui.UpdateTextBoxesAfterReadingFile(_repository.Cities.Count, _repository.FactorK); } }