コード例 #1
0
        private void ApplySettings()
        {
            this.C1SiteMap1.LevelSettings.Clear();

            //for level 1, the second level
            C1SiteMapLevelSetting settingLevel1 = new C1SiteMapLevelSetting();

            settingLevel1.Level  = 1;
            settingLevel1.Layout = (SiteMapLayoutType)Enum.Parse(typeof(SiteMapLayoutType), cbxLevel1Layout.SelectedValue, true);

            settingLevel1.ListLayout.RepeatColumns = (int)numberLevel1ColumnCount.Value;
            settingLevel1.SeparatorText            = tbxLevel1SeparatorText.Text;
            settingLevel1.MaxNodes = (int)numberLevel1MaxNode.Value;

            //for level 2, the third level
            C1SiteMapLevelSetting settingLevel2 = new C1SiteMapLevelSetting();

            settingLevel2.Level  = 2;
            settingLevel2.Layout = (SiteMapLayoutType)Enum.Parse(typeof(SiteMapLayoutType), cbxLevel2Layout.SelectedValue, true);

            settingLevel2.ListLayout.RepeatColumns = (int)numberLevel2ColumnCount.Value;
            settingLevel2.MaxNodes      = (int)numberLevel2MaxNode.Value;
            settingLevel2.SeparatorText = tbxLevel2SeparatorText.Text;

            this.C1SiteMap1.LevelSettings.Add(settingLevel1);
            this.C1SiteMap1.LevelSettings.Add(settingLevel2);
        }
コード例 #2
0
ファイル: Layout.aspx.cs プロジェクト: tforsberg/z
        private void ApplySettings()
        {
            this.C1SiteMap1.LevelSettings.Clear();

            //for level 1, the second level
            C1SiteMapLevelSetting settingLevel1 = new C1SiteMapLevelSetting();
            settingLevel1.Level = 1;
            settingLevel1.Layout = (SiteMapLayoutType)Enum.Parse(typeof(SiteMapLayoutType), cbxLevel1Layout.SelectedValue, true);

            settingLevel1.ListLayout.RepeatColumns = (int)numberLevel1ColumnCount.Value;
            settingLevel1.SeparatorText = tbxLevel1SeparatorText.Text;
            settingLevel1.MaxNodes = (int)numberLevel1MaxNode.Value;

            //for level 2, the third level
            C1SiteMapLevelSetting settingLevel2 = new C1SiteMapLevelSetting();
            settingLevel2.Level = 2;
            settingLevel2.Layout = (SiteMapLayoutType)Enum.Parse(typeof(SiteMapLayoutType), cbxLevel2Layout.SelectedValue, true);

            settingLevel2.ListLayout.RepeatColumns = (int)numberLevel2ColumnCount.Value;
            settingLevel2.MaxNodes = (int)numberLevel2MaxNode.Value;
            settingLevel2.SeparatorText = tbxLevel2SeparatorText.Text;
            
            this.C1SiteMap1.LevelSettings.Add(settingLevel1);
            this.C1SiteMap1.LevelSettings.Add(settingLevel2);
        }