示例#1
0
        public static void Scan(CameraScanLayer scanLayer)
        {
            var callback = scanLayer.Callback;
            var ctrl     = new CameraScanController(scanLayer, callback, ScanLayer.BarcodeKey)
            {
                ModalTransitionStyle = UIModalTransitionStyle.FlipHorizontal
            };
            var navCtrl = new PopoverNavigationController(ctrl);

            navCtrl.SetCloseButton(ctrl);

            if (UIDevice.CurrentDevice.CheckSystemVersion(7, 0))
            {
                if (!TouchFactory.TheApp.Style.HeaderColor.IsDefaultColor)
                {
                    navCtrl.NavigationBar.BarTintColor = scanLayer.LayerStyle.HeaderColor.ToUIColor();
                }

                if (!TouchFactory.TheApp.Style.HeaderTextColor.IsDefaultColor)
                {
                    navCtrl.NavigationBar.TintColor           = scanLayer.LayerStyle.HeaderTextColor.ToUIColor();
                    navCtrl.NavigationBar.TitleTextAttributes = new UIStringAttributes()
                    {
                        ForegroundColor = scanLayer.LayerStyle.HeaderTextColor.ToUIColor()
                    };
                }
            }
            else
            {
                navCtrl.NavigationBar.TintColor = scanLayer.LayerStyle.HeaderColor.ToUIColor();
            }

            ModalManager.EnqueueModalTransition(TouchFactory.Instance.TopViewController, navCtrl, true);
        }
示例#2
0
 public CameraMetaDataDelegate(CameraScanController view, CameraScanLayer layer)
 {
     _view  = view;
     _layer = layer;
     Buffer = new ScanBuffer(view.DuplicateWait);
 }