using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BankTV.Logger;
using BankTV.Helpers;
using System.IO;
using BankTV.Consts;

namespace BankTV.Model.Weather
{
    public class WeatherCurrent : AbstractModel
    {
        public DateTime SunRise { get; set; }
        public DateTime SunSet { get; set; }
        public double TempMin { get; set; }
        public double TempMax { get; set; }
        public double TempAvg { get; set; }
        public double Pressure { get; set; }
        public string WeatherImg { get; set; }
        public string City { get; set; }
        public DateTime LastUpdate { get; set; }

        public string GetImagePath()
        {
            string filePath = Path.Combine(GlobalHelper.GetWeatherFolder(), GlobalConsts.WEATHER_ÍCONS_FOLDER, String.Format("{0}.png", WeatherImg));
            if (File.Exists(filePath))
            {
                return filePath;
            }   //if
            return String.Empty;
        }

    }
}
