/// <summary> /// 初始化服务 /// </summary> /// <param name="yct"></param> public void InitService(YCT.YCTSetting yct) { if (!_Services.ContainsKey(yct.GetType())) { IOpenCardService s = new YCT.YCTService(yct); s.OnReadCard += new EventHandler <OpenCardEventArgs>(s_OnReadCard); s.OnPaying += new EventHandler <OpenCardEventArgs>(s_OnPaying); s.OnPaidOk += new EventHandler <OpenCardEventArgs>(s_OnPaidOk); s.OnPaidFail += new EventHandler <OpenCardEventArgs>(s_OnPaidFail); s.OnError += new EventHandler <OpenCardEventArgs>(s_OnError); _Services[yct.GetType()] = s; } (_Services[yct.GetType()] as YCT.YCTService).Setting = yct; _Services[yct.GetType()].Init(); }
public YCTService(YCTSetting setting) { Setting = setting; }