Esempio n. 1
0
        public static void Start()
        {
            if (started)
            {
                return;
            }

            started = true;

            Navigator.Start(new NavigationManager(multithreaded: true));
            Finder.Start(new FinderManager());
            Constructor.Start(new ConstructorManager());

            OperationClient.Start(new OperationManager());

            AuthClient.Start(
                types: true,
                property: true,
                queries: true,
                permissions: true,
                operations: true,
                defaultPasswordExpiresLogic: false);

            Navigator.EntitySettings <UserEntity>().OverrideView += (usr, ctrl) =>
            {
                ctrl.Child <EntityLine>("Role").After(new ValueLine().Set(Common.RouteProperty, "[UserEmployeeMixin].AllowLogin"));
                ctrl.Child <EntityLine>("Role").After(new EntityLine().Set(Common.RouteProperty, "[UserEmployeeMixin].Employee"));

                return(ctrl);
            };

            LinksClient.Start(widget: true, contextualMenu: true);

            ProcessClient.Start(package: true, packageOperation: true);
            SchedulerClient.Start();

            FilePathClient.Start();
            ExcelClient.Start(toExcel: true, excelReport: false);
            UserQueryClient.Start();
            ChartClient.Start();
            DashboardClient.Start();

            HelpClient.Start();

            ExceptionClient.Start();

            NoteClient.Start(typeof(UserEntity), /*Note*/ typeof(OrderEntity));
            AlertClient.Start(typeof(UserEntity), /*Alert*/ typeof(OrderEntity));
            SMSClient.Start();

            ProfilerClient.Start();

            OmniboxClient.Start();
            OmniboxClient.Register(new SpecialOmniboxProvider());
            OmniboxClient.Register(new EntityOmniboxProvider());
            OmniboxClient.Register(new DynamicQueryOmniboxProvider());
            OmniboxClient.Register(new UserQueryOmniboxProvider());
            OmniboxClient.Register(new ChartOmniboxProvider());
            OmniboxClient.Register(new UserChartOmniboxProvider());
            OmniboxClient.Register(new DashboardOmniboxProvider());

            SouthwindClient.Start();

            DisconnectedClient.Start();

            Navigator.Initialize();
        }
Esempio n. 2
0
        private void WebStart()
        {
            Navigator.Start(new NavigationManager("haradwaithwinds"));
            Finder.Start(new FinderManager());
            Constructor.Start(new ConstructorManager(), new ClientConstructorManager());

            OperationClient.Start(new OperationManager(), true);

            AuthClient.Start(
                types: true,
                property: true,
                queries: true,
                resetPassword: true,
                passwordExpiration: false,
                singleSignOnMessage: false);

            Navigator.EntitySettings <UserEntity>().CreateViewOverrides()
            .AfterLine((UserEntity u) => u.Role, (html, tc) => html.ValueLine(tc, u => u.Mixin <UserEmployeeMixin>().AllowLogin))
            .AfterLine((UserEntity u) => u.Role, (html, tc) => html.EntityLine(tc, u => u.Mixin <UserEmployeeMixin>().Employee));

            AuthAdminClient.Start(
                types: true,
                properties: true,
                queries: true,
                operations: true,
                permissions: true);

            MailingClient.Start(
                smtpConfig: true,
                newsletter: false,
                pop3Config: false,
                emailReport: false,
                quickLinkFrom: null);

            SMSClient.Start();

            SessionLogClient.Start();
            ExceptionClient.Start();
            UserQueriesClient.Start();
            FilesClient.Start(
                file: true,
                embeddedFile: true,
                filePath: false,
                embeddedFilePath: true);

            MapClient.Start();
            ChartClient.Start();
            ExcelClient.Start(
                toExcelPlain:  true,
                excelReport: false,
                excelAttachment: false);

            WordClient.Start();
            DashboardClient.Start();

            DisconnectedClient.Start();
            ProcessClient.Start(
                packages: true,
                packageOperations: true);

            TranslationClient.Start(new AlreadyTranslatedTranslator(new BingTranslator()),
                                    translatorUser: true,
                                    translationReplacement: false,
                                    instanceTranslator: true);

            SchedulerClient.Start(simpleTask: true);

            NoteClient.Start(typeof(UserEntity), /*Note*/ typeof(OrderEntity));
            AlertClient.Start(typeof(UserEntity), /*Alert*/ typeof(OrderEntity));
            LinksClient.Start(widget: true, contextualItems: true);

            ViewLogClient.Start();
            DiffLogClient.Start();

            HelpClient.Start("Images", "http://localhost:7654/");

            SouthwindClient.Start();

            CacheClient.Start();

            ProfilerClient.Start();

            ScriptHtmlHelper.Manager.MainAssembly = typeof(SouthwindClient).Assembly;
            SignumControllerFactory.MainAssembly  = typeof(SouthwindClient).Assembly;
            SignumControllerFactory.EveryController().AddFilters(ctx =>
                                                                 ctx.FilterInfo.AuthorizationFilters.OfType <AuthenticationRequiredAttribute>().Any() ? null : new AuthenticationRequiredAttribute());
            SignumControllerFactory.EveryController().AddFilters(new SignumExceptionHandlerAttribute());
            SignumControllerFactory.EveryController().AddFilters(new ProfilerFilterAttribute());
            SignumControllerFactory.RegisterAvoidValidate();

            Navigator.Initialize();

            OmniboxClient.Start();
            OmniboxClient.Register(new SpecialOmniboxProvider());
            OmniboxClient.Register(new EntityOmniboxProvider());
            OmniboxClient.Register(new DynamicQueryOmniboxProvider());
            OmniboxClient.Register(new UserQueryOmniboxProvider());
            OmniboxClient.Register(new ChartOmniboxProvider());
            OmniboxClient.Register(new UserChartOmniboxProvider());
            OmniboxClient.Register(new DashboardOmniboxProvider());
            OmniboxClient.Register(new HelpOmniboxProvider());
            OmniboxClient.Register(new MapOmniboxProvider());
        } //WebStart