using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SteamWare;

namespace GMW_Term.WebUserControls
{
    public partial class mod_menuTop : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string operatore = "";
            try
            {
                operatore = user_std.UtSn.CognomeNome;
            }
            catch
            {
                // rimando a login...
                Response.Redirect("~/Default.aspx");
            }
            if (operatore != "")
            {
                Version versione = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
                lblTitolo.Text = string.Format("<b>{0}</b> | {1} v.{2}.{3}.{4}", operatore, memLayer.ML.confReadString("titleApp"), versione.Major, versione.Minor, versione.Build);
            }
            else
            {
                lblTitolo.Text = string.Format("{0} v.{1}", memLayer.ML.confReadString("titleApp"), System.Reflection.Assembly.GetExecutingAssembly().GetName().Version);
            }
        }

        /// <summary>
        /// wrapper traduzione termini
        /// </summary>
        /// <param name="lemma"></param>
        /// <returns></returns>
        public string traduci(string lemma)
        {
            return user_std.UtSn.Traduci(lemma);
        }
    }
}