Exemple #1
0
        public void Setup(string userPreferenceCategory, bool isBindAllTabs = true)
        {
            IsBindAllTabs = isBindAllTabs;

            SettingCategory = userPreferenceCategory;

            // Get Tab Orientation based on UPCategory
            if (!string.IsNullOrEmpty(SettingCategory))
            {
                PerferenceUtility.CreateUserPreferenceCategoryIfNotExists(SettingCategory, SettingCategory);
            }

            TabOrientation = PerferenceUtility.GetUserPreferenceByKeyAsTabOrientation(ApplicationCommon.TabOrientation, SettingCategory);

            hdnTabOrientation.Value = TabOrientation.ToString();

            IsAllTab = PerferenceUtility.GetUserPreferenceByKeyAsBoolean(ApplicationCommon.AllTabExists, SettingCategory);

            if (IsAllTab)
            {
                IsAllTabSelected = PerferenceUtility.GetUserPreferenceByKeyAsBoolean(ApplicationCommon.AllTabSelected, SettingCategory);
            }

            if (TabOrientation == TabOrientation.Vertical)
            {
                //divTabContainer.Visible = false;
                TabHeaderBackgroundColor = PerferenceUtility.GetApplicationUserPreferenceByKey(ApplicationCommon.TabHeaderBackgroundColor);
            }
            else
            {
                if (IsAllTab)
                {
                    var divAllTabPage = new HtmlGenericControl("div");
                    divTabContentContainer.Controls.Add(divAllTabPage);

                    var oMyData = new MyTabTrackingData();
                    oMyData.Key    = "All";
                    oMyData.Target = divAllTabPage;

                    var liAllTabElement = CreateTabItemHeader("All", "All", IsAllTabSelected, oMyData, divAllTabPage.ClientID);

                    myListTabTracking.Add(oMyData);

                    divTabHeaderList.Controls.Add(liAllTabElement);
                }
            }
        }