using System;
using System.Windows.Forms;

using System.Configuration;

namespace Baza_Reklam
{
    public partial class About : Form
    {
        public About()
        {
            InitializeComponent();

            lblVersion.Text = Application.ProductVersion;
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void lblVersionInfo_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            string url = string.IsNullOrEmpty(ConfigurationManager.AppSettings["Application.Version.Url"])
                             ? "http://www.infocity.pl/baza_reklam/versioninfo.html#{0}"
                             : ConfigurationManager.AppSettings["Application.Version.Url"];

            System.Diagnostics.Process.Start(string.Format(url, Application.ProductVersion));
        }
    }
}