private void InitData()
 {
     // Task 1
     _weatherController      = new WeatherController(_weatherFiles);
     _sunConditionController = new SunConditionController(System.IO.Path.GetFullPath(_sunFile));
     MeteorogicalAnalysisView.Init(_weatherController, _sunConditionController);
     Calculate();
     MeteorogicalAnalysisView.TimePeriodChanged += Calculate;
 }
        private void ChooseData()
        {
            FolderBrowserDialog folderDialog = new FolderBrowserDialog();

            folderDialog.Description  = "Виберіть каталог метеорологічних даних регіону";
            folderDialog.SelectedPath = @"киев+\";
            if (folderDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                string        path  = folderDialog.SelectedPath;
                List <string> files = Directory.GetFiles(path, "*.xlsx").ToList();
                for (int i = 0; i < files.Count; i++)
                {
                    files[i] = files[i].Replace(Directory.GetCurrentDirectory(), ".").Replace(".xlsx", "");
                }
                _sunFile = files.Last(x => x.Contains("soldata"));
                files.Remove(_sunFile);
                files.Sort();
                _weatherFiles = files;
                ConvertProgressBarWindow progressBarWindow = new ConvertProgressBarWindow(_weatherFiles, _sunFile);
                progressBarWindow.Show();
                Pathes pathes = new Pathes
                {
                    SunFile      = _sunFile,
                    WeatherFiles = _weatherFiles
                };
                BinaryController.WriteDataToBinary(_fileSource, new List <Pathes> {
                    pathes
                });
                MeteorogicalAnalysisView.TimePeriodChanged -= Calculate;
                //InitData();
                // Task 1
                _weatherController = new WeatherController(_weatherFiles);
                //_weatherController.CorrectWeather();
                _sunConditionController = new SunConditionController(System.IO.Path.GetFullPath(_sunFile));
                //_sunConditionController.CorrectData(_weatherController.Year);
                MeteorogicalAnalysisView.Init(_weatherController, _sunConditionController);
                Calculate();
                MeteorogicalAnalysisView.TimePeriodChanged += Calculate;
            }
            else
            {
                Close();
            }
        }