using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;

namespace KstCmsBase.WebPage
{
    public class AssemAppplication
    {
        #region Properties
        private static string _Version;
        private static string _ProName;
        private static string _Title;
        private static string _Description;
        private static string _CopyRight;
        private static string _CompanyName;



        public static string Version
        {
            get
            {

                return _Version;
            }
        }
        public static string ProName
        {
            get
            {
                return _ProName;


            }
        }
        public static string Title
        {
            get
            {

                return _Title;

            }
        }
        public static string Description
        {
            get
            {

                return _Description;


            }
        }
        public static string Copyright
        {
            get
            {

                return _CopyRight;


            }
        }
        public static string CompanyName
        {
            get
            {
                return _CompanyName;


            }
        }

        public static void ApplicationInfo()
        {
            Assembly assembly = Assembly.GetExecutingAssembly();
            AssemblyCompanyAttribute ComName = (AssemblyCompanyAttribute)AssemblyCompanyAttribute.GetCustomAttribute(assembly, typeof(AssemblyCompanyAttribute));

            AssemblyCopyrightAttribute copyright = (AssemblyCopyrightAttribute)AssemblyCopyrightAttribute.GetCustomAttribute(assembly, typeof(AssemblyCopyrightAttribute));

            AssemblyDescriptionAttribute description = (AssemblyDescriptionAttribute)AssemblyDescriptionAttribute.GetCustomAttribute(assembly, typeof(AssemblyDescriptionAttribute));
            AssemblyProductAttribute proname = (AssemblyProductAttribute)AssemblyProductAttribute.GetCustomAttribute(assembly, typeof(AssemblyProductAttribute));


            AssemblyFileVersionAttribute VNO = (AssemblyFileVersionAttribute)AssemblyFileVersionAttribute.GetCustomAttribute(assembly, typeof(AssemblyFileVersionAttribute));
            AssemblyTitleAttribute title = (AssemblyTitleAttribute)AssemblyTitleAttribute.GetCustomAttribute(assembly, typeof(AssemblyTitleAttribute));

            _CompanyName = ComName.Company;
            _Version = VNO.Version;
            _ProName = proname.Product;
            _CopyRight = copyright.Copyright;
            _Title = title.Title;
            _Description = description.Description;
        }

    }
        #endregion
}
