Exemple #1
0
        /// <summary>
        /// Loads the settings control.
        /// </summary>
        /// <param name="controlName">Name of the control.</param>
        /// <param name="headerResourceKey">The resource key for the specific settings control's header.</param>
        private void LoadSettingsControl(string controlName, string headerResourceKey)
        {
            this.SpecificSettingsPlaceholder.EnableViewState = false;
            this.SpecificSettingsPlaceholder.Controls.Clear();

            this.specificSettingsControl = this.CreateSettingsControl(controlName);
            this.SpecificSettingsPlaceholder.Controls.Add(this.specificSettingsControl);

            this.SpecificSettingsHeaderLiteral.Text = this.Localize(headerResourceKey);
        }
Exemple #2
0
        protected void Page_Init(Object sender, EventArgs e)
        {
            ModuleController        objModules = new ModuleController();
            ModuleControlController objModuleControlController = new ModuleControlController();

            // get ModuleId
            if ((Request.QueryString["ModuleId"] != null))
            {
                moduleId = int.Parse(Request.QueryString["ModuleId"]);
            }

            // get module
            ModuleInfo objModule = objModules.GetModule(moduleId, TabId, false);

            if (objModule != null)
            {
                tabModuleId = objModule.TabModuleID;

                //get Settings Control(s)
                ArrayList arrModuleControls = objModuleControlController.GetModuleControlsByKey("Settings", objModule.ModuleDefID);

                if (arrModuleControls.Count > 0)
                {
                    ModuleControlInfo objModuleControlInfo = (ModuleControlInfo)arrModuleControls[0];
                    string            src = "~/" + objModuleControlInfo.ControlSrc;
                    ctlSpecific             = (ModuleSettingsBase)LoadControl(src);
                    ctlSpecific.ID          = src.Substring(src.LastIndexOf("/") + 1);
                    ctlSpecific.ModuleId    = moduleId;
                    ctlSpecific.TabModuleId = tabModuleId;
                    dshSpecific.Text        = Localization.LocalizeControlTitle(objModuleControlInfo.ControlTitle, objModuleControlInfo.ControlSrc, "settings");
                    pnlSpecific.Controls.Add(ctlSpecific);

                    if (Localization.GetString(ModuleActionType.HelpText, ctlSpecific.LocalResourceFile) != "")
                    {
                        rowspecifichelp.Visible       = true;
                        imgSpecificHelp.AlternateText = Localization.GetString(ModuleActionType.ModuleHelp, Localization.GlobalResourceFile);
                        lnkSpecificHelp.Text          = Localization.GetString(ModuleActionType.ModuleHelp, Localization.GlobalResourceFile);
                        lnkSpecificHelp.NavigateUrl   = Globals.NavigateURL(TabId, "Help", "ctlid=" + objModuleControlInfo.ModuleControlID, "moduleid=" + moduleId);
                    }
                    else
                    {
                        rowspecifichelp.Visible = false;
                    }
                }
            }
        }
 private void LoadSettingsControl(string controlName)
 {
     phControls.EnableViewState = false;
     _currentSettingsBase       = CreateSettingsControl(controlName);
     phControls.Controls.Add(_currentSettingsBase);
 }
 private void LoadSettingsControl(string controlName)
 {
     this.phControls.EnableViewState = false;
     this._currentSettingsBase       = this.CreateSettingsControl(controlName);
     this.phControls.Controls.Add(this._currentSettingsBase);
 }