Exemplo n.º 1
0
        /// <summary>
        ///  init data
        /// </summary>
        /// <param name="menuAgent"></param>
        public void Init(MenuAgent menuAgent)
        {
            _menuAgent = menuAgent;
            _manager   = GameObject.Find("MainBrain").GetComponent <BCManager>();

            _recordsTotal = _manager.daoManager.GetDaoService().GetListTotal();
        }
Exemplo n.º 2
0
        public void Init(DateTime start, DateTime end, int page, AlbumSetsAgent albumSetsAgent)
        {
            _manager = GameObject.Find("MainBrain").GetComponent <BCManager>();

            _page = page;

            _albumSetsAgent = albumSetsAgent;

            // 设置文字
        }
Exemplo n.º 3
0
        public void Init(MenuAgent menuAgent, DateTime dateTime)
        {
            _menuAgent      = menuAgent;
            _dateTime       = dateTime;
            _isCountDowning = false;

            _bcManager = GameObject.Find("MainBrain").GetComponent <BCManager>();

            Debug.Log("拍摄模块启动");
        }
Exemplo n.º 4
0
        public void Init(PageRecord pageRecord, bool isCover, bool isDefault)
        {
            _pageRecord = pageRecord;

            _manager = GameObject.Find("MainBrain").GetComponent <BCManager>();

            if (isDefault)
            {
                _defaultContainer.gameObject.SetActive(true);
                _normalContainer.gameObject.SetActive(false);
                _coverContainer.gameObject.SetActive(false);
            }
            else
            {
                _defaultContainer.gameObject.SetActive(false);

                if (isCover)
                {
                    _normalContainer.gameObject.SetActive(false);
                    _coverContainer.gameObject.SetActive(true);
                }
                else
                {
                    _coverContainer.gameObject.SetActive(false);

                    if (_bookPageType == BookPageType.Left)
                    {
                        // 设置签名图片
                        _signImage.sprite = _manager.daoManager.GetImageSprite(_pageRecord.SignAddress);

                        // 设置时间
                        _cdateText.text = _pageRecord.Cdate.ToString("yyyy.MM.dd");
                    }
                    else
                    {
                        _normalContainer.gameObject.SetActive(true);

                        Debug.Log(_pageRecord.PhotoAddress);

                        // 设置照片
                        if (_pageRecord.PhotoAddress == null)
                        {
                            _defaultContainer.gameObject.SetActive(true);
                            _normalContainer.gameObject.SetActive(false);
                        }
                        else
                        {
                            _photoImage.sprite = _manager.daoManager.GetImageSprite(_pageRecord.PhotoAddress);
                        }
                    }
                }
            }
        }
Exemplo n.º 5
0
        /// <summary>
        ///     初始化WebCam
        /// </summary>
        public void Init(Action <Texture2D> onPhoto, Action onCountDownFinished, Action onCountDownStart, Action onInitError)
        {
            Debug.Log("网络摄像头模块启动");

            _onPhoto             = onPhoto;
            _onCountDownFinished = onCountDownFinished;
            _onCountDownStart    = onCountDownStart;
            _onInitError         = onInitError;

            _bcManager = GameObject.Find("MainBrain").GetComponent <BCManager>();

            // 调用摄像头
            StartCoroutine(CallCamera());
            //CallCamera();
        }
Exemplo n.º 6
0
 public void Init()
 {
     _manager = GameObject.Find("MainBrain").GetComponent <BCManager>();
 }
Exemplo n.º 7
0
 void Start()
 {
     _dataSource = GameObject.Find("Dao").GetComponent <DaoDataSource>();
     _manager    = GameObject.Find("MainBrain").GetComponent <BCManager>();
 }
Exemplo n.º 8
0
        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);
        }
Exemplo n.º 9
0
 public void Init(MenuAgent menuAgent)
 {
     _menuAgent = menuAgent;
     _manager   = GameObject.Find("MainBrain").GetComponent <BCManager>();
 }
Exemplo n.º 10
0
 // Start is called before the first frame update
 void Start()
 {
     _bcManager = GameObject.Find("MainBrain").GetComponent <BCManager>();
 }