예제 #1
0
 public ConfigMenuApplication(IBaseRepository Service, IApplicationMenu formMenu)
 {
     this.formMenu           = formMenu;
     this.menuStrip          = formMenu.getMenuStrip();
     this.Service            = Service;
     MenuItems               = new Dictionary <string, Type>();
     this.ShowManagementForm = new ShowEntityManagementForm(Service, formMenu);
     this.CreateMenu();
 }
        /// <summary>
        /// Constructor : Create Application Menu
        /// </summary>
        /// <param name="FormMenu">MDI Form that cotain Menu of Application</param>
        public CreateApplicationMenu(IApplicationMenu FormMenu)
        {
            // Params
            this.MdiFormWithMenu = FormMenu;
            this.menuStrip       = FormMenu.getMenuStrip();
            // MenuStruct Instance
            MenuItems  = new Dictionary <string, Type>();
            MenuStruct = new MenuStruct();
            // Properties
            this.ShowManagementForm         = new CreateAndShowManagerFormHelper(GwinApp.Instance.TypeDBContext, FormMenu);
            this.MenuItemApplicationService = GwinBaseBLO <BaseEntity>
                                              .CreateBLO_Instance(typeof(MenuItemApplication), GwinApp.Instance.TypeBaseBLO);

            // Create Menu
            this.CalculateMenuItems();
            this.ShowMenuItems();
        }
예제 #3
0
 /// <summary>
 /// Initialize a shell view model with a document manager, application menu view model and event aggregator.
 /// </summary>
 /// <param name="theDocumentManager">Document manager.</param>
 /// <param name="theApplicationMenuViewModel">Application menu view model.</param>
 /// <param name="theEventAggregator">Event aggregator.</param>
 public ShellViewModel(IDocumentManager theDocumentManager, IApplicationMenu theApplicationMenuViewModel, IEventAggregator theEventAggregator)
 {
     _documentManager = theDocumentManager;
     ApplicationMenu  = theApplicationMenuViewModel;
     _eventAggregator = theEventAggregator;
 }