//我要获取所有的车辆信息 private void FormMain_Load(object sender, EventArgs e) { this.MaximizeBox = false; Messenger = ServiceLocator.Current.GetInstance <IMessenger>(); examCarReposiatory = ServiceLocator.Current.GetInstance <IEFRepository <ExamCar> >(); examService = ServiceLocator.Current.GetInstance <IExamService>(); udpServer = new UdpServer(); udpServer.StartReceiveMsg(); RegisterMessage(Messenger); InitCarControl(); //初始化根据数据库的结果绑定考生 InitCarExamStudent(); // this.carExamControl1.Position = 1; }
public void InitInstance(IMessenger messager, UdpServer server, IExamService examService) { this.Messenger = messager; this.udpServer = server; this.examService = examService; }