public MainView(IPresenterFactory presenterFactory) { _notebook = presenterFactory.InstantiatePresenter <MainNotebook>(); _notebook.Add(presenterFactory.InstantiatePresenter <MenuPageView>(this)); _notebook.Add(presenterFactory.InstantiatePresenter <ModsPageView>(this)); _notebook.Add(presenterFactory.InstantiatePresenter <BlueprintsPageView>(this)); _notebook.Add(presenterFactory.InstantiatePresenter <SavegamesPageView>(this)); _notebook.Add(presenterFactory.InstantiatePresenter <ScenariosPageView>(this)); _notebook.Add(presenterFactory.InstantiatePresenter <TasksPageView>(this)); PackStart(presenterFactory.InstantiatePresenter <MainHeaderView>()); var sideBox = new VBox { MinWidth = 280, WidthRequest = 280 }; _sidebarContainer = new SidebarContainer(); sideBox.PackStart(_sidebarContainer, true, true); var box = new HBox(); box.PackStart(_notebook, true); box.PackEnd(sideBox); PackStart(box, true, true); _notebook.HandleSizeChangeOnTabChange = true; _notebook.HandleSizeUpdate(); }
public MainView(IPresenterFactory presenterFactory) { _notebook = presenterFactory.InstantiatePresenter<MainNotebook>(); _notebook.Add(presenterFactory.InstantiatePresenter<MenuPageView>(this)); _notebook.Add(presenterFactory.InstantiatePresenter<ModsPageView>(this)); _notebook.Add(presenterFactory.InstantiatePresenter<BlueprintsPageView>(this)); _notebook.Add(presenterFactory.InstantiatePresenter<SavegamesPageView>(this)); _notebook.Add(presenterFactory.InstantiatePresenter<TasksPageView>(this)); PackStart(presenterFactory.InstantiatePresenter<MainHeaderView>()); var sideBox = new VBox { MinWidth = 280, WidthRequest = 280 }; _sidebarContainer = new SidebarContainer(); sideBox.PackStart(_sidebarContainer, true, true); var box = new HBox(); box.PackStart(_notebook, true); box.PackEnd(sideBox); PackStart(box, true, true); _notebook.HandleSizeChangeOnTabChange = true; _notebook.HandleSizeUpdate(); }
protected override void OnBoundsChanged() { base.OnBoundsChanged(); _notebook.HandleSizeUpdate(); }