Ejemplo n.º 1
0
 public void Configure(IMenuRegistry sectionMenuRegistry)
 {
     sectionMenuRegistry.Add(new UrlIconMenuItem("Sign Out",
                                                 HttpContext.Current.Request.Url.AbsoluteUri +
                                                 QuestionMarkOrAmpersand() + "Logout=Logout",
                                                 "~/Content/Canvas/lock.png"));
 }
Ejemplo n.º 2
0
 public void Register(IMenuRegistry registry)
 {
     if (!menuRegistries.Contains(registry))
     {
         menuRegistries.Add(registry);
     }
 }
Ejemplo n.º 3
0
        public void RightClickNode()
        {
            IMenuRegistry registry = _menuController
                                     .GetMenuFor(typeof(TreeNode));

            _view.ShowContextMenu(registry);
        }
        public void ShowContextMenu(IMenuRegistry registry)
        {
            var menu      = new ContextMenuStrip();
            var presenter = new ToolStripMenuPresenter(menu, registry, ImageFactory);

            presenter.Populate();
            menu.Show(_lastPoint);
        }
Ejemplo n.º 5
0
        public TaskModule(IUnityContainer unityContainer, IMenuRegistry menuRegistry, IScreenFactoryRegistry screenFactoryRegistry,
                          IUserSession userSession, IAppSettings appSettings)
        {
            _menuRegistry = menuRegistry;
            _userSession  = userSession;
            _appSettings  = appSettings;

            _screenFactoryRegistry = screenFactoryRegistry;
            _unityContainer        = unityContainer;
        }
Ejemplo n.º 6
0
        public ProjectExplorerPresenter(IProjectExplorerView view, IMenuController menuController)
            : base(view)
        {
            _menuController = menuController;
            _view           = view;
            view.SetPresenter(this);

            IMenuRegistry toolBar = _menuController.GetMenuFor(typeof(IProjectExplorerPresenter));

            view.SetToolbar(toolBar);
        }
Ejemplo n.º 7
0
        public MenuViewModel(IMenuRegistry registry)
        {
            IMenuContainer container = registry.Register("Product Catalog").ToContainer();
            IMenuContainer menuContainer = container.Register("Menu Item").ToContainer();
            menuContainer.Register("MenuItem2").ToScreen<TestScreen>();
            menuContainer.Register("MenuItem2").ToScreen<TestScreen2>();

            Menus = new ObservableCollection<MenuItemViewModel>();

            new ObservableCollectionSynchronizer<IMenuItem, MenuItemViewModel>(registry, Menus,
                                                                               (x) => new MenuItemViewModel(x));
        }
Ejemplo n.º 8
0
        public MenuViewModel(IMenuRegistry menuRegistry, IEventAggregator eventAggregator, IUserSession userSession)
        {
            _menuRegistry    = menuRegistry;
            _eventAggregator = eventAggregator;
            _userSession     = userSession;

            Items = new MenuItemsCollection();

            WireUpEvents();
            ApplicationCommands.LoginSucceeded.RegisterCommand(new DelegateCommand <object>(LoginSucceeded));
            LogOutCommand = new DelegateCommand <object>(LogoutUser);
        }
Ejemplo n.º 9
0
        public MenuViewModel(IMenuRegistry registry)
        {
            IMenuContainer container     = registry.Register("Product Catalog").ToContainer();
            IMenuContainer menuContainer = container.Register("Menu Item").ToContainer();

            menuContainer.Register("MenuItem2").ToScreen <TestScreen>();
            menuContainer.Register("MenuItem2").ToScreen <TestScreen2>();

            Menus = new ObservableCollection <MenuItemViewModel>();

            new ObservableCollectionSynchronizer <IMenuItem, MenuItemViewModel>(registry, Menus,
                                                                                (x) => new MenuItemViewModel(x));
        }
Ejemplo n.º 10
0
        public ForecastModule(IUnityContainer unityContainer
                              , IMenuRegistry menuRegistry
                              , IScreenFactoryRegistry screenFactoryRegistry
                              , ForecastScreenFactory forecastScreenFactory)
        {
            _unityContainer        = unityContainer;
            _menuRegistry          = menuRegistry;
            _screenFactoryRegistry = screenFactoryRegistry;
            _forecastScreenFactory = forecastScreenFactory;

            RegisterServices();
            RegisterViews();
            RegisterViewModels();
        }
Ejemplo n.º 11
0
        public LoginDialogManager(IRegionManager regionManager, IAppSettings appSettings, IUserSession userSession, IMenuRegistry menuRegistry, IBusyService busyService, IUserService userService, IConnectivityService connectivityService)
            : base(regionManager, appSettings)
        {
            _userSession         = userSession;
            _appSettings         = appSettings;
            _menuRegistry        = menuRegistry;
            _busyService         = busyService;
            _userService         = userService;
            _connectivityService = connectivityService;

            ApplicationCommands.LoginFailed.RegisterCommand(new DelegateCommand <string>(LoginFailed));
            ApplicationCommands.LoginSucceeded.RegisterCommand(new DelegateCommand <object>(LoginSucceeded));
            ApplicationCommands.UserLoggedOut.RegisterCommand(new DelegateCommand <object>(LogOutUser));
        }
Ejemplo n.º 12
0
        public OverviewModule(IUnityContainer unityContainer, IMenuRegistry menuRegistry, IScreenFactoryRegistry screenFactoryRegistry,
                              IAppSettings appSettings)
        {
            _menuRegistry          = menuRegistry;
            _screenFactoryRegistry = screenFactoryRegistry;
            _appSettings           = appSettings;
            _unityContainer        = unityContainer;

            _unityContainer.RegisterType <IOverviewScreenMasterviewModel, OverviewScreenMasterviewModel>();

            // Disabled for H&B
            //_unityContainer.RegisterType<IDayOverviewViewModel, DayOverviewViewModel>();

            _unityContainer.RegisterType <IWeeklyOverviewViewmodel, WeeklyOverviewViewmodel>();
            _unityContainer.RegisterType <IOverviewSwitcherService, OverviewSwitcherService>(new ContainerControlledLifetimeManager());
            _unityContainer.RegisterType <IDialogService, DialogService>(new ContainerControlledLifetimeManager());
            _unityContainer.RegisterType <ITaskItemViewmodelFactory, TaskItemViewmodelFactory>();
        }
Ejemplo n.º 13
0
        public MenuViewModel(IMenuRegistry menuRegistry, IUserSession userSession,
                             ILoginStatusViewModel loginStatusViewModel,
                             IVersionViewModel versionViewModel, IAppSettings appSettings,
                             IConnectivityService connectivityService)
        {
            _menuRegistry        = menuRegistry;
            LoginStatus          = loginStatusViewModel;
            _userSession         = userSession;
            _appSettings         = appSettings;
            _connectivityService = connectivityService;
            VersionViewModel     = versionViewModel;
            ApplicationCommands.ChangeScreenCommand.RegisterCommand(new DelegateCommand <MenuInfo>(MenuItemClicked));
            ApplicationCommands.LoginSucceeded.RegisterCommand(new DelegateCommand <object>(UserLoggedIn));
            ApplicationCommands.UserLoggedOut.RegisterCommand(new DelegateCommand <object>(UserLoggedOut));
            ApplicationCommands.ChangeSubmenuCommand.RegisterCommand(new DelegateCommand <SubMenuInfo>(ChangeSubmenuCommandExecute));

            ApplicationCommands.ConnectivityChanged.RegisterCommand(new DelegateCommand <object>(ConnectivityChangedExecute));

            Initialize();
        }
 public MenuStripPresenter(MenuStrip menu, IMenuRegistry menuRegistry, IImageFactory imageFactory)
     : base(menuRegistry, imageFactory)
 {
     _menu = menu;
 }
Ejemplo n.º 15
0
 public void Configure(IMenuRegistry menuRegistry)
 {
     menuRegistry.Add(new PermissionsSubMenuItem("Users", "Index", "User"));
     menuRegistry.Add(new PermissionsSubMenuItem("Roles", "Index", "Role"));
 }
Ejemplo n.º 16
0
 public void Configure(IMenuRegistry menuRegistry)
 {
     menuRegistry.Add(new ActionSectionMenuItem("Test", "Index", "Some"));
 }
Ejemplo n.º 17
0
 public void Configure(IMenuRegistry sectionMenuRegistry)
 {
     sectionMenuRegistry.Add(new ActionIconMenuItem("Workflow Dashboard", "~/Content/Canvas/icondemo.png", "Index", "WorkflowDashboard"));
 }
Ejemplo n.º 18
0
 public void Configure(IMenuRegistry sectionMenuRegistry)
 {
     sectionMenuRegistry.Add(new ActionIconMenuItem("Email Communication Management", "~/Content/Canvas/emailicon.png", "Index", "EmailCommunicationManagement"));
 }
 public void Configure(IMenuRegistry menuRegistry)
 {
     menuRegistry.Add(new ActionSectionMenuItem("Example Feature", "Index", typeof(ExampleFeatureManagementController).Name.Replace("Controller", string.Empty)));
 }
 public MenuStripPresenter(MenuStrip menu, IMenuRegistry menuRegistry, IImageFactory imageFactory)
     : base(menuRegistry, imageFactory)
 {
     _menu = menu;
 }
Ejemplo n.º 21
0
 public ReportingModule(IUnityContainer unityContainer, IMenuRegistry menuRegistry, IScreenFactoryRegistry screenFactoryRegistry)
 {
     _menuRegistry          = menuRegistry;
     _screenFactoryRegistry = screenFactoryRegistry;
     _unityContainer        = unityContainer;
 }
Ejemplo n.º 22
0
 public MenuFacility()
 {
     _topMenuRegistry = new MenuRegistry();
     _menuController  = new MenuController(_topMenuRegistry);
 }
Ejemplo n.º 23
0
 public void Configure(IMenuRegistry sectionMenuRegistry)
 {
     sectionMenuRegistry.Add(new ActionIconMenuItem("Report Management", "~/Content/Canvas/icondemo.png", "Index", "ReportManagement"));
 }
Ejemplo n.º 24
0
 public MenuSystemController(IMenuRegistry menuRegistry)
 {
     this.menuRegistry = menuRegistry;
 }
Ejemplo n.º 25
0
 public void Configure(IMenuRegistry sectionMenuRegistry)
 {
     sectionMenuRegistry.Add(new ActionIconMenuItem("Content Tree", "~/Content/Canvas/ContentTreeManagementIcon.gif", "Index", "TreeManager"));
 }
Ejemplo n.º 26
0
 public ToolStripMenuPresenter(ToolStrip menu, IMenuRegistry menuRegistry, IImageFactory imageFactory)
     : base(menuRegistry, imageFactory)
 {
     _menu = menu;
 }
Ejemplo n.º 27
0
 public MenuFacility()
 {
     _topMenuRegistry = new MenuRegistry();
     _menuController = new MenuController(_topMenuRegistry);
 }
Ejemplo n.º 28
0
 public ReportModule(IUnityContainer container, IScreenFactoryRegistry screenFactoryRegistry, IMenuRegistry menuRegistry)
 {
     _container             = container;
     _screenFactoryRegistry = screenFactoryRegistry;
     _menuRegistry          = menuRegistry;
 }
 public void SetToolbar(IMenuRegistry registry)
 {
     _toolBarPresenter = new ToolBarMenuPresenter(toolStrip, registry, ImageFactory);
     _toolBarPresenter.Populate();
 }
Ejemplo n.º 30
0
 public ProcurementModule(IMenuRegistry registry, IContainer container)
 {
     _registry  = registry;
     _container = container;
 }
Ejemplo n.º 31
0
 public void Configure(IMenuRegistry sectionMenuRegistry)
 {
     sectionMenuRegistry.Add(new ActionIconMenuItem("Security Management", "~/Content/Canvas/UserManagementIcon.gif", "Index", "User"));
 }
 public MenuController(IMenuRegistry topMenu)
 {
     _topMenu = topMenu;
 }
 public ToolStripMenuPresenter(ToolStrip menu, IMenuRegistry menuRegistry, IImageFactory imageFactory)
     : base(menuRegistry, imageFactory)
 {
     _menu = menu;
 }
Ejemplo n.º 34
0
 public ProcurementModule(IMenuRegistry registry,IContainer container)
 {
     _registry = registry;
     _container = container;
 }
Ejemplo n.º 35
0
 public void Configure(IMenuRegistry menuRegistry)
 {
     menuRegistry.Add(new ActionSectionMenuItem("Example Feature", "Index", typeof(ExampleFeatureManagementController).Name.Replace("Controller", string.Empty)));
 }
Ejemplo n.º 36
0
 public AdministrationModule(IUnityContainer container, IScreenFactoryRegistry screenFactoryRegistry, IMenuRegistry menuRegistry)
 {
     _unityContainer        = container;
     _screenFactoryRegistry = screenFactoryRegistry;
     _menuRegistry          = menuRegistry;
 }
 public MenuController(IMenuRegistry topMenu)
 {
     _topMenu = topMenu;
 }
 protected MenuStripPresenterBase(IMenuRegistry menuRegistry, IImageFactory imageFactory)
 {
     _menuRegistry = menuRegistry;
     _imageFactory = imageFactory;
 }
 public void Configure(IMenuRegistry menuRegistry)
 {
     menuRegistry.Add(new SubActionOnlyVisibleDuringModifyAction("Page Information", "Modify", typeof(ContentTreeNodeController).Name.Replace("Controller", string.Empty)));
     menuRegistry.Add(new SubActionOnlyVisibleDuringModifyAction("Meta Information", "ManageMetaInformation", typeof(ContentTreeNodeController).Name.Replace("Controller", string.Empty)));
 }