Esempio n. 1
0
 public virtual void ReqMode(ShutterMode iMode, Action callback)
 {
     if (iMode == ShutterMode.None || _iShutterMode == iMode)
     {
         return;
     }
     _actCallback = callback;
     if (!_isTween)
     {
         if (iMode == ShutterMode.Close)
         {
             SoundUtils.PlaySE(SEFIleInfos.SE_921);
         }
         Hashtable hashtable = new Hashtable();
         hashtable.Add("time", 0.25f);
         hashtable.Add("isLocal", true);
         hashtable.Add("easetype", iTween.EaseType.easeOutBounce);
         hashtable.Add("oncompletetarget", base.gameObject);
         hashtable.Add("oncomplete", "OnShutterActionComplate");
         hashtable.Add("position", _vTopPos[(int)iMode]);
         iTween.MoveTo(_uiTop.gameObject, hashtable);
         hashtable.Remove("position");
         hashtable.Remove("oncompletetarget");
         hashtable.Remove("oncomplete");
         hashtable.Add("position", _vBtnPos[(int)iMode]);
         iTween.MoveTo(_uiBtm.gameObject, hashtable);
     }
     _iShutterMode = iMode;
 }
Esempio n. 2
0
 public virtual bool Init(ShutterMode iMode)
 {
     _uiTop.transform.localPosition = _vTopPos[(int)iMode];
     _uiBtm.transform.localPosition = _vBtnPos[(int)iMode];
     _iShutterMode = iMode;
     return(true);
 }
Esempio n. 3
0
 protected virtual void Awake()
 {
     if (_uiPanel == null)
     {
         _uiPanel = GetComponent <UIPanel>();
     }
     if (_traShutter == null)
     {
         Util.FindParentToChild(ref _traShutter, _uiPanel.transform, "Shutter");
     }
     if (_uiBtm == null)
     {
         Util.FindParentToChild(ref _uiBtm, _traShutter, "Btm");
     }
     if (_uiTop == null)
     {
         Util.FindParentToChild(ref _uiTop, _traShutter, "Top");
     }
     _actCallback  = null;
     _iShutterMode = ShutterMode.Open;
     _uiTop.transform.localPosition = _vTopPos[1];
     _uiBtm.transform.localPosition = _vBtnPos[1];
 }
Esempio n. 4
0
 public override void ReqMode(ShutterMode iMode, Action callback)
 {
     if (iMode == ShutterMode.None || _iShutterMode == iMode)
     {
         return;
     }
     _actCallback = callback;
     if (!_isTween)
     {
         if (iMode == ShutterMode.Close)
         {
             SoundUtils.PlaySE(SEFIleInfos.SE_034);
         }
         _uiTop.transform.LTMoveLocal(_vTopPos[(int)iMode], 0.25f).setEase(LeanTweenType.easeInQuad).setOnComplete((Action) delegate
         {
             OnShutterActionComplate();
         });
         _uiBtm.transform.LTMoveLocal(_vBtnPos[(int)iMode], 0.25f).setEase(LeanTweenType.easeInQuad).setOnComplete((Action) delegate
         {
         });
     }
     _iShutterMode = iMode;
 }
        public void SetShutter(ShutterMode mode, int speedLevel)
        {
            int    modeValue         = 0;
            string speedPropertyName = null;

            switch (mode)
            {
            case ShutterMode.Off:
                modeValue         = 0;
                speedPropertyName = "dummy";
                break;

            case ShutterMode.Short:
                modeValue         = 1;
                speedPropertyName = _ShutterShortSpeedLevel;
                break;

            case ShutterMode.Long:
                modeValue         = 2;
                speedPropertyName = _ShutterLongSpeedLevel;
                break;

            default:
                throw new InvalidEnumArgumentException("mode");
                break;
            }

            var nameValues = new NameObjectCollection();

            nameValues.Add(_ShutterMode, modeValue);
            nameValues.Add(speedPropertyName, speedLevel);

            string uri = BuildUri(nameValues);

            SetCameraProperty(uri);
        }
Esempio n. 6
0
        public void ShutterSpeedPropertyTest(int speed)
        {
            ShutterMode shutterMode  = ShutterMode.Short;
            int         shutterSpeed = 0;

            this.camera.SetShutter(shutterMode, shutterSpeed);
            this.camera.UpdateProperty();
            Assert.IsTrue(shutterMode == this.camera.ShutterMode && shutterSpeed == this.camera.ShortShutterLevel);

            IrisMode irisMode  = IrisMode.Manual;
            int      irisLevel = 0;

            this.camera.SetIris(irisMode, irisLevel);
            this.camera.UpdateProperty();
            Assert.IsTrue(irisMode == this.camera.IrisMode && irisLevel == this.camera.ManualIrisLevel);

            bool enableAgc         = true;
            bool enableDigitalGain = true;

            this.camera.SetAGCMode(enableAgc, enableDigitalGain);
            this.camera.UpdateProperty();

            Assert.IsTrue(enableAgc == this.camera.AgcEnabled && enableDigitalGain == this.camera.DigitalGainEnabled);
        }
Esempio n. 7
0
 public void SetShutter(ShutterMode mode, int level)
 {
 }
Esempio n. 8
0
        public void SetShutter(ShutterMode mode, int speedLevel)
        {
            int modeValue = 0;
            string speedPropertyName = null;
            switch (mode)
            {
                case ShutterMode.Off:
                    modeValue = 0;
                    speedPropertyName = "dummy";
                    break;
                case ShutterMode.Short:
                    modeValue = 1;
                    speedPropertyName = _ShutterShortSpeedLevel;
                    break;
                case ShutterMode.Long:
                    modeValue = 2;
                    speedPropertyName = _ShutterLongSpeedLevel;
                    break;
                default:
                    throw new InvalidEnumArgumentException("mode");
                    break;
            }

            var nameValues = new NameObjectCollection();
            nameValues.Add(_ShutterMode, modeValue);
            nameValues.Add(speedPropertyName, speedLevel);

            string uri = BuildUri(nameValues);

            SetCameraProperty(uri);
        }
Esempio n. 9
0
 public void SetShutter(ShutterMode mode, int level)
 {
 }
 public void SetShutter(int cameraId, ShutterMode mode, int level)
 {
     this.camera.SetShutter(mode, level);
 }
Esempio n. 11
0
 public static extern ReturnCode ATSpectrographGetShutter(
     int device,
     [MarshalAs(UnmanagedType.I4)] out ShutterMode mode);
Esempio n. 12
0
 public static extern ReturnCode ATSpectrographIsShutterModePossible(
     int device,
     [MarshalAs(UnmanagedType.I4)] ShutterMode mode,
     [MarshalAs(UnmanagedType.I1)] out bool possible);
 public void SetShutter(int cameraId, ShutterMode mode, int level)
 {
     this.camera.SetShutter(mode, level);
 }