コード例 #1
0
        private void TestDirect()
        {
            Camera camera = new EvCamera();
            ITake  lens   = new HoLens();

            TestCase(camera, lens);
        }
コード例 #2
0
ファイル: HoCamera.cs プロジェクト: cbjmars/Study
        public override bool PutInlens(ITake itake)
        {
            //as 연산자가 itake의 타입이 HoLens 인지 확인 후 다를경우 null 리턴
            HoLens hoLens = itake as HoLens;

            if (hoLens == null)
            {
                return(false);
            }
            Lens = hoLens;
            return(true);
        }
コード例 #3
0
ファイル: HoCamera.cs プロジェクト: cbjmars/Study
        public override bool TakeAPicture()
        {
            HoLens hoLens = Lens as HoLens;

            if (hoLens == null)
            {
                return(false);
            }
            hoLens.ManualFocus();

            /*
             * if (Lens == null) return false;
             * Lens.Take();
             * return true
             */
            return(base.TakeAPicture());
        }