using GMW_data;
using SteamWare;
using System;

namespace GMW
{
    public partial class Post_FusioniSP : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            bool showNew = memLayer.ML.confReadBool("bCodeUseNewPage");
            mod_PostFusioni1.Visible = !showNew;
            mod_clock1.Visible = !showNew;
            mod_postFusioniBCode.Visible = showNew;
            mod_postFusioniBCode.eh_reqUpdate += mod_postFusioniBCode_eh_reqUpdate;
            if (showNew) mod_postFusioniBCode.doUpdate();
        }

        void mod_postFusioniBCode_eh_reqUpdate(object sender, EventArgs e)
        {
            doUpdate();
        }
        /// <summary>
        /// aggiorna messaggi e css
        /// </summary>
        private void updateMessCss()
        {
            lblWarning.Text = Postazione.warningText;
            lblMessaggi.Text = Postazione.messaggiText;
            pnlAll.CssClass = Postazione.CssClass;
        }
        /// <summary>
        /// update generale controlli
        /// </summary>
        private void doUpdate()
        {
            updateMessCss();
        }
    }
}