public static void DeleteProject(ITreeItem project)
        {
            foreach (var diagram in project.GetItems().ToList())
            {
                project.Remove(diagram);
            }

            (project.GetParent() as ITreeItem).Remove(project);
        }
        public static void DeleteSolution(ITreeItem solution)
        {
            foreach (var project in solution.GetItems().ToList())
            {
                DeleteProject(solution, project);
            }

            (solution.GetParent() as ITree).Remove(solution as ITreeItem);
        }
        public static void SelectPreviousParentItem(ITreeItem parent)
        {
            var parentParent = parent.GetParent() as ITreeItem;
            int parentIndex  = parentParent.GetItemIndex(parent);
            int parentCount  = parentParent.GetItemsCount();

            if (parentCount > 0 && parentIndex > 0)
            {
                SelectLastItemInPreviousProject(parentParent, parentIndex);
            }
        }
        public static void SelectNextParentItem(ITreeItem parent)
        {
            var parentParent = parent.GetParent() as ITreeItem;
            int parentIndex  = parentParent.GetItemIndex(parent);
            int parentCount  = parentParent.GetItemsCount();

            if (parentCount > 0 && parentIndex < parentCount - 1)
            {
                SelectFirstItemInNextProject(parentParent, parentIndex);
            }
        }
 public static void DeleteDiagram(ITreeItem diagram)
 {
     (diagram.GetParent() as ITreeItem).Remove(diagram);
 }
        public static void SelectPreviousParentItem(ITreeItem parent)
        {
            var parentParent = parent.GetParent() as ITreeItem;
            int parentIndex = parentParent.GetItemIndex(parent);
            int parentCount = parentParent.GetItemsCount();

            if (parentCount > 0 && parentIndex > 0)
                SelectLastItemInPreviousProject(parentParent, parentIndex);
        }
        public static void SelectNextParentItem(ITreeItem parent)
        {
            var parentParent = parent.GetParent() as ITreeItem;
            int parentIndex = parentParent.GetItemIndex(parent);
            int parentCount = parentParent.GetItemsCount();

            if (parentCount > 0 && parentIndex < parentCount - 1)
                SelectFirstItemInNextProject(parentParent, parentIndex);
        }
        public static void DeleteSolution(ITreeItem solution)
        {
            foreach (var project in solution.GetItems().ToList())
                DeleteProject(solution, project);

            (solution.GetParent() as ITree).Remove(solution as ITreeItem);
        }
        public static void DeleteProject(ITreeItem project)
        {
            foreach (var diagram in project.GetItems().ToList())
                project.Remove(diagram);

            (project.GetParent() as ITreeItem).Remove(project);
        }
Example #10
0
 public static void DeleteDiagram(ITreeItem diagram)
 {
     (diagram.GetParent() as ITreeItem).Remove(diagram);
 }