From b5f1a194d354ba9b2587c59ae17cf38d0f7f9bac Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期一, 13 十二月 2021 16:38:23 +0800
Subject: [PATCH] 二维码闪退问题
---
HDL-ON_iOS/Scan.cs | 5 +
HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs | 120 +++++++++++++++++++++-------------------
.vs/HDL_APP_Project/xs/UserPrefs.xml | 42 ++++---------
3 files changed, 82 insertions(+), 85 deletions(-)
diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml
index 605482c..b657bb2 100644
--- a/.vs/HDL_APP_Project/xs/UserPrefs.xml
+++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,44 +1,31 @@
-锘�<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default">
+锘�<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default">
<MonoDevelop.Ide.ItemProperties.SiriIntentUI>
<MonoDevelop.MacDev.AppleDevelopmentTeam />
</MonoDevelop.Ide.ItemProperties.SiriIntentUI>
- <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget" />
- <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs">
- <Files>
- <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs" Line="296" Column="63" />
- <File FileName="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs" />
- <File FileName="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs" />
- <File FileName="HDL_ON/Entity/Function/Function.cs" />
- <File FileName="HDL_ON/DAL/Server/HttpServerRequest.cs" />
- <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePage.cs" />
- <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs" />
- <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" />
- <File FileName="HDL_ON/Entity/FunctionList.cs" />
- <File FileName="HDL_ON/DAL/Mqtt/MqttClient.cs" />
- <File FileName="HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs" />
- <File FileName="HDL_ON/Common/FileUtlis.cs" />
- <File FileName="HDL_ON/Common/ApiUtlis.cs" />
- <File FileName="HDL_ON/UI/UI2/UserPage.cs" />
- <File FileName="HDL-ON_iOS/Info.plist" />
- </Files>
+ <MonoDevelop.Ide.Workbench>
<Pads>
<Pad Id="ProjectPad">
<State name="__root__">
<Node name="HDL_APP_Project" expanded="True">
<Node name="HDL_ON" expanded="True">
<Node name="UI" expanded="True">
+ <Node name="BindingResidence" expanded="True" />
<Node name="UI2" expanded="True">
<Node name="4-PersonalCenter" expanded="True">
- <Node name="PersonalCenterPage.cs" selected="True" />
+ <Node name="MemberManagement" expanded="True" />
</Node>
</Node>
</Node>
</Node>
- <Node name="HDL-ON_iOS" expanded="True" />
+ <Node name="HDL-ON_Android" expanded="True">
+ <Node name="Resources" expanded="True">
+ <Node name="layout" expanded="True" />
+ </Node>
+ <Node name="Scan.cs" selected="True" />
+ </Node>
<Node name="SiriIntents" expanded="True">
<Node name="Server" expanded="True" />
</Node>
- <Node name="SiriIntentsUI" expanded="True" />
</Node>
</State>
</Pad>
@@ -58,14 +45,13 @@
<String>HDLSiriIntentsUI/HDLSiriIntentsUI.csproj</String>
<String>HDLSiriKit/HDLSiriKit.csproj</String>
<String>SiriBinding/SiriBinding.csproj</String>
+ <String>HDL-ON_iOS/HDL-ON_iOS.csproj</String>
</DisabledProjects>
- <MonoDevelop.Ide.Workspace ActiveConfiguration="Release|iPhone" />
- <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" />
+ <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" />
+ <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.364c4b3158493098" />
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore>
- <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HdlSiriKit/SkipControl.cs" relfile="HdlSiriKit/SkipControl.cs" line="28" column="1" />
- <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HdlSiriKit/SkipControl.cs" relfile="HdlSiriKit/SkipControl.cs" line="14" column="1" />
- <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddOutputPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddOutputPage.cs" line="333" column="1" />
+ <Breakpoint file="/Users/nigemacpc/Desktop/On+/HDL-ON_iOS/ZXingOverlayView.cs" relfile="HDL-ON_iOS/ZXingOverlayView.cs" line="53" column="1" />
</BreakpointStore>
</MonoDevelop.Ide.DebuggingService.Breakpoints>
<MultiItemStartupConfigurations />
diff --git a/HDL-ON_iOS/Scan.cs b/HDL-ON_iOS/Scan.cs
index 1400fb2..9b810ee 100644
--- a/HDL-ON_iOS/Scan.cs
+++ b/HDL-ON_iOS/Scan.cs
@@ -49,9 +49,14 @@
var result = await scanner.Scan();
if (result != null)
+ {
action?.Invoke(result.Text);
+ }
else
+ {
action?.Invoke(null);
+ Console.WriteLine("浜岀淮鐮佽繑鍥炲�间负null");
+ }
}
public static byte[] BytesFromText(string text, int width = 300, int height = 300)
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs
index 1c7a8bd..e511612 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs
@@ -562,67 +562,73 @@
{
Scan.OpenScan((scanString) =>
{
- if (scanString.StartsWith("source://bind/"))
+ if (string.IsNullOrEmpty(scanString))
{
- var waitPage = new Loading();
- new System.Threading.Thread(() =>
- {
- try
- {
- Application.RunOnMainThread(() =>
- {
- waitPage.Start("Plaese wait...");
- });
- var sendString = scanString.Replace("source://bind/", "");
- MainPage.Log($"缁戝畾source灞�:{sendString}");
- //缁戝畾source灞�
- var pack = new HttpServerRequest().BindSourcePanel(sendString);
- Application.RunOnMainThread(() =>
- {
- var title = Language.StringByID(StringId.Tip);
- var msg = "";
- if(pack.Code == StateCode.SUCCESS)
- {
- if(Language.CurrentLanguage=="Chinese")
- {
- msg = "Source灞忕粦瀹氭垚鍔�.";
- }
- else
- {
- msg = "Source Hub binding succeeded";
- }
- new HDL_ON.UI.PublicAssmebly().TipMsg(title, msg);
- }
- else
- {
- if (Language.CurrentLanguage == "Chinese")
- {
- msg = $"Source灞忕粦瀹氬け璐�.({pack.Code})";
- }
- else
- {
- msg = "Source Hub binding failed";
- }
- new HDL_ON.UI.PublicAssmebly().TipMsg(title, msg);
- }
- });
- }
- catch(Exception ex)
- { }
- finally
- {
- Application.RunOnMainThread(() =>
- {
- waitPage.Hide();
- });
- }
- })
- { IsBackground = true }.Start();
}
else
{
- //鎵ц缁戝畾浣忓畢
- new BindingResidencePage().DoBindResidence(scanString);
+ if (scanString.StartsWith("source://bind/"))
+ {
+ var waitPage = new Loading();
+ new System.Threading.Thread(() =>
+ {
+ try
+ {
+ Application.RunOnMainThread(() =>
+ {
+ waitPage.Start("Plaese wait...");
+ });
+ var sendString = scanString.Replace("source://bind/", "");
+ MainPage.Log($"缁戝畾source灞�:{sendString}");
+ //缁戝畾source灞�
+ var pack = new HttpServerRequest().BindSourcePanel(sendString);
+ Application.RunOnMainThread(() =>
+ {
+ var title = Language.StringByID(StringId.Tip);
+ var msg = "";
+ if (pack.Code == StateCode.SUCCESS)
+ {
+ if (Language.CurrentLanguage == "Chinese")
+ {
+ msg = "Source灞忕粦瀹氭垚鍔�.";
+ }
+ else
+ {
+ msg = "Source Hub binding succeeded";
+ }
+ new HDL_ON.UI.PublicAssmebly().TipMsg(title, msg);
+ }
+ else
+ {
+ if (Language.CurrentLanguage == "Chinese")
+ {
+ msg = $"Source灞忕粦瀹氬け璐�.({pack.Code})";
+ }
+ else
+ {
+ msg = "Source Hub binding failed";
+ }
+ new HDL_ON.UI.PublicAssmebly().TipMsg(title, msg);
+ }
+ });
+ }
+ catch (Exception ex)
+ { }
+ finally
+ {
+ Application.RunOnMainThread(() =>
+ {
+ waitPage.Hide();
+ });
+ }
+ })
+ { IsBackground = true }.Start();
+ }
+ else
+ {
+ //鎵ц缁戝畾浣忓畢
+ new BindingResidencePage().DoBindResidence(scanString);
+ }
}
});
};
--
Gitblit v1.8.0