Example #1
0
 protected void ddlLocale_SelectedIndexChanged(object sender, System.EventArgs e)
 {
     try
     {
         ViewState["HTML.Locale"] = ddlLocale.SelectedValue;
         effority.Ealo.StringInfo objText    = null;
         effority.Ealo.StringInfo objSummary = null;
         objText    = effority.Ealo.Controller.GetStringByQualifierAndStringName(Consts.DesktopHTMLQualifier, ModuleId.ToString(), ddlLocale.SelectedValue, false);
         objSummary = effority.Ealo.Controller.GetStringByQualifierAndStringName(Consts.DesktopSummaryQualifier, ModuleId.ToString(), ddlLocale.SelectedValue, false);
         if ((objText != null))
         {
             teContent.Text = objText.StringText;
         }
         else
         {
             teContent.Text = "";
         }
         if ((objSummary != null))
         {
             txtDesktopSummary.Text = Server.HtmlDecode(objSummary.StringText);
         }
         else
         {
             txtDesktopSummary.Text = "";
         }
         SynchronizeModule();
     }
     catch (Exception exc)
     {
         Exceptions.ProcessModuleLoadException(this, exc);
     }
 }
 private void Page_Load(object sender, System.EventArgs e)
 {
     try
     {
         effority.Ealo.StringInfo objText = null;
         objText = effority.Ealo.Controller.GetStringByQualifierAndStringName(Consts.DesktopHTMLQualifier, ModuleId.ToString(), System.Threading.Thread.CurrentThread.CurrentCulture.Name, true);
         string strContent = "";
         if ((objText != null))
         {
             strContent = Server.HtmlDecode((string)objText.StringText);
         }
         ltContent.Text = strContent;
         UI.Skins.Skin ParentSkin = UI.Skins.Skin.GetParentSkin(this);
         if ((ParentSkin != null))
         {
             ParentSkin.RegisterModuleActionEvent(this.ModuleId, ModuleAction_Click);
         }
         if (strContent == "")
         {
             if (System.Threading.Thread.CurrentThread.CurrentCulture.ToString() != Common.Globals.GetPortalSettings().DefaultLanguage)
             {
                 ContainerControl.Visible = false;
             }
         }
     }
     catch (Exception exc)
     {
         Exceptions.ProcessModuleLoadException(this, exc);
     }
 }
Example #3
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            try
            {
                if (Page.IsPostBack == false)
                {
                    ddlLocale.DataSource     = Localization.GetEnabledLocales().AllValues;
                    ddlLocale.DataTextField  = "Text";
                    ddlLocale.DataValueField = "Code";
                    ddlLocale.DataBind();
                    ddlLocale.SelectedValue = System.Threading.Thread.CurrentThread.CurrentCulture.Name;

                    effority.Ealo.StringInfo objText    = null;
                    effority.Ealo.StringInfo objSummary = null;

                    objText    = effority.Ealo.Controller.GetStringByQualifierAndStringName(Consts.DesktopHTMLQualifier, ModuleId.ToString(), System.Threading.Thread.CurrentThread.CurrentCulture.Name, true);
                    objSummary = effority.Ealo.Controller.GetStringByQualifierAndStringName(Consts.DesktopSummaryQualifier, ModuleId.ToString(), System.Threading.Thread.CurrentThread.CurrentCulture.Name, true);

                    if ((objText != null))
                    {
                        teContent.Text = objText.StringText;
                    }
                    else
                    {
                        teContent.Text = "";
                    }

                    if ((objSummary != null))
                    {
                        txtDesktopSummary.Text = Server.HtmlDecode(objSummary.StringText);
                    }
                    else
                    {
                        txtDesktopSummary.Text = "";
                    }

                    ViewState["HTML.Locale"] = ddlLocale.SelectedValue;
                }
            }
            catch (Exception exc)
            {
                Exceptions.ProcessModuleLoadException(this, exc);
            }
        }