Exemple #1
0
        void testata320_Init(object sender, EventArgs e)
        {
            if (UserManager.getInfoUtente() != null)
            {
                idAmm = UserManager.getInfoUtente().idAmministrazione;
            }
            if (idAmm != null && idAmm != "")
            {
                if (fileExist("logo.gif", "LoginFE"))
                {
                    this.img_logo.ImageUrl = "images/loghiAmministrazioni/logo.gif";
                }

                DocsPAWA.utils.InitImagePath iip = utils.InitImagePath.getInstance(idAmm);
                this.logoEnte.ImageUrl = iip.getPath("LOGO");
                string pathLogo     = utils.InitImagePath.getInstance(idAmm).getPath("BKG_TESTO");
                string pathLogoEnte = utils.InitImagePath.getInstance(idAmm).getPath("BKG_LOGO");
                this.backgroundLogo.Attributes.Add("background", pathLogo);
                this.backgroundLogoEnte.Attributes.Add("background", pathLogoEnte);
                this.backgroundLogoEnte.Attributes.Add("height", "100%");

                string coloreAmministrazione = findFontColor(idAmm);
                if (findFontColor(idAmm) != "")
                {
                    string[] colorSplit = coloreAmministrazione.Split('^');
                    string   red        = colorSplit[0];
                    string   green      = colorSplit[1];
                    string   blu        = colorSplit[2];
                    this.lbl_info_utente.ForeColor = System.Drawing.Color.FromArgb(Convert.ToInt16(red), Convert.ToInt16(green), Convert.ToInt16(blu));
                }
                else
                {
                    this.lbl_info_utente.ForeColor = System.Drawing.Color.FromArgb(255, 255, 255);
                }

                string Tema     = GetCssAmministrazione();
                string veroTema = string.Empty;
                if (Tema != null && !Tema.Equals(""))
                {
                    string[] realTema = Tema.Split('^');
                    veroTema = realTema[0];
                }
                else
                {
                    veroTema = "TemaRosso";
                }

                this.btn_doc.DisabledUrl    = "~/App_Themes/" + veroTema + "/" + this.btn_doc.Thema + this.btn_doc.SkinID + ".gif";
                this.btn_config.DisabledUrl = "~/App_Themes/" + veroTema + "/" + this.btn_config.Thema + this.btn_config.SkinID + ".gif";
                this.btn_gest.DisabledUrl   = "~/App_Themes/" + veroTema + "/" + this.btn_gest.Thema + this.btn_gest.SkinID + ".gif";
                this.btn_help.DisabledUrl   = "~/App_Themes/" + veroTema + "/" + this.btn_help.Thema + this.btn_help.SkinID + ".gif";
                this.btn_search.DisabledUrl = "~/App_Themes/" + veroTema + "/" + this.btn_search.Thema + this.btn_search.SkinID + ".gif";
            }
        }
Exemple #2
0
        /// <summary>
        /// Crea, se non esiste, l’istanza della classe e inizializza gli attributi
        /// utilizzando il metodo initializePath
        /// </summary>
        /// <returns></returns>
        public static InitImagePath getInstance(string idAmm)
        {
            if (_instances == null)
            {
                _instances = Hashtable.Synchronized(new Hashtable());
            }

            lock (_instances)
            {
                if (!_instances.ContainsKey(idAmm))
                {
                    InitImagePath instance = new InitImagePath();
                    instance.initializeHash(idAmm);

                    _instances.Add(idAmm, instance);
                }
            }

            return((InitImagePath)_instances[idAmm]);
        }