From d6fb0646531172f23648441c224cdcccd721b894 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期一, 14 十二月 2020 09:59:01 +0800
Subject: [PATCH] 请合并代码,完成晾衣架最终功能。

---
 ZigbeeApp/GateWay.Droid/ZXing/ZXingCustomScanView.cs |   71 +++++++++++++++++++++++++++++++++++
 1 files changed, 71 insertions(+), 0 deletions(-)

diff --git a/ZigbeeApp/GateWay.Droid/ZXing/ZXingCustomScanView.cs b/ZigbeeApp/GateWay.Droid/ZXing/ZXingCustomScanView.cs
new file mode 100755
index 0000000..d730b86
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/ZXing/ZXingCustomScanView.cs
@@ -0,0 +1,71 @@
+锘縰sing System;
+using Android.Content;
+using Android.Views;
+using Android.Widget;
+
+namespace GateWay.Droid
+{
+ 
+    public class ZXingCustomScanView : RelativeLayout
+    {
+        public Action OnCancel;
+        public Action OnTorch;
+        public TextView cancelTextView, flashTextView, titleTextView;
+        public ZXingCustomScanView(Context context) : base(context)
+        {
+            View.Inflate(context, Resource.Layout.zxing_layout, this);
+
+            titleTextView = FindViewById<TextView>(Resource.Id.tv_zxing_scan);
+
+            cancelTextView = FindViewById<TextView>(Resource.Id.tv_zxing_back);
+            cancelTextView.Text = cancelText;
+            flashTextView = FindViewById<TextView>(Resource.Id.tv_zxing_flash);
+            flashTextView.Text = flashText;
+
+            cancelTextView.Click += Cancel_Click;
+            flashTextView.Click += Flash_Click;
+        }
+        
+        String cancelText = "Cancel";
+        public String CancelText
+        {
+            get
+            {
+                return cancelText;
+            }
+            set {
+                cancelText = value;
+                cancelTextView.Text = cancelText;
+            }
+        }
+
+        String flashText = "Flash";
+        public String FlashText
+        {
+            get
+            {
+                return flashText;
+            }
+            set
+            {
+                flashText = value;
+                flashTextView.Text = flashText;
+            }
+        }
+
+
+
+
+
+        private void Flash_Click(object sender, EventArgs e)
+        {
+            OnTorch?.Invoke();
+        }
+
+        private void Cancel_Click(object sender, System.EventArgs e)
+        {
+            OnCancel?.Invoke();
+        }
+
+    }
+}

--
Gitblit v1.8.0