static void Main()
        {
            MyXafApplication myXafApplication = new MyXafApplication();

            myXafApplication.ApplicationName  = "MyXafApplication";
            myXafApplication.ConnectionString = "Integrated Security=SSPI;Pooling=false;Data Source=(local);Initial Catalog=MyXafApplication";
            AuthenticationActiveDirectory authentication = new AuthenticationActiveDirectory()
            {
                CreateUserAutomatically = true
            };

            myXafApplication.Security = new SecurityStrategyComplex(typeof(SecuritySystemUser), typeof(SecuritySystemRole), authentication);
            myXafApplication.Modules.Add(new MyModule());
            myXafApplication.Modules.Add(new ReportsWindowsFormsModule());
            myXafApplication.Setup();
            myXafApplication.Start();
        }
コード例 #2
0
ファイル: WebApplication.cs プロジェクト: dimajanzen/eXpand
        void InitializeComponent() {
            module1 = new SystemModule();
            module2 = new SystemAspNetModule();
            module3 = new ModelDifferenceTesterModule();
            module4 = new ModelDifferenceTesterAspNetModule();
            sqlConnection1 = new SqlConnection();
            cloneObjectModule1 = new CloneObjectModule();
            securityModule1 = new SecurityModule();

            securitySimple1 = new SecuritySimple();
            authenticationActiveDirectory1 = new AuthenticationActiveDirectory();
            ((ISupportInitialize)(this)).BeginInit();
            // 
            // sqlConnection1
            // 
            sqlConnection1.ConnectionString =
                "Integrated Security=SSPI;Pooling=false;Data Source=.\\SQLEXPRESS;Initial Catalog=M" +
                "odelDifferenceTester";
            sqlConnection1.FireInfoMessageEventOnUserErrors = false;
            // 
            // securitySimple1
            // 
            securitySimple1.Authentication = authenticationActiveDirectory1;
            securitySimple1.UserType = typeof(SimpleUser);
            // 
            // authenticationActiveDirectory1
            // 
            authenticationActiveDirectory1.CreateUserAutomatically = true;
            authenticationActiveDirectory1.LogonParametersType = null;
            // 
            // ModelDifferenceTesterAspNetApplication
            // 
            ApplicationName = "ModelDifferenceTester";
            Connection = sqlConnection1;
            Modules.Add(module1);
            Modules.Add(module2);
            Modules.Add(module3);
            Modules.Add(cloneObjectModule1);
            Modules.Add(securityModule1);

            Modules.Add(module4);
            Security = securitySimple1;
            DatabaseVersionMismatch += ModelDifferenceTesterAspNetApplication_DatabaseVersionMismatch;
            ((ISupportInitialize)(this)).EndInit();
        }
コード例 #3
0
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.module1 = new DevExpress.ExpressApp.SystemModule.SystemModule();
            this.module2 = new DevExpress.ExpressApp.Win.SystemModule.SystemWindowsFormsModule();
            this.module3 = new DXApplication1.Module.DXApplication1Module();
            this.module4 = new DXApplication1.Module.Win.DXApplication1WindowsFormsModule();
            ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
            //
            // DXApplication1WindowsFormsApplication
            //
            this.ApplicationName        = "DXApplication1";
            this.CheckCompatibilityType = DevExpress.ExpressApp.CheckCompatibilityType.DatabaseSchema;
            this.Modules.Add(this.module1);
            this.Modules.Add(this.module2);
            this.Modules.Add(this.module3);
            this.Modules.Add(this.module4);


            var ad = new AuthenticationActiveDirectory <SecuritySystemUser>();

            ad.CreateUserAutomatically = true;

            var securityStrategyComplex1 = new SecurityStrategyComplex();

            securityStrategyComplex1.Authentication = ad;
            //securityStrategyComplex1.Authentication = new SecurityDemoAuthentication(this, RequestedCurentUserName);

            securityStrategyComplex1.RoleType = typeof(SecuritySystemRole);
            securityStrategyComplex1.UserType = typeof(SecuritySystemUser);

            Security = securityStrategyComplex1;

            this.Modules.Add(new SecurityModule());

            this.UseOldTemplates          = false;
            this.DatabaseVersionMismatch += new System.EventHandler <DevExpress.ExpressApp.DatabaseVersionMismatchEventArgs>(this.DXApplication1WindowsFormsApplication_DatabaseVersionMismatch);
            this.CustomizeLanguagesList  += new System.EventHandler <DevExpress.ExpressApp.CustomizeLanguagesListEventArgs>(this.DXApplication1WindowsFormsApplication_CustomizeLanguagesList);

            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
        }
コード例 #4
0
 private void InitializeComponent()
 {
     this.module1                        = new DevExpress.ExpressApp.SystemModule.SystemModule();
     this.module2                        = new DevExpress.ExpressApp.Web.SystemModule.SystemAspNetModule();
     this.module3                        = new FT_EClaim.Module.FT_EClaimModule();
     this.module4                        = new FT_EClaim.Module.Web.FT_EClaimAspNetModule();
     this.securityModule1                = new DevExpress.ExpressApp.Security.SecurityModule();
     this.securityStrategyComplex1       = new DevExpress.ExpressApp.Security.SecurityStrategyComplex();
     this.authenticationActiveDirectory1 = new DevExpress.ExpressApp.Security.AuthenticationActiveDirectory();
     this.auditTrailModule               = new DevExpress.ExpressApp.AuditTrail.AuditTrailModule();
     this.objectsModule                  = new DevExpress.ExpressApp.Objects.BusinessClassLibraryCustomizationModule();
     this.chartModule                    = new DevExpress.ExpressApp.Chart.ChartModule();
     this.chartAspNetModule              = new DevExpress.ExpressApp.Chart.Web.ChartAspNetModule();
     this.cloneObjectModule              = new DevExpress.ExpressApp.CloneObject.CloneObjectModule();
     this.conditionalAppearanceModule    = new DevExpress.ExpressApp.ConditionalAppearance.ConditionalAppearanceModule();
     this.dashboardsModule               = new DevExpress.ExpressApp.Dashboards.DashboardsModule();
     this.dashboardsAspNetModule         = new DevExpress.ExpressApp.Dashboards.Web.DashboardsAspNetModule();
     this.fileAttachmentsAspNetModule    = new DevExpress.ExpressApp.FileAttachments.Web.FileAttachmentsAspNetModule();
     this.htmlPropertyEditorAspNetModule = new DevExpress.ExpressApp.HtmlPropertyEditor.Web.HtmlPropertyEditorAspNetModule();
     this.mapsAspNetModule               = new DevExpress.ExpressApp.Maps.Web.MapsAspNetModule();
     this.notificationsModule            = new DevExpress.ExpressApp.Notifications.NotificationsModule();
     this.notificationsAspNetModule      = new DevExpress.ExpressApp.Notifications.Web.NotificationsAspNetModule();
     this.pivotChartModuleBase           = new DevExpress.ExpressApp.PivotChart.PivotChartModuleBase();
     this.pivotChartAspNetModule         = new DevExpress.ExpressApp.PivotChart.Web.PivotChartAspNetModule();
     this.pivotGridModule                = new DevExpress.ExpressApp.PivotGrid.PivotGridModule();
     this.pivotGridAspNetModule          = new DevExpress.ExpressApp.PivotGrid.Web.PivotGridAspNetModule();
     this.reportsModuleV2                = new DevExpress.ExpressApp.ReportsV2.ReportsModuleV2();
     this.reportsAspNetModuleV2          = new DevExpress.ExpressApp.ReportsV2.Web.ReportsAspNetModuleV2();
     this.schedulerModuleBase            = new DevExpress.ExpressApp.Scheduler.SchedulerModuleBase();
     this.schedulerAspNetModule          = new DevExpress.ExpressApp.Scheduler.Web.SchedulerAspNetModule();
     this.treeListEditorsModuleBase      = new DevExpress.ExpressApp.TreeListEditors.TreeListEditorsModuleBase();
     this.treeListEditorsAspNetModule    = new DevExpress.ExpressApp.TreeListEditors.Web.TreeListEditorsAspNetModule();
     this.validationModule               = new DevExpress.ExpressApp.Validation.ValidationModule();
     this.validationAspNetModule         = new DevExpress.ExpressApp.Validation.Web.ValidationAspNetModule();
     this.viewVariantsModule             = new DevExpress.ExpressApp.ViewVariantsModule.ViewVariantsModule();
     this.stateMachineModule1            = new DevExpress.ExpressApp.StateMachine.StateMachineModule();
     ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
     //
     // securityStrategyComplex1
     //
     this.securityStrategyComplex1.AllowAnonymousAccess  = false;
     this.securityStrategyComplex1.Authentication        = this.authenticationActiveDirectory1;
     this.securityStrategyComplex1.PermissionsReloadMode = DevExpress.ExpressApp.Security.PermissionsReloadMode.NoCache;
     this.securityStrategyComplex1.RoleType = typeof(DevExpress.Persistent.BaseImpl.PermissionPolicy.PermissionPolicyRole);
     this.securityStrategyComplex1.SupportNavigationPermissionsForTypes = false;
     this.securityStrategyComplex1.UserType = typeof(FT_EClaim.Module.BusinessObjects.SystemUsers);
     //
     // authenticationActiveDirectory1
     //
     this.authenticationActiveDirectory1.CreateUserAutomatically = true;
     this.authenticationActiveDirectory1.LogonParametersType     = null;
     //
     // auditTrailModule
     //
     this.auditTrailModule.AuditDataItemPersistentType = typeof(DevExpress.Persistent.BaseImpl.AuditDataItemPersistent);
     //
     // cloneObjectModule
     //
     this.cloneObjectModule.ClonerType = null;
     //
     // dashboardsModule
     //
     this.dashboardsModule.DashboardDataType = typeof(DevExpress.Persistent.BaseImpl.DashboardData);
     //
     // notificationsModule
     //
     this.notificationsModule.CanAccessPostponedItems      = false;
     this.notificationsModule.NotificationsRefreshInterval = System.TimeSpan.Parse("00:05:00");
     this.notificationsModule.NotificationsStartDelay      = System.TimeSpan.Parse("00:00:05");
     this.notificationsModule.ShowDismissAllAction         = false;
     this.notificationsModule.ShowNotificationsWindow      = true;
     this.notificationsModule.ShowRefreshAction            = false;
     //
     // pivotChartModuleBase
     //
     this.pivotChartModuleBase.DataAccessMode           = DevExpress.ExpressApp.CollectionSourceDataAccessMode.Client;
     this.pivotChartModuleBase.ShowAdditionalNavigation = true;
     //
     // reportsModuleV2
     //
     this.reportsModuleV2.EnableInplaceReports     = true;
     this.reportsModuleV2.ReportDataType           = typeof(DevExpress.Persistent.BaseImpl.ReportDataV2);
     this.reportsModuleV2.ReportStoreMode          = DevExpress.ExpressApp.ReportsV2.ReportStoreModes.XML;
     this.reportsModuleV2.ShowAdditionalNavigation = true;
     //
     // reportsAspNetModuleV2
     //
     this.reportsAspNetModuleV2.ReportViewerType = DevExpress.ExpressApp.ReportsV2.Web.ReportViewerTypes.HTML5;
     this.reportsAspNetModuleV2.ShowFormatSpecificExportActions = true;
     //
     // validationModule
     //
     this.validationModule.AllowValidationDetailsAccess     = true;
     this.validationModule.IgnoreWarningAndInformationRules = true;
     //
     // viewVariantsModule
     //
     this.viewVariantsModule.ShowAdditionalNavigation = true;
     //
     // stateMachineModule1
     //
     this.stateMachineModule1.StateMachineStorageType = typeof(DevExpress.ExpressApp.StateMachine.Xpo.XpoStateMachine);
     //
     // FT_EClaimAspNetApplication
     //
     this.ApplicationName        = "FT_EClaim";
     this.CheckCompatibilityType = DevExpress.ExpressApp.CheckCompatibilityType.DatabaseSchema;
     this.Modules.Add(this.module1);
     this.Modules.Add(this.module2);
     this.Modules.Add(this.auditTrailModule);
     this.Modules.Add(this.objectsModule);
     this.Modules.Add(this.chartModule);
     this.Modules.Add(this.cloneObjectModule);
     this.Modules.Add(this.conditionalAppearanceModule);
     this.Modules.Add(this.dashboardsModule);
     this.Modules.Add(this.notificationsModule);
     this.Modules.Add(this.pivotChartModuleBase);
     this.Modules.Add(this.pivotGridModule);
     this.Modules.Add(this.reportsModuleV2);
     this.Modules.Add(this.schedulerModuleBase);
     this.Modules.Add(this.treeListEditorsModuleBase);
     this.Modules.Add(this.validationModule);
     this.Modules.Add(this.viewVariantsModule);
     this.Modules.Add(this.stateMachineModule1);
     this.Modules.Add(this.module3);
     this.Modules.Add(this.chartAspNetModule);
     this.Modules.Add(this.dashboardsAspNetModule);
     this.Modules.Add(this.fileAttachmentsAspNetModule);
     this.Modules.Add(this.htmlPropertyEditorAspNetModule);
     this.Modules.Add(this.mapsAspNetModule);
     this.Modules.Add(this.notificationsAspNetModule);
     this.Modules.Add(this.pivotChartAspNetModule);
     this.Modules.Add(this.pivotGridAspNetModule);
     this.Modules.Add(this.reportsAspNetModuleV2);
     this.Modules.Add(this.schedulerAspNetModule);
     this.Modules.Add(this.treeListEditorsAspNetModule);
     this.Modules.Add(this.validationAspNetModule);
     this.Modules.Add(this.module4);
     this.Modules.Add(this.securityModule1);
     this.Security = this.securityStrategyComplex1;
     this.DatabaseVersionMismatch += new System.EventHandler <DevExpress.ExpressApp.DatabaseVersionMismatchEventArgs>(this.FT_EClaimAspNetApplication_DatabaseVersionMismatch);
     ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
 }