Пример #1
0
 private void writeJSON(object sender, EventArgs e)
 {
     foreach (LocationData ld in this.locdata)
     {
         ClimaJSONWriter writeCJ = new ClimaJSONWriter(ld, this.directory);
     }
 }
Пример #2
0
        private void readEPWFile(StreamReader epw)
        {
            LocationData ld = new LocationData();

            ld.defineEPWFields();

            string line = epw.ReadLine();

            string[] data;

            while (line != null)
            {
                data = line.Split(',');
                switch (data[0])
                {
                case "LOCATION":
                    getLocationData(data, ref ld);
                    break;

                case "DATA PERIODS":
                    line = epw.ReadLine();    //read first hour
                    while (line != null)
                    {
                        ld.hourlyData.Add(getHourlyValueList(line));
                        line = epw.ReadLine();
                    }

                    break;
                }
                line = epw.ReadLine();
            }
            ld.cleanHourlyValues();
            ld.cleanMonthlyValues();
            string          directory = this.directory + ld.where;
            ClimaJSONWriter climajson = new ClimaJSONWriter(ld, directory);

            recordPlace(ld.where, ld.name);
            //cd.Add(ld);
            epw.Close();
        }