public bool SwitchPreviewResolution(int resolutionSel) { try { XCamera cam = XCamera.GetInstance(); cam.SetPreviewSizeSel(resolutionSel); //cam.Play(); //this.RealSize(); this.FitScreen(); return(true); } catch (System.Exception ex) { _logger.Error(ex.Message); return(false); } }