Example #1
0
        static void Main()
        {
            // Setup Application Constants


            Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);
            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);

            // Setup JIRA integration
            //

            DevExpress.UserSkins.OfficeSkins.Register();
            DevExpress.UserSkins.BonusSkins.Register();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(true);
            // Configure the connection string helper
            ConnectionHelper.Configure(RegKey, PrevConnectionStringKey);
            if (Control.ModifierKeys == Keys.Shift)
            {
                Application.Run(new ConnectionChoices());
                Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);
                //Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
            }

            MyGeneration.dOOdads.BusinessEntity.RegistryConnectionString = ConnectionHelper.CurrentConnection.ToString();
            ConnectionManager.ConnectionString = ConnectionHelper.CurrentConnection.ToString();
            LookupKernel = new LookupKernel(new WarehouseContext(ConnectionManager.ConnectionString), new DefaultBindingManager());

            HCMIS.Logging.LogManager.ConnectionString = HCMIS.Security.Settings.ConnectionString = ConnectionHelper.CurrentConnection.ToString();

            StockoutIndexBuilder.Settings.ConnectionString = ConnectionHelper.CurrentConnection.ToString();
            HCMIS.Modules.Requisition.CacheSetting.LoadConfigurationForCaching();
            ConstantsHelper.LoadAllConstants();

            Application.Run(new LoginForm());
        }
        static void Main()
        {
            // Setup Application Constants

            Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);
            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);

            // Setup JIRA integration
            //

            DevExpress.UserSkins.OfficeSkins.Register();
            DevExpress.UserSkins.BonusSkins.Register();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(true);
            // Configure the connection string helper
            ConnectionHelper.Configure(RegKey, PrevConnectionStringKey);
              if (Control.ModifierKeys == Keys.Shift)
            {
                Application.Run(new ConnectionChoices());
                Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);
                //Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
            }

            MyGeneration.dOOdads.BusinessEntity.RegistryConnectionString = ConnectionHelper.CurrentConnection.ToString();
            ConnectionManager.ConnectionString = ConnectionHelper.CurrentConnection.ToString();
            LookupKernel = new LookupKernel(new WarehouseContext(ConnectionManager.ConnectionString), new DefaultBindingManager());

            HCMIS.Logging.LogManager.ConnectionString =  HCMIS.Security.Settings.ConnectionString = ConnectionHelper.CurrentConnection.ToString();

            StockoutIndexBuilder.Settings.ConnectionString = ConnectionHelper.CurrentConnection.ToString();
            HCMIS.Modules.Requisition.CacheSetting.LoadConfigurationForCaching();
            ConstantsHelper.LoadAllConstants();

            Application.Run(new LoginForm());
        }