/// <summary>
        /// Initializes a new instance of the <see cref="AboutViewModel" /> class.
        /// </summary>
        public AboutViewModel(IModuleInfoManager moduleInfoManager, IProcessService processService)
        {
            Argument.IsNotNull(() => moduleInfoManager);
            Argument.IsNotNull(() => processService);

            _moduleInfoManager = moduleInfoManager;
            _processService    = processService;

            var knownModules = moduleInfoManager.KnownModules;
            var tempModules  = knownModules.Select(moduleInfo => new Models.ModuleInfo(moduleInfo)).ToList();
            //{
            //    ModuleName = moduleInfo.ModuleName,
            //    Enabled = moduleInfo.InitializationMode == InitializationMode.WhenAvailable,
            //    State = moduleInfo.InitializationMode == InitializationMode.WhenAvailable ? "Active" : "OnDemand"
            //}).ToList();

            // Code creates a new instance of the Module -> this calls InitializeRibbon -> new instances of all modules are loaded.
            //LicenseUrl = ((Modules.ModuleBase)ServiceLocator.ResolveType(TypeCache.GetType(moduleInfo.ModuleType))).GetLicenseUrl()

            var sorted = tempModules.OrderBy(module => module.ModuleName);

            Modules = new ObservableCollection <ModuleTemplate>(sorted);

            CloseCommand = new Command(OnCloseExecute);
            ViewLicense  = new Command <Models.ModuleInfo>(OnViewLicenseExecute, OnViewLicenseCanExecute);
        }
 public PermissionAppService(RoleManager roleManager, UserManager userManager, IMenuManager menuManager, IPermissionManager permissionManager, IModuleInfoManager moduleInfoManager, ILocalizationContext localizationContext)
 {
     _roleManager         = roleManager;
     _userManager         = userManager;
     _menuManager         = menuManager;
     _permissionManager   = permissionManager;
     _moduleInfoManager   = moduleInfoManager;
     _localizationContext = localizationContext;
 }
        //private readonly IAuthorizationConfiguration _authorizationConfiguration;
        //private readonly IMenuManager _menuManager;
        //private readonly IModuleInfoManager _moduleInfoManager;

        public PermissionManager(
            IIocManager iocManager,
            ICacheManager cacheManager,
            //IAuthorizationConfiguration authorizationConfiguration,
            IModuleInfoManager moduleInfoManager
            )
        {
            _iocManager = iocManager;
            //_authorizationConfiguration = authorizationConfiguration;
            _cacheManager = cacheManager;

            AbpSession = NullAbpSession.Instance;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="ModuleManagerViewModel" /> class.
        /// </summary>
        /// <param name="moduleInfoManager">The module info manager.</param>
        /// <exception cref="ArgumentNullException">The <paramref name="moduleInfoManager"/> is <c>null</c>.</exception>
        public ModuleManagerViewModel(IModuleInfoManager moduleInfoManager)
        {
            Argument.IsNotNull("moduleInfoManager", moduleInfoManager);

            _moduleInfoManager = moduleInfoManager;
            var knownModules = _moduleInfoManager.KnownModules;
            var tempModules = knownModules.Select(moduleInfo => new ModuleTemplate
                {
                    ModuleName = moduleInfo.ModuleName,
                    Enabled = moduleInfo.InitializationMode == InitializationMode.WhenAvailable,
                    State = moduleInfo.InitializationMode == InitializationMode.WhenAvailable ? "Active" : "OnDemand"
                }).ToList();

            var sorted = tempModules.OrderBy(module => module.ModuleName);
            ApplicationModules = new ObservableCollection<ModuleTemplate>(sorted);
        }
Exemple #5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ModuleManagerViewModel" /> class.
        /// </summary>
        /// <param name="moduleInfoManager">The module info manager.</param>
        /// <exception cref="ArgumentNullException">The <paramref name="moduleInfoManager"/> is <c>null</c>.</exception>
        public ModuleManagerViewModel(IModuleInfoManager moduleInfoManager)
        {
            Argument.IsNotNull("moduleInfoManager", moduleInfoManager);

            _moduleInfoManager = moduleInfoManager;
            var knownModules = _moduleInfoManager.KnownModules;
            var tempModules  = knownModules.Select(moduleInfo => new ModuleTemplate
            {
                ModuleName = moduleInfo.ModuleName,
                Enabled    = moduleInfo.InitializationMode == InitializationMode.WhenAvailable,
                State      = moduleInfo.InitializationMode == InitializationMode.WhenAvailable ? "Active" : "OnDemand"
            }).ToList();

            var sorted = tempModules.OrderBy(module => module.ModuleName);

            ApplicationModules = new ObservableCollection <ModuleTemplate>(sorted);
        }
Exemple #6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AboutViewModel" /> class.
        /// </summary>
        public AboutViewModel(IModuleInfoManager moduleInfoManager, IProcessService processService)
        {
            Argument.IsNotNull(() => moduleInfoManager);
            Argument.IsNotNull(() => processService);

            _moduleInfoManager = moduleInfoManager;
            _processService    = processService;

            var knownModules = moduleInfoManager.KnownModules;
            var tempModules  = knownModules.Select(moduleInfo => new Models.ModuleInfo()
            {
                ModuleName = moduleInfo.ModuleName,
                Enabled    = moduleInfo.InitializationMode == InitializationMode.WhenAvailable,
                State      = moduleInfo.InitializationMode == InitializationMode.WhenAvailable ? "Active" : "OnDemand",
                LicenseUrl = ((Modules.ModuleBase)ServiceLocator.ResolveType(TypeCache.GetType(moduleInfo.ModuleType))).GetLicenseUrl()
            }).ToList();

            var sorted = tempModules.OrderBy(module => module.ModuleName);

            Modules = new ObservableCollection <ModuleTemplate>(sorted);

            CloseCommand = new Command(OnCloseExecute);
            ViewLicense  = new Command <Models.ModuleInfo>(OnViewLicenseExecute, OnViewLicenseCanExecute);
        }
Exemple #7
0
 public ModuleDataController(IModuleInfoManager moduleInfoManager)
 {
     _moduleInfoManager = moduleInfoManager;
 }
Exemple #8
0
 public ModuleInfoAppService(IModuleInfoManager moduleManager, IHttpContextAccessor httpContextAccessor)
 {
     _moduleManager       = moduleManager;
     _httpContextAccessor = httpContextAccessor;
 }
 public ModuleTableViewComponent(IModuleInfoManager moduleManager)
 {
     _moduleManager = moduleManager;
 }
Exemple #10
0
 public DynamicSearchParser(IModuleInfoManager moduleInfoManager)
 {
     _moduleInfoManager = moduleInfoManager;
 }
Exemple #11
0
 public ModuleButtonViewComponent(IModuleInfoManager moduleManager)
 {
     _moduleManager = moduleManager;
 }
Exemple #12
0
 public ModuleFormViewComponent(IModuleInfoManager moduleManager)
 {
     _moduleManager = moduleManager;
 }