Beispiel #1
0
 private void StartQRReader()
 {
     //create qrreader
     if (!activeElements.Contains(qrReader))
     {
         QRReader reader = Instantiate(qrReader, gameObject.transform, false);
         activeElements.Add(qrReader);
         reader.Setup();
     }
 }
Beispiel #2
0
    private void Start()
    {
        // 縦画面にする
        Screen.orientation = ScreenOrientation.Portrait;

        _QR = QR.GetComponent <QRReader>();
        ws  = GameObject.Find("WSClient").GetComponent <WSClient>();

        // バージョン情報の表示
        LabelVersion.text = "Ver. " + Application.version;

        // UIパーツの取得
        _LabelIPMode = IPModeView.transform.Find("Text").GetComponent <Text>();
        _LabelPin    = PinView.transform.Find("Text").GetComponent <Text>();
        _LabelQR     = QRView.transform.Find("Text").GetComponent <Text>();
        _InputIP     = IPModeView.transform.Find("InputField").GetComponent <InputField>();
        _InputPin    = PinView.transform.Find("InputField").GetComponent <InputField>();
    }
Beispiel #3
0
        public ScanPage()
        {
            InitializeComponent();

            // remove red line
            var redLine = overlay.Children.FirstOrDefault(x => x.BackgroundColor == Color.Red);

            if (redLine != null)
            {
                overlay.Children.Remove(redLine);
            }

            scanView.Options.CameraResolutionSelector = SelectLowestResolutionMatchingDisplayAspectRatio;
            scanView.Options.PossibleFormats          = new List <BarcodeFormat>
            {
                BarcodeFormat.QR_CODE
            };

            Reader = new QRReader();
        }
Beispiel #4
0
        public ActionResult Test(string inputString)
        {
            HttpPostedFileBase file = Request.Files["inputFile"];
            string             str, streamString, output;

            if (file.ContentLength > 0)
            {
                str = file.ToString();
                System.IO.StreamReader reader = new System.IO.StreamReader(file.InputStream);
                streamString = reader.ReadToEnd();
                output       = QRReader.getQRCode(file.InputStream);
            }
            else if (inputString.Length > 0)
            {
                System.Drawing.Bitmap image = QRGenerator.generateQRCode(inputString);
                string outputPath           = Server.MapPath("~/") + "output.png";
                image.Save(outputPath, System.Drawing.Imaging.ImageFormat.Png);
            }

            return(RedirectToAction("TestPage"));
        }