public void DeleteSmalFile() //Kasowanie małych plików { string[] mstFiles = Directory.GetFiles("bossa", "*.mst").Select(Path.GetFileName).ToArray(); Parallel.For(0, mstFiles.Length, new ParallelOptions() { MaxDegreeOfParallelism = Environment.ProcessorCount }, isx => { string[] myFile = File.ReadAllLines(@"bossa/" + mstFiles[isx]); var DataGielda = _loadAppData.LoadStructureGameReadOnlyColection2(myFile); if (DataGielda.Count < 200) // odrzucamy pliki poniżej 200 lini; { try { System.IO.File.Delete(@"bossa/" + mstFiles[isx]); } catch (System.IO.IOException) { } } }); }
private async void GameAnalaizerButton_Click(object sender, RoutedEventArgs e) { try { string[] myFile = File.ReadAllLines(@"bossa/" + GameComboBox.Text); var DataGielda = _loadAppData.LoadStructureGameReadOnlyColection2(myFile); if (GameOptionComboBox.Text == "Obciążenie aplikacji (100%)") { await _AppFullDataAnalaizer.AllFileTestAllCore(); } if (GameOptionComboBox.Text == "Obciążenie aplikacji (1 wątek)") { _AppFullDataAnalaizer.AllFileTestOneCore(); } if (GameOptionComboBox.Text == "Ostatnie notowanie") { _SChart.Note(DataGielda); } } catch (Exception) { } }