private void LoginForm_Load(object sender, EventArgs e) { IDataAccess da = new DataAccessImpl(); ILogger logger = new GeneralLogger(); sl = new SecurityLayerImpl(da, logger); IEnumerable <User> ul = sl.GetUsersList(); cbUsers.Items.AddRange(ul.ToArray()); }
public void GetKeyeventsforProcess() { IDataAccess _dal = new DataAccessImpl(); var records = _dal.GetKeyEventsToProcessAsync(); while (!records.IsCompleted) { // System.Threading.Thread.Sleep() Console.WriteLine("Awaiting..."); } Assert.IsTrue(records.Result != null); }
private void MainFm_Load(object sender, EventArgs e) { this.WindowState = ExDbg.IsAttached ? FormWindowState.Normal : FormWindowState.Maximized; VC2WinFmApp.ErrorLog = new SimpleLogImpl_Text(ExApp_WinFm.GetAssistFileName("Log", "_Error.Log"), true, 10 * 1000, LogLevel.All); String connStr; var dbFile = Application.StartupPath + "\\VC.mdb"; if (new FileInfo(dbFile).Exists) { connStr = String.Format(VC2WinFmApp.cConnStr, dbFile); } else { dbFile = Application.StartupPath + "\\..\\..\\VC.mdb"; connStr = String.Format(VC2WinFmApp.cConnStr, dbFile); } var dac = new DataAccessImpl(connStr, VC2WinFmApp.ErrorLog); VC2WinFmApp.Cfg = dac.Config; VC2WinFmApp.MainFm = this; VC2WinFmApp.DataRule = new DataRuleImpl(dac); VC2WinFmApp.Engine = new EngineV2(VC2WinFmApp.DataRule); VC2WinFmApp.DataFacade = new DataFacadeImpl(VC2WinFmApp.DataRule); VC2WinFmApp.MessageSwitch = new MessageSwitch(); VC2WinFmApp.Engine.GroupChange += VC2WinFmApp.MessageSwitch.OnGroupChange; VC2WinFmApp.Engine.FailActChange += VC2WinFmApp.MessageSwitch.OnFailActChange; VC2WinFmApp.Engine.ModifiedChange += VC2WinFmApp.MessageSwitch.OnModifiedChange; VC2WinFmApp.Engine.ScheduleUpdate += VC2WinFmApp.MessageSwitch.OnScheduleUpdate; ConfigViewFm.LoadViewStyle(); this.Text = VC2WinFmApp.Name; AddExportMenu(); DataGrpBind = new GridViewBind <BaseEntity>(GroupGrid, columnMng: new GridBindColumnMngImpl_Appoint( new GridBindColumnAndPropertyMap("Name", new GridBindColumnAttribute { Title = "名称" }))); DataMbrBind = new GridViewBind <BaseEntity>(MemberGrid, columnMng: new GridBindColumnMngImpl_Appoint( new GridBindColumnAndPropertyMap("Name", new GridBindColumnAttribute { Title = "名称" }))); FailActBind = new GridViewBind <EnFailAct>(FailActGrid, columnMng: new GridBindColumnMngImpl_Appoint( new GridBindColumnAndPropertyMap("Name", new GridBindColumnAttribute { Title = "任务名称" }))); Application.DoEvents(); VC2WinFmApp.Engine.Init(); new FormMemoryImpl(this, VC2WinFmApp.Cfg, "FormRem"); try { if (!ExDbg.IsAttached) { Process.Start(VC2WinFmApp.ProductHomePage); } } catch { } }