Beispiel #1
0
        public void Init()
        {
            changeLanguage();
            foreach (ToolBarButton btn in menutoolBar.Buttons)
            {
                btn.Visible = false;
            }
            InitData.Init();
            if (InitData.program != null && InitData.program.programs != null && InitData.program.programs.Count > 0)
            {
                foreach (var p in InitData.program.programs)
                {
                    menutoolBar.Buttons[p].Visible = true;
                }
            }
            openCom();
            //测试代码,正式环境请注释掉
            //_server.open();

            messages = _server.selectMess(DateTime.Now.Date.ToFileTime());            //只查询当天的数据
            newmsg   = messages.Where(m => m.status == STATUS.WAITING).ToList();
            isStop   = false;
            new Thread(CheckTimeOut).Start();
            new Thread(checkUnFinish).Start();
            refresh(0);
        }
Beispiel #2
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app,
                              IHostingEnvironment env,
                              UserManager <User> userManager,
                              RoleManager <IdentityRole> roleManager,
                              FloLabContext context)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseExceptionHandler("/Error");
                app.UseHsts();
            }
            InitData.Init(roleManager, userManager, context).Wait();

            app.UseHttpsRedirection();
            app.UseStaticFiles();
            app.UseSpaStaticFiles();

            app.UseAuthentication();

            app.UseMvc();

            app.UseSpa(spa =>
            {
                // To learn more about options for serving an Angular SPA from ASP.NET Core,
                // see https://go.microsoft.com/fwlink/?linkid=864501

                spa.Options.SourcePath = "flolab-frontend";

                if (env.IsDevelopment())
                {
                    spa.UseAngularCliServer(npmScript: "start");
                }
            });
        }
 /// <summary>
 /// 数据初始化
 /// </summary>
 public static void Init()
 {
     InitData.Init();
 }
Beispiel #4
0
        /// <summary>
        /// 初始化
        /// </summary>
        public void Init()
        {
            InitData.Init();

            //InitPathCode();
        }