예제 #1
0
        public void AddNewGroup()
        {
            base.ThrowIfCannotActAsOwner();
            string text = ((string)base.GetParameter("SB")).Trim();

            if (text.Length == 0)
            {
                throw new OwaEventHandlerException("User did not provide name for new group", LocalizedStrings.GetNonEncoded(-1749891264), true);
            }
            NavigationNodeGroupSection navigationNodeGroupSection = (NavigationNodeGroupSection)base.GetParameter("GS");
            NavigationNodeCollection   navigationNodeCollection   = NavigationNodeCollection.TryCreateNavigationNodeCollection(base.UserContext, base.UserContext.MailboxSession, navigationNodeGroupSection);
            NavigationNodeGroup        navigationNodeGroup        = NavigationNodeCollection.CreateCustomizedGroup(navigationNodeGroupSection, text);
            Guid navigationNodeGroupClassId = navigationNodeGroup.NavigationNodeGroupClassId;

            navigationNodeCollection.Add(navigationNodeGroup);
            navigationNodeCollection.Save(base.UserContext.MailboxSession);
            navigationNodeCollection = NavigationNodeCollection.TryCreateNavigationNodeCollection(base.UserContext, base.UserContext.MailboxSession, navigationNodeGroupSection);
            navigationNodeGroup      = navigationNodeCollection[navigationNodeCollection.FindGroupById(navigationNodeGroupClassId)];
            NavigationGroupHeaderTreeNode navigationGroupHeaderTreeNode  = new NavigationGroupHeaderTreeNode(base.UserContext, navigationNodeGroup);
            NavigationGroupHeaderTreeNode navigationGroupHeaderTreeNode2 = navigationGroupHeaderTreeNode;

            navigationGroupHeaderTreeNode2.CustomAttributes += " _NF=1";
            this.Writer.Write("<div id=ntn>");
            navigationGroupHeaderTreeNode.RenderUndecoratedNode(this.Writer);
            this.Writer.Write("</div>");
        }