private void OnRemoveComponent(ILikedPagesComponent i_RemoveComponent) { if (i_RemoveComponent is LikedPagesComposite) { Nodes.Remove((i_RemoveComponent as LikedPagesComposite).Node = new TreeNodeProxy(i_RemoveComponent.LikedPageName, i_RemoveComponent)); } else if (i_RemoveComponent is LikedPagesItem) { Nodes.Remove((i_RemoveComponent as LikedPagesItem).Node = new TreeNodeProxy(i_RemoveComponent.LikedPageName, i_RemoveComponent)); } }
public void OnRemovePageComponent(ILikedPagesComponent i_RemovePageComponent) { RemovePageComponent.Invoke(i_RemovePageComponent); }
public void OnAddPageComponent(ILikedPagesComponent i_AddPageComponent) { AddPageComponent.Invoke(i_AddPageComponent); }
public TreeNodeProxy(string i_LikedPageName, ILikedPagesComponent i_Node) : base(i_LikedPageName) { Node = i_Node; Node.AddPageComponent += OnAddComponent; Node.RemovePageComponent += OnRemoveComponent; }
public void OnAddPageComponent(ILikedPagesComponent i_AddPageComponent) { throw new Exception("You can't add a Page to into another Page"); }