当前位置: 首页>>代码示例>>C#>>正文


C# Scanner.setInterfaceOrientation方法代码示例

本文整理汇总了C#中Scanner.setInterfaceOrientation方法的典型用法代码示例。如果您正苦于以下问题:C# Scanner.setInterfaceOrientation方法的具体用法?C# Scanner.setInterfaceOrientation怎么用?C# Scanner.setInterfaceOrientation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Scanner的用法示例。


在下文中一共展示了Scanner.setInterfaceOrientation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ViewDidLoad

		public override void ViewDidLoad ()
		{
			base.ViewDidLoad ();

			scanButton.TouchUpInside += (sender, e) => {

				//Make an instance of scanner
				scanner = new Scanner();

				/*
				 * Customize the scanner by using options below
				 */

				/* Select desired scanner interface orientation
				* Available options are: LandscapeLeft, LandscapeRight, Portrait; Default: LandscapeLeft
				*/
				//scanner.setInterfaceOrientation("LandscapeLeft");

				/* Toggle visibility of Flash button
				 * Available options are: true, false; Default: true
				 */
				//scanner.useFlash = true;

				/* Toggle high resolution scanning - 1280x720 vs normal resolution scaning - 640x480
				 * Available options are: true, false; Default: true
				 */
				//scanner.useHiRes = true;

				/* Choose between overlay types
				 * Available options are: OM_NONE, OM_MW (dynamic viewfinder), OM_IMAGE (static image overlay); Default: OM_MW
				 */
				//scanner.overlayMode = Scanner.OM_MW;

				/* Toggle visibility of Zoom button
				* Available options are: true, false; Default: true
				*/
				//scanner.useZoom = true;

				/* Choose desired zoom levels
				* zoomLevel1, zoomLevel2 - zoom level in % ; Default: 150,300
				* initialZoomLevel       - the initial zoom level index; Available options: 0 (no zoom), 1, 2; Default: 0
				*/
				//scanner.setZoomLevels(200, 400, 1);


				/* Set the number of CPU cores to be used
				 * Available options are: 1,2; Default 2
				 */
				//scanner.setMaxThreads(1);

				/* Close scanner after successful scan 
				 * Available options are: true, false (continuous scanning if set to false); Default: true; 
				 * if set to false:
				 * 		Use scanner.resumeScanning() - to resume after successful scan
				 * 		Use scanner.closeScanner()   - to close the scanner
				 */
				 scanner.closeScannerOnDecode = false;


				//Perform decoder initialization
				customDecoderInit();

				//Call the scaner and wait for result

				scanner.setInterfaceOrientation("Portrait");

				scanner.Scan(this);

			};

			// Perform any additional setup after loading the view, typically from a nib.
		}
开发者ID:drewdz,项目名称:BarcodeScanner,代码行数:72,代码来源:MWBCameraDemoViewController.cs


注:本文中的Scanner.setInterfaceOrientation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。