Exemplo n.º 1
0
 static PagesHandler()
 {
     CustomCssUrl      = Configuration.ConfigUtils.CustomCssUrl;
     SchedulerProvider = Configuration.ConfigUtils.SchedulerProvider;
     SchedulerProvider.Init();
     SchedulerDataProvider = new DefaultSchedulerDataProvider(SchedulerProvider);
 }
Exemplo n.º 2
0
 static PagesHandler()
 {
     CustomCssUrl = Configuration.ConfigUtils.CustomCssUrl;
     SchedulerProvider = Configuration.ConfigUtils.SchedulerProvider;
     SchedulerProvider.Init();
     SchedulerDataProvider = new DefaultSchedulerDataProvider(SchedulerProvider);
 }
Exemplo n.º 3
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ISchedulerProvider provider)
        {
            provider.Init();
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseExceptionHandler("/Home/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.UseStaticFiles();
            app.UseSession();
            app.UseCookiePolicy();
            app.UseAuthentication();
            app.UseMvc(routes =>
            {
                routes.MapRoute(
                    name: "default",
                    template: "{controller=Home}/{action=Index}/{id?}");
            });
        }
Exemplo n.º 4
0
 static PagesHandler()
 {
     ViewEngine = new VelocityViewEngine();
     ViewEngine.Init();
     SchedulerProvider = Configuration.ConfigUtils.SchedulerProvider;
     SchedulerProvider.Init();
     SchedulerDataProvider = new DefaultSchedulerDataProvider(SchedulerProvider);
 }
Exemplo n.º 5
0
 static PagesHandler()
 {
     ViewEngine = new VelocityViewEngine();
     ViewEngine.Init();
     SchedulerProvider = Configuration.ConfigUtils.SchedulerProvider;
     SchedulerProvider.Init();
     SchedulerDataProvider = new DefaultSchedulerDataProvider(SchedulerProvider);
 }
Exemplo n.º 6
0
        static void Main()
        {
            try
            {
                //处理未捕获的异常
                Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
                //处理UI线程异常
                Application.ThreadException += Application_ThreadException;
                //处理非UI线程异常
                AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                ISchedulerProvider schedulerProvider = Provider.SchedulerProvider;
                schedulerProvider.Init();
                ISchedulerDataProvider schedulerDataProvider = new DefaultSchedulerDataProvider(schedulerProvider);
                Application.Run(new MainForm(schedulerProvider, schedulerDataProvider));
            }
            catch (Exception exception)
            {
                string str = GetExceptionMsg(exception, string.Empty);
                MessageBox.Show(str, "系统错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }