// // Init // public void Init(MagicWallManager manager, SceneConfig sceneConfig, Action <DisplayBehaviorConfig> OnCreateAgentCompleted, Action OnEffectCompleted, Action OnDisplayStart ) { // 初始化 manager _manager = manager; _sceneConfig = sceneConfig; _dataTypeEnum = sceneConfig.dataType; _daoService = _manager.daoServiceFactory.GetDaoService(sceneConfig.daoTypeEnum); if (sceneConfig.isKinect == 0) { row_set = _manager.managerConfig.Row; } else { row_set = _manager.managerConfig.KinectRow; } _onCreateAgentCompleted = OnCreateAgentCompleted; _onEffectCompleted = OnEffectCompleted; _onDisplayStart = OnDisplayStart; }
public IActionResult Visualizar([FromServices] IDaoService DAO) { DataSet data = new DataSet(); try { data = DAO.ejecutarProcedimiento("sp_consultar_usuarios", null); List <Usuario> datos = new List <Usuario>(); foreach (DataRow item in data.Tables[0].Rows) { Usuario usuario = new Usuario(); usuario.nombre = item["nombre"].ToString(); usuario.apellido = item["apellido"].ToString(); usuario.correo = item["correo"].ToString(); usuario.contraseña = item["contraseña"].ToString(); datos.Add(usuario); } return(View(datos)); } catch (Exception) { throw; } }
// // 初始化 (参数:内容类型,row) // public void Init(DisplayBehaviorConfig displayBehaviorConfig) { _displayBehaviorConfig = displayBehaviorConfig; _manager = _displayBehaviorConfig.Manager; _daoService = _manager.daoServiceFactory.GetDaoService(displayBehaviorConfig.sceneConfig.daoTypeEnum); flag = false; }
public EventsControllerV1( IDaoService <Event, EventRequestFilter> service, ILoggerFactory logger ) { _logger = logger.CreateLogger("EventWebApp.Controllers.EventsController"); _service = service; }
// Start is called before the first frame update void Start() { TurnOnWaterWallScene(); _waterWallManager.Init(this); _daoService = shicunDaoService; daoService.prepareData(); _musicManager.Play(); }
public void Init(SceneConfig sceneConfig, MagicWallManager manager, Action onSceneCompleted) { _manager = manager; //_daoService = manager.daoService; _durtime = sceneConfig.durtime; _dataType = sceneConfig.dataType; _daoService = _manager.daoServiceFactory.GetDaoService(sceneConfig.daoTypeEnum); //_itemFactory = manager.itemsFactoryAgent.GetItemsFactoryByContentType(_dataType); _sceneUtil = new SceneUtils(_manager, sceneConfig.isKinect); _onSceneCompleted = onSceneCompleted; _sceneConfig = sceneConfig; }
public IActionResult Delete(string id, [FromServices] IDaoService DAO) { DataSet data = new DataSet(); if (id == null) { //return RedirectToAction("guardar", model); } else { SqlParameter[] parametros = { new SqlParameter("@id", id) }; data = DAO.ejecutarProcedimiento("sp_eliminar_usuario", parametros); } return(RedirectToAction("Visualizar", "Home")); }
public IActionResult guardarUsuario(Usuario model, [FromServices] IDaoService DAO) { DataSet data = new DataSet(); if (!ModelState.IsValid) { return(RedirectToAction("guardar", model)); } else { SqlParameter[] parametros = { new SqlParameter("@nombre", model.nombre), new SqlParameter("@apellido", model.apellido), new SqlParameter("@correo", model.correo), new SqlParameter("@contrasena", model.contraseña) }; data = DAO.ejecutarProcedimiento("sp_crear_usuario", parametros); } return(RedirectToAction("Visualizar", "Home")); }
public void Init(MagicWallManager manager, SceneConfig sceneConfig, Action <DisplayBehaviorConfig> OnCreateAgentCompleted, Action OnEffectCompleted, Action OnDisplayStart ) { System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch(); sw.Start(); // 初始化 manager _manager = manager; _sceneConfig = sceneConfig; _dataTypeEnum = sceneConfig.dataType; _daoService = _manager.daoServiceFactory.GetDaoService(sceneConfig.daoTypeEnum); _onCreateAgentCompleted = OnCreateAgentCompleted; _onEffectCompleted = OnEffectCompleted; _onDisplayStart = OnDisplayStart; sw.Stop(); }
public void Init(MagicWallManager manager) { _magicWallManager = manager; _dataService = _magicWallManager.daoServiceFactory.GetDaoService(DaoTypeEnum.CBHAiqigu); images = new List <RawImage>(); // 初始化最左侧图片 _leftImages = _dataService.GetCustomImage(CustomImageType.LEFT1); SetLeftImages(); // 初始化中间图片 _middleImages = _dataService.GetCustomImage(CustomImageType.LEFT2); SetMiddleImages(); // 初始化右侧图片 _rightImages = _dataService.GetCustomImage(CustomImageType.RIGHT); if (_rightImages.Count > 0) { SetRightImages(); } if (_leftImages.Count > 1) { InvokeRepeating("ChangeLeftImage", _leftChangeTime, _leftChangeTime + _fadeoutDuration); } if (_middleImages.Count > 1) { InvokeRepeating("ChangeMiddleImage", _middleChangeTime, _middleChangeTime + _fadeoutDuration); } if (_rightImages.Count > 1) { InvokeRepeating("ChangeRightImage", _rightChangeTime, _rightChangeTime + _fadeoutDuration); } }
public void Init(FromSceneEnum fromSceneEnum, int page, bool toLast) { Debug.Log("初始化bookagent : " + fromSceneEnum); _manager = GameObject.Find("MainBrain").GetComponent <BCManager>(); // 获取数据 IDaoService _daoManagerServ = GameObject.Find("Dao").GetComponent <DaoManager>().GetDaoService(); List <PageRecord> list; if (!toLast) { int size = _manager.albumSize; int start = (page - 1) * size; int total = (int)_daoManagerServ.GetListTotal(); list = _daoManagerServ.GetList(start, size); } else { // 获取最后一个 var _recordsTotal = _daoManagerServ.GetListTotal(); int number = (int)_recordsTotal / _manager.albumSize; if (_recordsTotal % _manager.albumSize > 0) { number++; } int size = _manager.albumSize; int start = (number - 1) * size; int total = (int)_daoManagerServ.GetListTotal(); list = _daoManagerServ.GetList(start, size); } //PageRecord record = list[0]; //Debug.Log("record GetListTotal " + (int)_daoManagerServ.GetListTotal()); //Debug.Log("record PhotoAddress " + record.PhotoAddress); //Debug.Log("record SignAddress " + record.SignAddress); // 初始化book组件 if (fromSceneEnum == FromSceneEnum.Menu) { _bookPro.Init(list, 0); } else if (fromSceneEnum == FromSceneEnum.Photo) { _bookPro.Init(list, list.Count); } else if (fromSceneEnum == FromSceneEnum.Sign) { Debug.Log("从签名页面打开! -> " + list.Count); _bookPro.Init(list, list.Count); } else if (fromSceneEnum == FromSceneEnum.AlbumSets) { _bookPro.Init(list, 0); } // 初始化滚动组件 _scrollAreaAgent.Init(OnRecognizeDirection); }
public IDaoService GetDaoService(DaoTypeEnum type) { IDaoService _daoService = null; if (type == DaoTypeEnum.CBHAiqigu) { _daoService = _mockZBHAiqiguDaoService; // 暂缺 } else if (type == DaoTypeEnum.CBHFeiyue) { _daoService = _mockZBHFeiyueDaoService; } else if (type == DaoTypeEnum.CBHTubu) { _daoService = _mockZBHTubuDaoService; } else if (type == DaoTypeEnum.CBHFengxian) { _daoService = _mockZBHFengxianDaoService; } else if (type == DaoTypeEnum.ShiCunFeiyue) { _daoService = _mockFeiyueDaoService; } else if (type == DaoTypeEnum.ShiCunZhicheng) { _daoService = _mockShiCunZhichengDaoService; } else if (type == DaoTypeEnum.ShiCunShiCun) { _daoService = _mockShicunDaoService; } else if (type == DaoTypeEnum.Test) { _daoService = _mockTestDaoService; } else if (type == DaoTypeEnum.HongKouFeiyue) { _daoService = _mockHKFeiyueDaoService; } else if (type == DaoTypeEnum.HongKouLogo) { _daoService = _mockHKLogoDaoService; } else if (type == DaoTypeEnum.HongKouPicture) { _daoService = _mockHKPictureDaoService; } else if (type == DaoTypeEnum.HongKouAiqigu) { _daoService = _mockHKAiqiguDaoService; } else if (type == DaoTypeEnum.AQGAiqigu) { _daoService = _mockAQGAiqiguDaoService; } else if (type == DaoTypeEnum.AQGBlack) { _daoService = _mockAQGBlackDaoService; } return(_daoService); }
public static CardAgent Generate(MagicWallManager magicWallManager, Vector3 position , Transform parent, int dataId, DataTypeEnum dataType, FlockAgent refFlockAgent) { IDaoService daoService = magicWallManager.daoServiceFactory.GetDaoService(refFlockAgent.daoTypeEnum); OperateCardData cardData = null; CardAgent cardPrefab = null; //magicWallManager.daoService.getac if (dataType == DataTypeEnum.Enterprise) { Enterprise enterprise = daoService.GetEnterpriseById(dataId); Debug.Log("enterprise : " + (enterprise == null)); var activities = daoService.GetActivitiesByEnvId(enterprise.Ent_id); var products = daoService.GetProductsByEnvId(enterprise.Ent_id); var videos = daoService.GetVideosByEnvId(enterprise.Ent_id); var catalogs = daoService.GetCatalogs(enterprise.Ent_id); OperateCardDataCross operateCardDataCross = EnterpriseAdapter .Transfer(enterprise, activities, products, videos, catalogs); //Debug.Log(operateCardDataCross.ToString()); //if (CheckIsSimple(operateCardDataCross)) //{ // cardPrefab = magicWallManager.operateCardManager.singleCardPrefab; // cardData = operateCardDataCross; // Debug.Log("Generate 单个企业卡片"); //} //else //{ cardPrefab = magicWallManager.operateCardManager.crossCardPrefab; // 单个卡片的逻辑 //OperateCardDataSingle operateCardDataSingle = new OperateCardDataSingle(); // Debug.Log("Generate 正常企业卡片"); cardData = operateCardDataCross; //cardData = (OperateCardDataSingle)operateCardDataCross; //} } else if (dataType == DataTypeEnum.Product || dataType == DataTypeEnum.Wine) { Product product = daoService.GetProductDetail(dataId); Enterprise enterprise = daoService.GetEnterpriseById(product.Ent_id); Debug.Log("enterprise : " + enterprise); //Debug.Log("enterprise to null : " + (enterprise == null)); OperateCardDataSlide operateCardDataSlide = ProductAdapter.Transfer(product, enterprise); cardPrefab = magicWallManager.operateCardManager.sliceCardPrefab; cardData = operateCardDataSlide; } else { Activity activity = daoService.GetActivityDetail(dataId); Enterprise enterprise = daoService.GetEnterpriseById(activity.Ent_id); OperateCardDataSlide operateCardDataSlide = ActivityAdapter.Transfer(activity, enterprise); cardPrefab = magicWallManager.operateCardManager.sliceCardPrefab; cardData = operateCardDataSlide; } // 创建card CardAgent cardAgent = Instantiate(cardPrefab, parent); cardAgent.GetComponent <Transform>().position = position; //cardAgent.DataId = dataId; cardAgent.InitComponent(magicWallManager, dataId, dataType, position, refFlockAgent); cardAgent.InitData(cardData); return(cardAgent); }