Пример #1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            EditModelPermission.AlwaysGranted = System.Diagnostics.Debugger.IsAttached;
            Solution2WindowsFormsApplication application = new Solution2WindowsFormsApplication();
            //SIMPLE
            SecuritySimple _securitySimple = new SecuritySimple();

            _securitySimple.UserType = typeof(BasicUser);

            AuthenticationStandard _authenticationStandard = new AuthenticationStandard();

            _authenticationStandard.LogonParametersType = typeof(MyLogonParameters);
            _authenticationStandard.UserType            = typeof(BasicUser);
            _securitySimple.Authentication = _authenticationStandard;
            application.Security           = _securitySimple;

            if (ConfigurationManager.ConnectionStrings["ConnectionString"] != null)
            {
                application.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
            }
            try {
                DevExpress.ExpressApp.Xpo.InMemoryDataStoreProvider.Register();
                application.ConnectionString = DevExpress.ExpressApp.Xpo.InMemoryDataStoreProvider.ConnectionString;
                application.Setup();
                application.Start();
            } catch (Exception e) {
                application.HandleException(e);
            }
        }
Пример #2
0
        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();
        }