Exemple #1
0
        static void Main()
        {
#if EASYTEST
            DevExpress.ExpressApp.Win.EasyTest.EasyTestRemotingRegistration.Register();
#endif
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            EditModelPermission.AlwaysGranted = System.Diagnostics.Debugger.IsAttached;
            if (Tracing.GetFileLocationFromSettings() == DevExpress.Persistent.Base.FileLocation.CurrentUserApplicationDataFolder)
            {
                Tracing.LocalUserAppDataPath = Application.LocalUserAppDataPath;
            }
            Tracing.Initialize();
            QuanLyNhanSuWindowsFormsApplication winApplication = new QuanLyNhanSuWindowsFormsApplication();
            // Refer to the https://documentation.devexpress.com/eXpressAppFramework/CustomDocument112680.aspx help article for more details on how to provide a custom splash form.
            //winApplication.SplashScreen = new DevExpress.ExpressApp.Win.Utils.DXSplashScreen("YourSplashImage.png");
            SecurityAdapterHelper.Enable();
            if (ConfigurationManager.ConnectionStrings["ConnectionString"] != null)
            {
                winApplication.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
            }
            winApplication.SplashScreen = new DXSplashScreen(typeof(StartingForm));
#if EASYTEST
            if (ConfigurationManager.ConnectionStrings["EasyTestConnectionString"] != null)
            {
                winApplication.ConnectionString = ConfigurationManager.ConnectionStrings["EasyTestConnectionString"].ConnectionString;
            }
#endif
#if DEBUG
            if (System.Diagnostics.Debugger.IsAttached && winApplication.CheckCompatibilityType == CheckCompatibilityType.DatabaseSchema)
            {
                winApplication.DatabaseUpdateMode = DatabaseUpdateMode.UpdateDatabaseAlways;
            }
#endif
            try {
                winApplication.Setup();
                winApplication.Start();
            }
            catch (Exception e) {
                winApplication.HandleException(e);
            }
        }
Exemple #2
0
        static void Main()
        {
#if EASYTEST
            DevExpress.ExpressApp.Win.EasyTest.EasyTestRemotingRegistration.Register();
#endif
            WindowsFormsSettings.LoadApplicationSettings();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            DevExpress.Utils.ToolTipController.DefaultController.ToolTipType = DevExpress.Utils.ToolTipType.SuperTip;
            EditModelPermission.AlwaysGranted = System.Diagnostics.Debugger.IsAttached;
            if (Tracing.GetFileLocationFromSettings() == DevExpress.Persistent.Base.FileLocation.CurrentUserApplicationDataFolder)
            {
                Tracing.LocalUserAppDataPath = Application.LocalUserAppDataPath;
            }
            Tracing.Initialize();
            PatitoSoftWindowsFormsApplication winApplication = new PatitoSoftWindowsFormsApplication();
            winApplication.GetSecurityStrategy().RegisterXPOAdapterProviders();
            if (ConfigurationManager.ConnectionStrings["ConnectionString"] != null)
            {
                winApplication.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
            }
#if EASYTEST
            if (ConfigurationManager.ConnectionStrings["EasyTestConnectionString"] != null)
            {
                winApplication.ConnectionString = ConfigurationManager.ConnectionStrings["EasyTestConnectionString"].ConnectionString;
            }
#endif
#if DEBUG
            if (System.Diagnostics.Debugger.IsAttached && winApplication.CheckCompatibilityType == CheckCompatibilityType.DatabaseSchema)
            {
                winApplication.DatabaseUpdateMode = DatabaseUpdateMode.UpdateDatabaseAlways;
            }
#endif
            try {
                winApplication.Setup();
                winApplication.Start();
            }
            catch (Exception e) {
                winApplication.StopSplash();
                winApplication.HandleException(e);
            }
        }
Exemple #3
0
        protected void Session_Start(Object sender, EventArgs e)
        {
            Tracing.Initialize();

            var application = new TestWebApplication();

            application.Modules.Add(new WebModule());
            WebApplication.SetInstance(Session, application);
//            SecurityStrategy security = (SecurityStrategy)WebApplication.Instance.Security;
//            security.RegisterXPOAdapterProviders();
            DevExpress.ExpressApp.Web.Templates.DefaultVerticalTemplateContentNew.ClearSizeLimit();
            WebApplication.Instance.SwitchToNewStyle();



            WebApplication.Instance.ConnectionString = "XpoProvider=InMemoryDataSet";

            WebApplication.Instance.Setup();
            WebApplication.Instance.Start();
        }
Exemple #4
0
        public AturableWiraMobileApplication()
        {
            SecurityAdapterHelper.Enable();
            Tracing.Initialize();
            if (ConfigurationManager.ConnectionStrings["ConnectionString"] != null)
            {
                ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
            }
#if EASYTEST
            if (ConfigurationManager.ConnectionStrings["EasyTestConnectionString"] != null)
            {
                ConnectionString = ConfigurationManager.ConnectionStrings["EasyTestConnectionString"].ConnectionString;
            }
#endif
            if (System.Diagnostics.Debugger.IsAttached && CheckCompatibilityType == CheckCompatibilityType.DatabaseSchema)
            {
                DatabaseUpdateMode = DatabaseUpdateMode.UpdateDatabaseAlways;
            }
            InitializeComponent();
        }
Exemple #5
0
        static void Main()
        {
#if EASYTEST
            DevExpress.ExpressApp.Win.EasyTest.EasyTestRemotingRegistration.Register();
#endif

            // változas sza
            //második változas szandi
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            EditModelPermission.AlwaysGranted = System.Diagnostics.Debugger.IsAttached;
            if (Tracing.GetFileLocationFromSettings() == DevExpress.Persistent.Base.FileLocation.CurrentUserApplicationDataFolder)
            {
                Tracing.LocalUserAppDataPath = Application.LocalUserAppDataPath;
            }
            Tracing.Initialize();
            LogXExplorerWindowsFormsApplication winApplication = new LogXExplorerWindowsFormsApplication();
            // Refer to the https://documentation.devexpress.com/eXpressAppFramework/CustomDocument112680.aspx help article for more details on how to provide a custom splash form.
            //winApplication.SplashScreen = new DevExpress.ExpressApp.Win.Utils.DXSplashScreen("YourSplashImage.png");
            SecurityAdapterHelper.Enable();
            try {
                string                   connectionString = "net.tcp://127.0.0.1:1451/DataServer";
                WcfSecuredClient         wcfSecuredClient = new WcfSecuredClient(WcfDataServerHelper.CreateNetTcpBinding(), new EndpointAddress(connectionString));
                MiddleTierClientSecurity security         = new MiddleTierClientSecurity(wcfSecuredClient);
                security.IsSupportChangePassword = true;
                winApplication.Security          = security;
                winApplication.CreateCustomObjectSpaceProvider += (s, e) => {
                    e.ObjectSpaceProviders.Add(new MiddleTierServerObjectSpaceProvider(wcfSecuredClient));
                    e.ObjectSpaceProviders.Add(new NonPersistentObjectSpaceProvider(winApplication.TypesInfo, null));
                };

                winApplication.SplashScreen = new DXSplashScreen();
                winApplication.Setup();

                winApplication.Start();
                wcfSecuredClient.Dispose();
            }
            catch (Exception e) {
                winApplication.HandleException(e);
            }
        }
Exemple #6
0
        static void Main()
        {
#if EASYTEST
            DevExpress.ExpressApp.Win.EasyTest.EasyTestRemotingRegistration.Register();
#endif
            WindowsFormsSettings.LoadApplicationSettings();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            // EditModelPermission.AlwaysGranted = System.Diagnostics.Debugger.IsAttached;
            if (Tracing.GetFileLocationFromSettings() == FileLocation.CurrentUserApplicationDataFolder)
            {
                Tracing.LocalUserAppDataPath = Application.LocalUserAppDataPath;
            }
            Tracing.Initialize();
            var winApplication = new ReactiveLoggerClientWinApplication();
            winApplication.Modules.Add(new ReactiveLoggerClientWinModule());
            if (ConfigurationManager.ConnectionStrings["ConnectionString"] != null)
            {
                winApplication.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
            }

#if EASYTEST
            if (ConfigurationManager.ConnectionStrings["EasyTestConnectionString"] != null)
            {
                winApplication.ConnectionString = ConfigurationManager.ConnectionStrings["EasyTestConnectionString"].ConnectionString;
            }
#endif
#if DEBUG
            if (winApplication.CheckCompatibilityType == CheckCompatibilityType.DatabaseSchema)
            {
                winApplication.DatabaseUpdateMode = DatabaseUpdateMode.UpdateDatabaseAlways;
            }
#endif
            try {
                winApplication.Setup();
                winApplication.Start();
            }
            catch (Exception e) {
                winApplication.HandleException(e);
            }
        }
Exemple #7
0
        protected void Session_Start(Object sender, EventArgs e) {
            Tracing.Initialize();
            WebApplication.SetInstance(Session, new DxSampleAspNetApplication());
            DevExpress.ExpressApp.Web.Templates.DefaultVerticalTemplateContentNew.ClearSizeLimit();
            WebApplication.Instance.SwitchToNewStyle();
            if(ConfigurationManager.ConnectionStrings["ConnectionString"] != null) {
                WebApplication.Instance.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
            }
#if EASYTEST
            if(ConfigurationManager.ConnectionStrings["EasyTestConnectionString"] != null) {
                WebApplication.Instance.ConnectionString = ConfigurationManager.ConnectionStrings["EasyTestConnectionString"].ConnectionString;
            }
#endif
#if DEBUG
            if(System.Diagnostics.Debugger.IsAttached && WebApplication.Instance.CheckCompatibilityType == CheckCompatibilityType.DatabaseSchema) {
                WebApplication.Instance.DatabaseUpdateMode = DatabaseUpdateMode.UpdateDatabaseAlways;
            }
#endif
            WebApplication.Instance.Setup();
            WebApplication.Instance.Start();
        }
Exemple #8
0
        static void Main()
        {
#if EASYTEST
            DevExpress.ExpressApp.Win.EasyTest.EasyTestRemotingRegistration.Register();
#endif
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            EditModelPermission.AlwaysGranted = System.Diagnostics.Debugger.IsAttached;
            Tracing.LocalUserAppDataPath      = Application.LocalUserAppDataPath;
            Tracing.Initialize();
            CashDisciplineWindowsFormsApplication winApplication = new CashDisciplineWindowsFormsApplication();

            if (ConfigurationManager.ConnectionStrings["ConnectionString"] != null)
            {
                winApplication.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
            }
#if EASYTEST
            if (ConfigurationManager.ConnectionStrings["EasyTestConnectionString"] != null)
            {
                winApplication.ConnectionString = ConfigurationManager.ConnectionStrings["EasyTestConnectionString"].ConnectionString;
            }
#endif
            if (System.Diagnostics.Debugger.IsAttached && winApplication.CheckCompatibilityType == CheckCompatibilityType.DatabaseSchema)
            {
                winApplication.DatabaseUpdateMode = DatabaseUpdateMode.UpdateDatabaseAlways;
            }
            try {
                CriteriaOperator.RegisterCustomFunction(new CashDiscipline.Module.CustomFunctions.MultiConcatFunction());
                CriteriaOperator.RegisterCustomFunction(new CashDiscipline.Module.CustomFunctions.RegexMatchFunction());
                CriteriaOperator.RegisterCustomFunction(new CashDiscipline.Module.CustomFunctions.BoMonthFunction());
                CriteriaOperator.RegisterCustomFunction(new CashDiscipline.Module.CustomFunctions.EoMonthFunction());

                winApplication.Setup();
                winApplication.Start();
            }
            catch (Exception e)
            {
                winApplication.HandleException(e);
            }
        }
Exemple #9
0
        public QuanLyNhanSuMobileApplication()
        {
            Tracing.Initialize();
            if (ConfigurationManager.ConnectionStrings["ConnectionString"] != null)
            {
                ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
            }
#if EASYTEST
            if (ConfigurationManager.ConnectionStrings["EasyTestConnectionString"] != null)
            {
                ConnectionString = ConfigurationManager.ConnectionStrings["EasyTestConnectionString"].ConnectionString;
            }
#endif
            InitializeComponent();
            InitializeDefaults();
#if DEBUG
            if (System.Diagnostics.Debugger.IsAttached && CheckCompatibilityType == CheckCompatibilityType.DatabaseSchema)
            {
                DatabaseUpdateMode = DatabaseUpdateMode.UpdateDatabaseAlways;
            }
#endif
        }
Exemple #10
0
        static void Main()
        {
#if EASYTEST
            DevExpress.ExpressApp.Win.EasyTest.EasyTestRemotingRegistration.Register();
#endif
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            EditModelPermission.AlwaysGranted = System.Diagnostics.Debugger.IsAttached;
            Tracing.LocalUserAppDataPath      = Application.LocalUserAppDataPath;
            Tracing.Initialize();
            EnterWinAppWindowsFormsApplication winApplication = new EnterWinAppWindowsFormsApplication();
            // Refer to the https://documentation.devexpress.com/eXpressAppFramework/CustomDocument112680.aspx help article for more details on how to provide a custom splash form.
            //winApplication.SplashScreen = new DevExpress.ExpressApp.Win.Utils.DXSplashScreen("YourSplashImage.png");
            SecurityAdapterHelper.Enable();
            winApplication.CustomizeLanguage += winApplication_CustomizeLanguage;
            winApplication.SetLanguage("es-HN");
            winApplication.CustomizeFormattingCulture += WinApplication_CustomizeFormattingCulture;
            if (ConfigurationManager.ConnectionStrings["ConnectionString"] != null)
            {
                winApplication.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
            }
#if EASYTEST
            if (ConfigurationManager.ConnectionStrings["EasyTestConnectionString"] != null)
            {
                winApplication.ConnectionString = ConfigurationManager.ConnectionStrings["EasyTestConnectionString"].ConnectionString;
            }
#endif
            if (System.Diagnostics.Debugger.IsAttached && winApplication.CheckCompatibilityType == CheckCompatibilityType.DatabaseSchema)
            {
                winApplication.DatabaseUpdateMode = DatabaseUpdateMode.UpdateDatabaseAlways;
            }
            try {
                winApplication.Setup();
                winApplication.Start();
            }
            catch (Exception e) {
                winApplication.HandleException(e);
            }
        }
Exemple #11
0
        static void Main()
        {
#if EASYTEST
            DevExpress.ExpressApp.Win.EasyTest.EasyTestRemotingRegistration.Register();
#endif
            //test();
            //show msg by
            //Application.ShowViewStrategy.ShowViewInPopupWindow(Application.CreateDashboardView(Application.CreateObjectSpace(), "PaymentSuccessConfirmation", true));
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            EditModelPermission.AlwaysGranted = System.Diagnostics.Debugger.IsAttached;
            Tracing.LocalUserAppDataPath      = Application.LocalUserAppDataPath;
            Tracing.Initialize();
            AppraisalWindowsFormsApplication winApplication = new AppraisalWindowsFormsApplication();
            // Refer to the https://documentation.devexpress.com/eXpressAppFramework/CustomDocument112680.aspx help article for more details on how to provide a custom splash form.
            //winApplication.SplashScreen = new DevExpress.ExpressApp.Win.Utils.DXSplashScreen("YourSplashImage.png");
            if (ConfigurationManager.ConnectionStrings["ConnectionString"] != null)
            {
                winApplication.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
            }
            DevExpress.Data.CurrencyDataController.DisableThreadingProblemsDetection = true;
#if EASYTEST
            if (ConfigurationManager.ConnectionStrings["EasyTestConnectionString"] != null)
            {
                winApplication.ConnectionString = ConfigurationManager.ConnectionStrings["EasyTestConnectionString"].ConnectionString;
            }
#endif
            if (System.Diagnostics.Debugger.IsAttached && winApplication.CheckCompatibilityType == CheckCompatibilityType.DatabaseSchema)
            {
                winApplication.DatabaseUpdateMode = DatabaseUpdateMode.UpdateDatabaseAlways;
            }
            try {
                winApplication.Setup();
                winApplication.Start();
            }
            catch (Exception e) {
                winApplication.HandleException(e);
            }
        }
Exemple #12
0
        static void Main()
        {
            WindowsFormsSettings.LoadApplicationSettings();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            EditModelPermission.AlwaysGranted = System.Diagnostics.Debugger.IsAttached;
            if (Tracing.GetFileLocationFromSettings() == FileLocation.CurrentUserApplicationDataFolder)
            {
                Tracing.LocalUserAppDataPath = Application.LocalUserAppDataPath;
            }
            Tracing.Initialize();
            CubeWindowsFormsApplication winApplication = new CubeWindowsFormsApplication();

            winApplication.SetLanguage("ru");
            SecurityStrategy security = (SecurityStrategy)winApplication.Security;

            security.RegisterEFAdapterProviders();
            if (ConfigurationManager.ConnectionStrings["CubeDbContext"] != null)
            {
                winApplication.ConnectionString = ConfigurationManager.ConnectionStrings["CubeDbContext"].ConnectionString;
            }
#if DEBUG
            if (System.Diagnostics.Debugger.IsAttached && winApplication.CheckCompatibilityType == CheckCompatibilityType.DatabaseSchema)
            {
                winApplication.DatabaseUpdateMode = DatabaseUpdateMode.UpdateDatabaseAlways;
            }
#endif
            try
            {
                CheckCorruption();
                winApplication.Setup();
                winApplication.Start();
            }
            catch (Exception e)
            {
                winApplication.StopSplash();
                winApplication.HandleException(e);
            }
        }
Exemple #13
0
        protected void Session_Start(Object sender, EventArgs e)
        {
            Tracing.Initialize();
            WebApplication.SetInstance(Session, new MintaXAFAspNetApplication());
            DevExpress.ExpressApp.Web.Templates.DefaultVerticalTemplateContentNew.ClearSizeLimit();
            DeviceCategory deviceCategory = DeviceDetector.Instance.GetDeviceCategory();

            #region Hiển thị giao diện theo thiết bị client
            if (deviceCategory == DeviceCategory.Mobile || deviceCategory == DeviceCategory.Tablet)
            {
                WebApplication.Instance.SwitchToNewStyle();
            }
            #endregion

            //#region Cấu hình ngôn ngữ và định dạng mặc định
            //WebApplication.Instance.CustomizeLanguage += new EventHandler<CustomizeLanguageEventArgs>(Instance_CustomizeLanguage);
            //WebApplication.Instance.CustomizeFormattingCulture += new EventHandler<CustomizeFormattingCultureEventArgs>(Instance_CustomizeFormattingCulture);
            //#endregion

            if (ConfigurationManager.ConnectionStrings["ConnectionString"] != null)
            {
                WebApplication.Instance.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
            }
#if EASYTEST
            if (ConfigurationManager.ConnectionStrings["EasyTestConnectionString"] != null)
            {
                WebApplication.Instance.ConnectionString = ConfigurationManager.ConnectionStrings["EasyTestConnectionString"].ConnectionString;
            }
#endif
#if DEBUG
            if (System.Diagnostics.Debugger.IsAttached && WebApplication.Instance.CheckCompatibilityType == CheckCompatibilityType.DatabaseSchema)
            {
                WebApplication.Instance.DatabaseUpdateMode = DatabaseUpdateMode.UpdateDatabaseAlways;
            }
#endif
            WebApplication.Instance.Setup();
            WebApplication.Instance.Start();
        }
Exemple #14
0
 protected void Session_Start(Object sender, EventArgs e)
 {
     Tracing.Initialize();
     WebApplication.SetInstance(Session, new SimpleProjectManagerAspNetApplication());
     if (IsSiteMode())
     {
         WebApplication.Instance.ObjectSpaceCreated += (s, args) => {
             if (args.ObjectSpace is DevExpress.ExpressApp.EF.EFObjectSpace)
             {
                 args.ObjectSpace.Committing += ObjectSpace_Committing;
                 args.ObjectSpace.Disposed   += ObjectSpace_Disposed;
             }
         };
     }
     if (IsSiteMode() || (System.Diagnostics.Debugger.IsAttached && WebApplication.Instance.CheckCompatibilityType == CheckCompatibilityType.DatabaseSchema))
     {
         WebApplication.Instance.DatabaseUpdateMode = DatabaseUpdateMode.UpdateDatabaseAlways;
     }
     DefaultVerticalTemplateContentNew.ClearSizeLimit();
     WebApplication.Instance.SwitchToNewStyle();
     WebApplication.Instance.Setup();
     WebApplication.Instance.Start();
 }
Exemple #15
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
        {
            Tracing.Initialize(null, ((int)TraceLevel.Warning).ToString());
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseExceptionHandler("/Error");
                // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
                app.UseHsts();
            }
            app.UseHttpsRedirection();
            app.UseAuthentication();
            app.UseStaticFiles();
            app.UseRouting();
            app.UseXaf();

            app.UseEndpoints(endpoints => {
                endpoints.MapBlazorHub();
                endpoints.MapFallbackToPage("/_Host");
            });
        }
Exemple #16
0
        static void Main()
        {
            DevExpress.ExpressApp.Win.EasyTest.EasyTestRemotingRegistration.Register();

            WindowsFormsSettings.LoadApplicationSettings();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            EditModelPermission.AlwaysGranted = System.Diagnostics.Debugger.IsAttached;
            if (Tracing.GetFileLocationFromSettings() == FileLocation.CurrentUserApplicationDataFolder)
            {
                Tracing.LocalUserAppDataPath = Application.LocalUserAppDataPath;
            }
            Tracing.Initialize();
            var winApplication = new TestWinApplication();


            try {
                winApplication.Setup();
                winApplication.Start();
            }
            catch (Exception e) {
                winApplication.HandleException(e);
            }
        }
        static void Main(string[] arguments)
        {
            //XafTypesInfo.Instance.RegisterEntity("PropertyLogicImplementation", typeof(FeatureCenter.Module.DC.IPropertyLogicImplementation));
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            EditModelPermission.AlwaysGranted = System.Diagnostics.Debugger.IsAttached;
            FeatureCenterWindowsFormsApplication xafApplication = new FeatureCenterWindowsFormsApplication();

            if (Tracing.GetFileLocationFromSettings() == FileLocation.CurrentUserApplicationDataFolder)
            {
                Tracing.LocalUserAppDataPath = Application.LocalUserAppDataPath;
            }
            Tracing.Initialize();
            // Refer to the http://documentation.devexpress.com/#Xaf/CustomDocument2680 help article for more details on how to provide a custom splash form.
            xafApplication.SplashScreen          = new DevExpress.ExpressApp.Win.Utils.DXSplashScreen();
            xafApplication.CreateCustomTemplate += new EventHandler <CreateCustomTemplateEventArgs>(xafApplication_CreateCustomTemplate);

            if (ConfigurationManager.ConnectionStrings["ConnectionString"] != null)
            {
                xafApplication.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
            }
            DevExpress.ExpressApp.ScriptRecorder.ScriptRecorderControllerBase.ScriptRecorderEnabled = true;
            if (System.Diagnostics.Debugger.IsAttached && xafApplication.CheckCompatibilityType == CheckCompatibilityType.DatabaseSchema)
            {
                xafApplication.DatabaseUpdateMode = DatabaseUpdateMode.UpdateDatabaseAlways;
            }
            try
            {
                xafApplication.Setup();
                xafApplication.Start();
            }
            catch (Exception e)
            {
                xafApplication.HandleException(e);
            }
        }
        protected void Session_Start(Object sender, EventArgs e)
        {
            Tracing.Initialize();
#if EASYTEST
            TestApplication.EasyTest.InMemoryDataStoreProvider.Reload();
#endif
            var application = new TestApplicationAspNetApplication();
            WebApplication.SetInstance(Session, application);
            SecurityStrategy security = (SecurityStrategy)WebApplication.Instance.Security;
            security.RegisterXPOAdapterProviders();
            DevExpress.ExpressApp.Web.Templates.DefaultVerticalTemplateContentNew.ClearSizeLimit();
            WebApplication.Instance.SwitchToNewStyle();
            if (ConfigurationManager.ConnectionStrings["ConnectionString"] != null)
            {
                WebApplication.Instance.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
            }
#if EASYTEST
            TestApplication.EasyTest.InMemoryDataStoreProvider.Reload();
            if (ConfigurationManager.ConnectionStrings["EasyTestConnectionString"] != null)
            {
                WebApplication.Instance.ConnectionString = ConfigurationManager.ConnectionStrings["EasyTestConnectionString"].ConnectionString;
            }
#endif

#if EASYTEST
            WebApplication.Instance.ConnectionString = "XpoProvider=InMemoryDataSet";
#endif
#if DEBUG
            if (System.Diagnostics.Debugger.IsAttached && WebApplication.Instance.CheckCompatibilityType == CheckCompatibilityType.DatabaseSchema)
            {
                WebApplication.Instance.DatabaseUpdateMode = DatabaseUpdateMode.UpdateDatabaseAlways;
            }
#endif
            WebApplication.Instance.Setup();
            WebApplication.Instance.Start();
        }
Exemple #19
0
        public LifeLandManagementMobileApplication()
        {
            Tracing.Initialize();
            if (ConfigurationManager.ConnectionStrings["ConnectionString"] != null)
            {
                ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
            }
#if EASYTEST
            if (ConfigurationManager.ConnectionStrings["EasyTestConnectionString"] != null)
            {
                ConnectionString = ConfigurationManager.ConnectionStrings["EasyTestConnectionString"].ConnectionString;
            }
#endif
            InitializeComponent();
            SecurityStrategy security = (SecurityStrategy)Security;
            security.RegisterXPOAdapterProviders();
            InitializeDefaults();
#if DEBUG
            if (System.Diagnostics.Debugger.IsAttached && CheckCompatibilityType == CheckCompatibilityType.DatabaseSchema)
            {
                DatabaseUpdateMode = DatabaseUpdateMode.UpdateDatabaseAlways;
            }
#endif
        }
Exemple #20
0
        protected void Session_Start(Object sender, EventArgs e)
        {
            Tracing.Initialize();
            WebApplication.SetInstance(Session, new FT_PurchasingPortalAspNetApplication());
            SecurityStrategy security = (SecurityStrategy)WebApplication.Instance.Security;

            security.RegisterXPOAdapterProviders();
            DevExpress.ExpressApp.Web.Templates.DefaultVerticalTemplateContentNew.ClearSizeLimit();
            WebApplication.Instance.Settings.LogonTemplateContentPath =
                "LogonTemplateContent1.ascx";
            WebApplication.Instance.Settings.DefaultVerticalTemplateContentPath =
                "DefaultVerticalTemplateContent1.ascx";
            WebApplication.Instance.Settings.NestedFrameControlPath =
                "NestedFrameControl1.ascx";
            WebApplication.Instance.Settings.DialogTemplateContentPath =
                "DialogTemplateContent1.ascx";
            WebApplication.Instance.Settings.FindDialogTemplateContentPath =
                "FindDialogTemplateContent1.ascx";
            WebApplication.Instance.SwitchToNewStyle();

            #region GeneralSettings
            string temp = "";

            temp = ConfigurationManager.AppSettings["LiveWithPost"].ToString();
            FT_PurchasingPortal.Module.GeneralValues.LiveWithPost = false;
            if (temp.ToUpper() == "Y" || temp.ToUpper() == "YES" || temp.ToUpper() == "TRUE" || temp == "1")
            {
                FT_PurchasingPortal.Module.GeneralValues.LiveWithPost = true;
            }

            temp = ConfigurationManager.AppSettings["EmailSend"].ToString();
            FT_PurchasingPortal.Module.GeneralValues.EmailSend = false;
            if (temp.ToUpper() == "Y" || temp.ToUpper() == "YES" || temp.ToUpper() == "TRUE" || temp == "1")
            {
                FT_PurchasingPortal.Module.GeneralValues.EmailSend = true;
            }

            FT_PurchasingPortal.Module.GeneralValues.EmailHost       = ConfigurationManager.AppSettings["EmailHost"].ToString();
            FT_PurchasingPortal.Module.GeneralValues.EmailHostDomain = ConfigurationManager.AppSettings["EmailHostDomain"].ToString();
            FT_PurchasingPortal.Module.GeneralValues.EmailPort       = ConfigurationManager.AppSettings["EmailPort"].ToString();
            FT_PurchasingPortal.Module.GeneralValues.Email           = ConfigurationManager.AppSettings["Email"].ToString();
            FT_PurchasingPortal.Module.GeneralValues.EmailPassword   = ConfigurationManager.AppSettings["EmailPassword"].ToString();
            FT_PurchasingPortal.Module.GeneralValues.EmailName       = ConfigurationManager.AppSettings["EmailName"].ToString();

            FT_PurchasingPortal.Module.GeneralValues.TempFolder = ConfigurationManager.AppSettings["TempFolder"].ToString();

            temp = ConfigurationManager.AppSettings["EmailSSL"].ToString();
            FT_PurchasingPortal.Module.GeneralValues.EmailSSL = false;
            if (temp.ToUpper() == "Y" || temp.ToUpper() == "YES" || temp.ToUpper() == "TRUE" || temp == "1")
            {
                FT_PurchasingPortal.Module.GeneralValues.EmailSSL = true;
            }

            temp = ConfigurationManager.AppSettings["EmailUseDefaultCredential"].ToString();
            FT_PurchasingPortal.Module.GeneralValues.EmailUseDefaultCredential = false;
            if (temp.ToUpper() == "Y" || temp.ToUpper() == "YES" || temp.ToUpper() == "TRUE" || temp == "1")
            {
                FT_PurchasingPortal.Module.GeneralValues.EmailUseDefaultCredential = true;
            }

            FT_PurchasingPortal.Module.GeneralValues.DeliveryMethod = ConfigurationManager.AppSettings["DeliveryMethod"].ToString();

            FT_PurchasingPortal.Module.GeneralValues.defwh            = ConfigurationManager.AppSettings["defwh"].ToString();
            FT_PurchasingPortal.Module.GeneralValues.definputtax      = ConfigurationManager.AppSettings["definputtax"].ToString();
            FT_PurchasingPortal.Module.GeneralValues.defoutputtax     = ConfigurationManager.AppSettings["defoutputtax"].ToString();
            FT_PurchasingPortal.Module.GeneralValues.deflocalcurrency = ConfigurationManager.AppSettings["deflocalcurrency"].ToString();

            #endregion
            WebApplication.Instance.CustomizeFormattingCulture += Instance_CustomizeFormattingCulture;

            if (ConfigurationManager.ConnectionStrings["ConnectionString"] != null)
            {
                WebApplication.Instance.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
            }
#if EASYTEST
            if (ConfigurationManager.ConnectionStrings["EasyTestConnectionString"] != null)
            {
                WebApplication.Instance.ConnectionString = ConfigurationManager.ConnectionStrings["EasyTestConnectionString"].ConnectionString;
            }
#endif
#if DEBUG
            if (System.Diagnostics.Debugger.IsAttached && WebApplication.Instance.CheckCompatibilityType == CheckCompatibilityType.DatabaseSchema)
            {
                WebApplication.Instance.DatabaseUpdateMode = DatabaseUpdateMode.UpdateDatabaseAlways;
            }
#endif
            WebApplication.Instance.Setup();
            WebApplication.Instance.Start();
        }
Exemple #21
0
        public static void Main(string[] arguments)
        {
            WindowsFormsSettings.LoadApplicationSettings();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            if (Tracing.GetFileLocationFromSettings() == FileLocation.CurrentUserApplicationDataFolder)
            {
                Tracing.LocalUserAppDataPath = Application.LocalUserAppDataPath;
            }
            Tracing.Initialize();
            DevExpress.ExpressApp.Utils.ImageLoader.Instance.UseSvgImages = true;
#if NETSTANDARD || NETCOREAPP
            DbProviderFactories.RegisterFactory("System.Data.SQLite.EF6", System.Data.SQLite.SQLiteFactory.Instance);
            DbProviderFactories.RegisterFactory("System.Data.SQLite", System.Data.SQLite.EF6.SQLiteProviderFactory.Instance);
#endif
            XCRMWinApplication winApplication = new XCRMWinApplication();
// TODO: DXCORE3
#if !DXCORE3
            Demos.Feedback.XAFFeedbackHelper helper = new Demos.Feedback.XAFFeedbackHelper(winApplication);
#endif
#if EasyTest
            try {
                DevExpress.ExpressApp.Win.EasyTest.EasyTestRemotingRegistration.Register();
            }
            catch (Exception) { }
            DevExpress.XtraScheduler.Internal.Diagnostics.XtraSchedulerDebug.SkipInsertionCheck = true;
#endif
            winApplication.CustomizeFormattingCulture += new EventHandler <CustomizeFormattingCultureEventArgs>(winApplication_CustomizeFormattingCulture);
            SecurityAdapterHelper.Enable();
            try {
                string connectionString = null;
                ConnectionStringSettings connectionStringSettings = ConfigurationManager.ConnectionStrings["ConnectionString"];
                if (connectionStringSettings != null)
                {
                    connectionString = connectionStringSettings.ConnectionString;
                }
                if (string.IsNullOrEmpty(winApplication.ConnectionString) && winApplication.Connection == null)
                {
                    connectionStringSettings = ConfigurationManager.ConnectionStrings["SqlExpressConnectionString"];
                    if (connectionStringSettings != null)
                    {
                        connectionString = DemoDbEngineDetectorHelper.PatchSQLConnectionString(connectionStringSettings.ConnectionString);
                        if (connectionString == DemoDbEngineDetectorHelper.AlternativeConnectionString)
                        {
                            connectionString = ConfigurationManager.ConnectionStrings["SqliteConnectionString"].ConnectionString;
                            UseSQLAlternativeInfoSingleton.Instance.FillFields(DemoDbEngineDetectorHelper.SQLServerIsNotFoundMessage, DemoEFDatabaseHelper.AlternativeName, DemoEFDatabaseHelper.SQLiteUsageMessage);
                        }
                    }
                }
                winApplication.ConnectionString = connectionString;
                if (System.Diagnostics.Debugger.IsAttached && winApplication.CheckCompatibilityType == CheckCompatibilityType.DatabaseSchema)
                {
                    winApplication.DatabaseUpdateMode = DatabaseUpdateMode.UpdateDatabaseAlways;
                }
                winApplication.Setup();
                winApplication.Start();
            }
            catch (Exception e) {
                winApplication.StopSplash();
                winApplication.HandleException(e);
            }
        }
Exemple #22
0
        static void Main()
        {
            DevExpress.ExpressApp.FrameworkSettings.DefaultSettingsCompatibilityMode = DevExpress.ExpressApp.FrameworkSettingsCompatibilityMode.Latest;
#if EASYTEST
            DevExpress.ExpressApp.Win.EasyTest.EasyTestRemotingRegistration.Register();
#endif
            WindowsFormsSettings.LoadApplicationSettings();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            DevExpress.Utils.ToolTipController.DefaultController.ToolTipType = DevExpress.Utils.ToolTipType.SuperTip;
            EditModelPermission.AlwaysGranted = System.Diagnostics.Debugger.IsAttached;
            if (Tracing.GetFileLocationFromSettings() == DevExpress.Persistent.Base.FileLocation.CurrentUserApplicationDataFolder)
            {
                Tracing.LocalUserAppDataPath = Application.LocalUserAppDataPath;
            }
            Tracing.Initialize();
            OrdersManagementProjectWindowsFormsApplication winApplication = new OrdersManagementProjectWindowsFormsApplication();
            winApplication.GetSecurityStrategy().RegisterXPOAdapterProviders();
            if (ConfigurationManager.ConnectionStrings["ConnectionString"] != null)
            {
                winApplication.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
            }
#if EASYTEST
            if (ConfigurationManager.ConnectionStrings["EasyTestConnectionString"] != null)
            {
                winApplication.ConnectionString = ConfigurationManager.ConnectionStrings["EasyTestConnectionString"].ConnectionString;
            }
#endif
#if DEBUG
            if (System.Diagnostics.Debugger.IsAttached && winApplication.CheckCompatibilityType == CheckCompatibilityType.DatabaseSchema)
            {
                winApplication.DatabaseUpdateMode = DatabaseUpdateMode.UpdateDatabaseAlways;
            }
#endif

#if DEBUG
            if (System.Diagnostics.Debugger.IsAttached)
            {
                string automaticDebugUser = System.Configuration.ConfigurationManager.AppSettings["AutomaticDebugUser"];
                if (!string.IsNullOrEmpty(automaticDebugUser))
                {
                    SecurityStrategyComplex securityStrategyComplex = winApplication.Security as SecurityStrategyComplex;
                    if (securityStrategyComplex != null)
                    {
                        securityStrategyComplex.Authentication = new Domain.Security.AuthenticationStandardForDebug();
                    }
                }
            }
#endif

            // Audit Trail security improvement
            AuditTrailService.Instance.CustomizeAuditTrailSettings += new CustomizeAuditSettingsEventHandler(Instance_CustomizeAuditTrailSettings);

            try
            {
                winApplication.Setup();
                winApplication.Start();
            }
            catch (Exception e)
            {
                winApplication.StopSplash();
                winApplication.HandleException(e);
            }
        }
Exemple #23
0
        protected void Session_Start(Object sender, EventArgs e)
        {
            Tracing.Initialize();
            WebApplication.SetInstance(Session, new FT_EClaimAspNetApplication());
            DevExpress.ExpressApp.Web.Templates.DefaultVerticalTemplateContentNew.ClearSizeLimit();
            //WebApplication.Instance.Settings.DefaultVerticalTemplateContentPath = "DefaultVerticalTemplateContent1.ascx";
            WebApplication.Instance.SwitchToNewStyle();
            #region listview column size adjustable
            WebApplication.OptimizationSettings.LockRecoverViewStateOnNavigationCallback = false;
            #endregion

            #region GeneralSettings
            string temp = "";

            temp = ConfigurationManager.AppSettings["EmailSend"].ToString();
            FT_EClaim.Module.GeneralSettings.EmailSend = false;
            if (temp.ToUpper() == "Y" || temp.ToUpper() == "YES" || temp.ToUpper() == "TRUE" || temp == "1")
            {
                FT_EClaim.Module.GeneralSettings.EmailSend = true;
            }

            FT_EClaim.Module.GeneralSettings.EmailHost       = ConfigurationManager.AppSettings["EmailHost"].ToString();
            FT_EClaim.Module.GeneralSettings.EmailHostDomain = ConfigurationManager.AppSettings["EmailHostDomain"].ToString();
            FT_EClaim.Module.GeneralSettings.EmailPort       = ConfigurationManager.AppSettings["EmailPort"].ToString();
            FT_EClaim.Module.GeneralSettings.Email           = ConfigurationManager.AppSettings["Email"].ToString();
            FT_EClaim.Module.GeneralSettings.EmailPassword   = ConfigurationManager.AppSettings["EmailPassword"].ToString();
            FT_EClaim.Module.GeneralSettings.EmailName       = ConfigurationManager.AppSettings["EmailName"].ToString();

            temp = ConfigurationManager.AppSettings["EmailSSL"].ToString();
            FT_EClaim.Module.GeneralSettings.EmailSSL = false;
            if (temp.ToUpper() == "Y" || temp.ToUpper() == "YES" || temp.ToUpper() == "TRUE" || temp == "1")
            {
                FT_EClaim.Module.GeneralSettings.EmailSSL = true;
            }

            temp = ConfigurationManager.AppSettings["EmailUseDefaultCredential"].ToString();
            FT_EClaim.Module.GeneralSettings.EmailUseDefaultCredential = false;
            if (temp.ToUpper() == "Y" || temp.ToUpper() == "YES" || temp.ToUpper() == "TRUE" || temp == "1")
            {
                FT_EClaim.Module.GeneralSettings.EmailUseDefaultCredential = true;
            }

            FT_EClaim.Module.GeneralSettings.DeliveryMethod = ConfigurationManager.AppSettings["DeliveryMethod"].ToString();

            FT_EClaim.Module.GeneralSettings.B1Post = false; // no more real time posting due to diapi error
            temp = ConfigurationManager.AppSettings["B1Post"].ToString();
            FT_EClaim.Module.GeneralSettings.B1Post = false;
            if (temp.ToUpper() == "Y" || temp.ToUpper() == "YES" || temp.ToUpper() == "TRUE" || temp == "1")
            {
                FT_EClaim.Module.GeneralSettings.B1Post = true;
            }

            FT_EClaim.Module.GeneralSettings.LocalCurrency = ConfigurationManager.AppSettings["LocalCurrency"].ToString();

            FT_EClaim.Module.GeneralSettings.B1UserName       = ConfigurationManager.AppSettings["B1UserName"].ToString();
            FT_EClaim.Module.GeneralSettings.B1Password       = ConfigurationManager.AppSettings["B1Password"].ToString();
            FT_EClaim.Module.GeneralSettings.B1Server         = ConfigurationManager.AppSettings["B1Server"].ToString();
            FT_EClaim.Module.GeneralSettings.B1CompanyDB      = ConfigurationManager.AppSettings["B1CompanyDB"].ToString();
            FT_EClaim.Module.GeneralSettings.B1License        = ConfigurationManager.AppSettings["B1License"].ToString();
            FT_EClaim.Module.GeneralSettings.B1DbServerType   = ConfigurationManager.AppSettings["B1DbServerType"].ToString();
            FT_EClaim.Module.GeneralSettings.B1Language       = ConfigurationManager.AppSettings["B1Language"].ToString();
            FT_EClaim.Module.GeneralSettings.B1DbUserName     = ConfigurationManager.AppSettings["B1DbUserName"].ToString();
            FT_EClaim.Module.GeneralSettings.B1DbPassword     = ConfigurationManager.AppSettings["B1DbPassword"].ToString();
            FT_EClaim.Module.GeneralSettings.B1AttachmentPath = ConfigurationManager.AppSettings["B1AttachmentPath"].ToString();

            //FT_EClaim.Module.GeneralSettings.B1APIVseries = int.Parse(ConfigurationManager.AppSettings["B1APIVseries"].ToString());
            //FT_EClaim.Module.GeneralSettings.B1RefCol = ConfigurationManager.AppSettings["B1RefCol"].ToString();
            FT_EClaim.Module.GeneralSettings.B1DeptDimension  = int.Parse(ConfigurationManager.AppSettings["B1DeptDimension"].ToString());
            FT_EClaim.Module.GeneralSettings.B1DivDimension   = int.Parse(ConfigurationManager.AppSettings["B1DivDimension"].ToString());
            FT_EClaim.Module.GeneralSettings.B1BrandDimension = int.Parse(ConfigurationManager.AppSettings["B1BrandDimension"].ToString());

            FT_EClaim.Module.GeneralSettings.defaulttax         = ConfigurationManager.AppSettings["DefaultTax"].ToString();
            FT_EClaim.Module.GeneralSettings.defaultmileagetax  = ConfigurationManager.AppSettings["DefaultMileageTax"].ToString();
            FT_EClaim.Module.GeneralSettings.defemptyproject    = ConfigurationManager.AppSettings["DefaultEmptyProject"].ToString();
            FT_EClaim.Module.GeneralSettings.defemptydepartment = ConfigurationManager.AppSettings["DefaultEmptyDepartment"].ToString();
            FT_EClaim.Module.GeneralSettings.defemptydivision   = ConfigurationManager.AppSettings["DefaultEmptyDivision"].ToString();
            FT_EClaim.Module.GeneralSettings.defemptybrand      = ConfigurationManager.AppSettings["DefaultEmptyBrand"].ToString();
            FT_EClaim.Module.GeneralSettings.defaultregion      = ConfigurationManager.AppSettings["DefaultRegion"].ToString();

            FT_EClaim.Module.GeneralSettings.appurl = System.Web.HttpContext.Current.Request.Url.AbsoluteUri; // + requestManager.GetQueryString(shortcut)

            #endregion
            WebApplication.Instance.CustomizeFormattingCulture += Instance_CustomizeFormattingCulture;
            WebApplication.Instance.LoggedOn += Instance_LoggedOn;

            if (ConfigurationManager.ConnectionStrings["ConnectionString"] != null)
            {
                WebApplication.Instance.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
            }
#if EASYTEST
            if (ConfigurationManager.ConnectionStrings["EasyTestConnectionString"] != null)
            {
                WebApplication.Instance.ConnectionString = ConfigurationManager.ConnectionStrings["EasyTestConnectionString"].ConnectionString;
            }
#endif
#if DEBUG
            if (System.Diagnostics.Debugger.IsAttached && WebApplication.Instance.CheckCompatibilityType == CheckCompatibilityType.DatabaseSchema)
            {
                WebApplication.Instance.DatabaseUpdateMode = DatabaseUpdateMode.UpdateDatabaseAlways;
            }
#endif
            WebApplication.Instance.Setup();
            WebApplication.Instance.Start();
        }
Exemple #24
0
        public static void Main(string[] arguments)
        {
            WindowsFormsSettings.LoadApplicationSettings();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            if (Tracing.GetFileLocationFromSettings() == FileLocation.CurrentUserApplicationDataFolder)
            {
                Tracing.LocalUserAppDataPath = Application.LocalUserAppDataPath;
            }
            Tracing.Initialize();
            MainDemoWinApplication winApplication = new MainDemoWinApplication();

            DevExpress.ExpressApp.Utils.ImageLoader.Instance.UseSvgImages = true;
#if DEBUG
            DevExpress.ExpressApp.Win.EasyTest.EasyTestRemotingRegistration.Register();
#endif
            AuditTrailService.Instance.QueryCurrentUserName += new QueryCurrentUserNameEventHandler(Instance_QueryCurrentUserName);
            winApplication.CustomizeFormattingCulture       += new EventHandler <CustomizeFormattingCultureEventArgs>(winApplication_CustomizeFormattingCulture);
            winApplication.LastLogonParametersReading       += new EventHandler <LastLogonParametersReadingEventArgs>(winApplication_LastLogonParametersReading);
            winApplication.CustomizeTemplate += new EventHandler <CustomizeTemplateEventArgs>(WinApplication_CustomizeTemplate);
            SecurityAdapterHelper.Enable();
            ConnectionStringSettings connectionStringSettings = ConfigurationManager.ConnectionStrings["ConnectionString"];
            if (connectionStringSettings != null)
            {
                winApplication.ConnectionString = connectionStringSettings.ConnectionString;
            }
            if (string.IsNullOrEmpty(winApplication.ConnectionString) && winApplication.Connection == null)
            {
                connectionStringSettings = ConfigurationManager.ConnectionStrings["SqlExpressConnectionString"];
                if (connectionStringSettings != null)
                {
                    string connectionString = connectionStringSettings.ConnectionString;
                    if (connectionString != InMemoryDataStoreProvider.ConnectionString)
                    {
                        connectionString = DemoDbEngineDetectorHelper.PatchSQLConnectionString(connectionString);
                        if (connectionString == DemoDbEngineDetectorHelper.AlternativeConnectionString)
                        {
                            connectionString = InMemoryDataStoreProvider.ConnectionString;
                            UseSQLAlternativeInfoSingleton.Instance.FillFields(DemoDbEngineDetectorHelper.SQLServerIsNotFoundMessage, DemoXPODatabaseHelper.AlternativeName, DemoXPODatabaseHelper.InMemoryDatabaseUsageMessage);
                        }
                    }
                    winApplication.ConnectionString = connectionString;
                }
            }
#if DEBUG
            foreach (string argument in arguments)
            {
                if (argument.StartsWith("-connectionString:"))
                {
                    string connectionString = argument.Replace("-connectionString:", "");
                    winApplication.ConnectionString = connectionString;
                }
            }
#endif
            if (System.Diagnostics.Debugger.IsAttached && winApplication.CheckCompatibilityType == CheckCompatibilityType.DatabaseSchema)
            {
                winApplication.DatabaseUpdateMode = DatabaseUpdateMode.UpdateDatabaseAlways;
            }
            try {
                winApplication.Setup();
                winApplication.Start();
            }
            catch (Exception e) {
                winApplication.StopSplash();
                winApplication.HandleException(e);
            }
        }
Exemple #25
0
        public static void Main(string[] arguments)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            #region DEMO_REMOVE
            if (arguments.Length > 0)
            {
                string param = (string)arguments.GetValue(0);
                if (param.Contains("UserName="******"UserName="******"");
                }
            }
            #endregion

            if (Tracing.GetFileLocationFromSettings() == FileLocation.CurrentUserApplicationDataFolder)
            {
                Tracing.LocalUserAppDataPath = Application.LocalUserAppDataPath;
            }
            Tracing.Initialize();
            MainDemoWinApplication winApplication = new MainDemoWinApplication();
            DevExpress.ExpressApp.Utils.ImageLoader.Instance.UseSvgImages = true;
#if DEBUG
            DevExpress.ExpressApp.Win.EasyTest.EasyTestRemotingRegistration.Register();
#endif
            AuditTrailService.Instance.QueryCurrentUserName += new QueryCurrentUserNameEventHandler(Instance_QueryCurrentUserName);
            winApplication.CustomizeFormattingCulture       += new EventHandler <CustomizeFormattingCultureEventArgs>(winApplication_CustomizeFormattingCulture);
            winApplication.LastLogonParametersReading       += new EventHandler <LastLogonParametersReadingEventArgs>(winApplication_LastLogonParametersReading);
            SecurityAdapterHelper.Enable();
            ConnectionStringSettings connectionStringSettings = ConfigurationManager.ConnectionStrings["ConnectionString"];
            if (connectionStringSettings != null)
            {
                winApplication.ConnectionString = connectionStringSettings.ConnectionString;
            }
            else if (string.IsNullOrEmpty(winApplication.ConnectionString) && winApplication.Connection == null)
            {
                connectionStringSettings = ConfigurationManager.ConnectionStrings["SqlExpressConnectionString"];
                if (connectionStringSettings != null)
                {
                    winApplication.ConnectionString = DbEngineDetector.PatchConnectionString(connectionStringSettings.ConnectionString);
                }
            }
#if DEBUG
            foreach (string argument in arguments)
            {
                if (argument.StartsWith("-connectionString:"))
                {
                    string connectionString = argument.Replace("-connectionString:", "");
                    winApplication.ConnectionString = connectionString;
                }
            }
#endif
            if (System.Diagnostics.Debugger.IsAttached && winApplication.CheckCompatibilityType == CheckCompatibilityType.DatabaseSchema)
            {
                winApplication.DatabaseUpdateMode = DatabaseUpdateMode.UpdateDatabaseAlways;
            }
            try {
                winApplication.Setup();
                winApplication.Start();
            }
            catch (Exception e) {
                winApplication.HandleException(e);
            }
        }