Ejemplo n.º 1
0
        private void updateTreeViewAfterCategoryAdded()
        {
            this.r_FacadeFormDiscoverMeManageLikedPages.CreateNewCompositeItem(string.Format(textBox_Create_Category.Text));
            LikedPagesComposite addNewCategory   = this.r_FacadeFormDiscoverMeManageLikedPages.m_LikedPagesComposite;
            TreeNodeProxy       addBelowCategory = treeView_Liked_Pages_Category.SelectedNode as TreeNodeProxy;

            (addBelowCategory.Node as LikedPagesComposite).OnAddPageComponent(addNewCategory);
        }
Ejemplo n.º 2
0
        private void button_Add_Page_To_Selected_Category_Click(object sender, EventArgs e)
        {
            this.r_FacadeFormDiscoverMeManageLikedPages.CreateNewItem(string.Format(listBox_Liked_Pages.SelectedItem.ToString()));
            LikedPagesItem addNewItem   = this.r_FacadeFormDiscoverMeManageLikedPages.m_LikedPagesItem;
            TreeNodeProxy  selectedNode = treeView_Liked_Pages_Category.SelectedNode as TreeNodeProxy;

            if (selectedNode.Node is LikedPagesComposite)
            {
                (selectedNode.Node as LikedPagesComposite).OnAddPageComponent(addNewItem);
            }
        }
Ejemplo n.º 3
0
        private void updateTreeViewAfterCategoryOrPageRemoved()
        {
            TreeNodeProxy selectedCategory = treeView_Liked_Pages_Category.SelectedNode as TreeNodeProxy;

            this.r_FacadeFormDiscoverMeManageLikedPages.CreateNewCompositeItem(selectedCategory.Node.LikedPageName);
            LikedPagesComposite pageComponentToRemove = this.r_FacadeFormDiscoverMeManageLikedPages.m_LikedPagesComposite;

            pageComponentToRemove.Node = selectedCategory;

            if (selectedCategory.Node is LikedPagesComposite)
            {
                (selectedCategory.Node as LikedPagesComposite).OnRemovePageComponent(pageComponentToRemove);
            }
            else if (selectedCategory.Node is LikedPagesItem)
            {
                (selectedCategory.Node as LikedPagesItem).OnRemovePageComponent(pageComponentToRemove);
            }

            treeView_Liked_Pages_Category.SelectedNode.Remove();
        }