using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace VIZ.TVP.CBA.Module
{
    public static class AppConfigUtil
    {
        public static string GetAppConfig(string strKey)
        {
            //string file = System.Windows.Forms.Application.ExecutablePath;
            //Configuration config = ConfigurationManager.OpenExeConfiguration(file);
            //foreach (string key in config.AppSettings.Settings.AllKeys)
            //{
            //    if (key == strKey)
            //    {
            //        return config.AppSettings.Settings[strKey].Value.ToString();
            //    }
            //}
            //return null;
           // Configuration _configuration = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);

            var url = ConfigurationManager.AppSettings[strKey];

            return url;
        }
    }
}
