示例#1
0
    /// <summary>
    /// Handles setting of propper UI element names and module names for UI personalization.
    /// </summary>
    protected void OnBeforeUICheck(object sender, EventArgs e)
    {
        if (OnBeforePersonalizationCheck != null)
        {
            OnBeforePersonalizationCheck(sender, e);
        }

        UIPlaceHolder plc = sender as UIPlaceHolder;

        if (plc != null)
        {
            // Set module name
            plc.ModuleName = UIModuleName;

            // Set UI element names for placeholders
            if (plc == plcRadioButtonsNew)
            {
                plc.ElementName = UINewElementName;
            }
            else if (plc == plcRadioButtons)
            {
                plc.ElementName = UISelectTempalteElementName;
            }
        }
    }
    /// <summary>
    /// Handles setting of module name and UI element name for UIPlaceholders according to UIModuleName, UIPageElementName and UITagsElementName properties.
    /// </summary>
    /// <param name="sender">Sender object.</param>
    /// <param name="e">Event arguments.</param>
    protected void pnlUI_OnBeforeCheck(object sender, EventArgs e)
    {
        UIPlaceHolder placeholder = sender as UIPlaceHolder;

        if (placeholder != null)
        {
            // Set module name
            placeholder.ModuleName = UIModuleName;

            // Set element names
            if (placeholder == pnlUIPage)
            {
                placeholder.ElementName = UIPageElementName;
            }
            else if (placeholder == pnlUITags)
            {
                placeholder.ElementName = UITagsElementName;
            }
        }
    }