コード例 #1
0
        /// ******************************* EVENTS **********************************

        protected void OnGroupListSelect(CarbolistItem target)
        {
            if (target.Selected)             // user selected a group
            {
                if (target.Data == SelectedGroup)
                // user deselected a group, then selected the same group again
                {
                    MeetingList.DeselectItem();
                }
                else                 // user selected another group
                {
                    // refresh the meeting and post orders in the group that was selected before
                    UpdateMeetingOrders();
                    UpdatePostOrders();

                    // update selected group reference
                    SelectedGroup = target.Data as Group;

                    // hide post list
                    HidePostList();

                    // refresh meeting list items
                    MeetingList.RemoveAllItems();
                    MeetingList.AddItemsBy("Name", SelectedGroup.Meetings);

                    GroupPanel.HidePanel();
                }

                GroupPanel.ShowPanel(target);

                SelectedMeeting = null;
                SelectedPost    = null;

                ShowMeetingList();
                HideMeetingPanel();

                //tra.ce(SelectedGroup.Name, SelectedGroup.Description);
            }
            else             // user deselcted a group
            {
                UpdateMeetingOrders();
                UpdatePostOrders();

                HideMeetingList();
                HidePostList();

                GroupPanel.HidePanel();
            }
        }
コード例 #2
0
        public CarbolistItem AddGroup(Group group)
        {
            HideMeetingList();
            HidePostList();

            Groups.Add(group);

            GroupPanel.ShowPanel(GroupList.SelectItem(GroupList.AddItem("", group)), true);

            NewMeetingLabel.Visible = true;

            GroupPanel.Editable = true;

            return(GroupPanel.CurrentListItem);
        }