ApexLumia.Camera.takePhoto C# (CSharp) Метод

takePhoto() публичный Метод

public takePhoto ( ) : bool
Результат bool
        public bool takePhoto()
        {
            System.Diagnostics.Debug.WriteLine("takePhoto");
            if (cam == null) { return false; }
            try
            {
                cam.FocusAtPoint(0.5,0.5);
            }
            catch
            {
                // Probably still taking a previous photo.
                System.Diagnostics.Debug.WriteLine("fail");
                return false;
            }

            return true;
        }

Usage Example

Пример #1
0
 void cameraTimer_Tick(object sender, EventArgs e)
 {
     if (camera.isRunning)
     {
         camera.takePhoto(); statusCamera = "True"; OnPropertyChanged("statusCamera");
     }
     else
     {
         statusCamera = "False"; OnPropertyChanged("statusCamera");
     }
 }