本文整理汇总了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.
}