main
 1using System.Windows.Forms;
 2using gorilla.commons.utility;
 3using MoMoney.Presentation.Model.Navigation;
 4using momoney.presentation.views;
 5using MoMoney.Presentation.Views;
 6using MoMoney.Presentation.Winforms.Resources;
 7using WeifenLuo.WinFormsUI.Docking;
 8
 9namespace MoMoney.Presentation.Winforms.Views
10{
11    public partial class NavigationView : ApplicationDockedWindow, INavigationView
12    {
13        readonly IShell shell;
14
15        public NavigationView(IShell shell)
16        {
17            InitializeComponent();
18            this.shell = shell;
19            icon(ApplicationIcons.FileExplorer).docked_to(DockState.DockRightAutoHide);
20            uxNavigationTreeView.ImageList = new ImageList();
21            ApplicationIcons.all().each(x => uxNavigationTreeView.ImageList.Images.Add(x.name_of_the_icon, x));
22        }
23
24        public void accept(INavigationTreeVisitor tree_view_visitor)
25        {
26            uxNavigationTreeView.Nodes.Clear();
27            tree_view_visitor.visit(uxNavigationTreeView);
28            shell.add(this);
29        }
30    }
31}