protected void Application_Start(Object sender, EventArgs e) { // Initialize Cuyahoga environment SpreadsheetInfo.SetLicense("EL6N-3AAA-AAAA-AAAB"); // Set application level flags. HttpContext.Current.Application.Lock(); HttpContext.Current.Application["ActiveUsers"] = 0; HttpContext.Current.Application["ModulesLoaded"] = false; HttpContext.Current.Application["IsModuleLoading"] = false; HttpContext.Current.Application["IsInstalling"] = false; HttpContext.Current.Application["IsUpgrading"] = false; HttpContext.Current.Application.UnLock(); // Initialize log4net XmlConfigurator.Configure(); //HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.Initialize(); // Initialize Windsor IWindsorContainer container = new PortalContainer(); container.Kernel.ComponentCreated += Kernel_ComponentCreated; container.Kernel.ComponentDestroyed += Kernel_ComponentDestroyed; // Inititialize the static Windsor helper class. IoC.Initialize(container); // Check for any new versions CheckInstaller(); }
/// <summary> /// The initialize graphics. /// </summary> /// <returns>The initialize graphics.</returns> /// <remarks></remarks> public bool InitializeGraphics() { // try // { render.CreateDevice(this); pc = new PortalContainer(portals, ref render.device); BSPModel.BSPDisplayedInfo.CreateVertexBuffers(ref render.device, ref bsp); BSPModel.BSPDisplayedInfo.CreateIndexBuffers(ref render.device, ref bsp); BSPModel.BSPDisplayedInfo.LoadShaderTextures(ref render.device, ref bsp); System.Drawing.Font systemfont = new System.Drawing.Font("Arial", 12f, FontStyle.Regular); text = new Font(render.device, systemfont); cam = new Camera2(this); cam.speed = 0.05f; // cam.fixedrotation = true; return(true); // } // catch (DirectXException) // { // Catch any errors and return a failure // return false; // } }
/// <summary> /// Obtain the Cuyahoga container. /// </summary> /// <returns></returns> public static PortalContainer GetContainer() { IContainerAccessor containerAccessor = HttpContext.Current.ApplicationInstance as IContainerAccessor; if (containerAccessor == null) { throw new Exception("You must extend the HttpApplication in your web project " + "and implement the IContainerAccessor to properly expose your container instance"); } PortalContainer container = containerAccessor.Container as PortalContainer; if (container == null) { throw new Exception("The container seems to be unavailable in " + "your HttpApplication subclass"); } return(container); }
protected void Application_Start(Object sender, EventArgs e) { HttpConfiguration config = GlobalConfiguration.Configuration; config.Formatters.JsonFormatter.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize; config.Formatters.JsonFormatter.SerializerSettings.PreserveReferencesHandling = Newtonsoft.Json.PreserveReferencesHandling.Objects; // Initialize Cuyahoga environment SpreadsheetInfo.SetLicense("ETZX-IT28-33Q6-1HA2"); // Set application level flags. HttpContext.Current.Application.Lock(); HttpContext.Current.Application["ActiveUsers"] = 0; HttpContext.Current.Application["ModulesLoaded"] = false; HttpContext.Current.Application["IsModuleLoading"] = false; HttpContext.Current.Application["IsInstalling"] = false; HttpContext.Current.Application["IsUpgrading"] = false; HttpContext.Current.Application.UnLock(); // Initialize log4net XmlConfigurator.Configure(); //HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.Initialize(); // Initialize Windsor IWindsorContainer container = new PortalContainer(); container.Kernel.ComponentCreated += Kernel_ComponentCreated; container.Kernel.ComponentDestroyed += Kernel_ComponentDestroyed; // Inititialize the static Windsor helper class. IoC.Initialize(container); // Check for any new versions CheckInstaller(); //Hook up the bundle registration in App_Start BundleConfig.RegisterBundles(BundleTable.Bundles); BundleTable.EnableOptimizations = true; }
/// <summary> /// Creates an HttpHandler for AjaxRequests and resolves the dispatchter from the IoC container /// </summary> public AjaxRequestHandler() { PortalContainer container = ContainerAccessorUtil.GetContainer(); this._dispatcher = container.Resolve <IAjaxRequestDispatcher>(); }
protected void Application_Start(Object sender, EventArgs e) { // Initialize Cuyahoga environment SpreadsheetInfo.SetLicense("EL6N-3AAA-AAAA-AAAB"); // Set application level flags. HttpContext.Current.Application.Lock(); HttpContext.Current.Application["ActiveUsers"] = 0; HttpContext.Current.Application["ModulesLoaded"] = false; HttpContext.Current.Application["IsModuleLoading"] = false; HttpContext.Current.Application["IsInstalling"] = false; HttpContext.Current.Application["IsUpgrading"] = false; HttpContext.Current.Application.UnLock(); // Initialize log4net XmlConfigurator.Configure(); //HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.Initialize(); // Initialize Windsor IWindsorContainer container = new PortalContainer(); container.Kernel.ComponentCreated += Kernel_ComponentCreated; container.Kernel.ComponentDestroyed += Kernel_ComponentDestroyed; // Inititialize the static Windsor helper class. IoC.Initialize(container); // Check for any new versions CheckInstaller(); //ISchedulerFactory schedFact = new StdSchedulerFactory(); //IScheduler sched = schedFact.GetScheduler(); //sched.Start(); //sched.DeleteJob(new JobKey("job1", "group1")); //sched.DeleteJob(new JobKey("job2", "group1")); //sched.DeleteJob(new JobKey("job3", "group1")); //sched.UnscheduleJob(new TriggerKey("trigger1", "group1")); //sched.UnscheduleJob(new TriggerKey("trigger2", "group1")); //sched.UnscheduleJob(new TriggerKey("trigger3", "group1")); //IJobDetail job1 = JobBuilder.Create<CutOffJob>() // .WithIdentity("job1", "group1") // .Build(); //ITrigger trigger1 = TriggerBuilder.Create() // .WithIdentity("trigger1", "group1") // .WithSchedule(CronScheduleBuilder.DailyAtHourAndMinute(10, 0)) // .Build(); //IJobDetail job2 = JobBuilder.Create<LockBookingJob>() // .WithIdentity("job2", "group1") // .Build(); //ITrigger trigger2 = TriggerBuilder.Create() // .WithIdentity("trigger2", "group1") // .WithSchedule(CronScheduleBuilder.DailyAtHourAndMinute(10, 0)) // .Build(); //IJobDetail job3 = JobBuilder.Create<SendBirthdayEmailJob>() // .WithIdentity("job3", "group1") // .Build(); //ITrigger trigger3 = TriggerBuilder.Create() // .WithIdentity("trigger3", "group1") // .WithSchedule(CronScheduleBuilder.DailyAtHourAndMinute(10, 0)) // .Build(); //sched.ScheduleJob(job1, trigger1); //sched.ScheduleJob(job2, trigger2); //sched.ScheduleJob(job3, trigger3); }