From 0b3b44ed26ce26ac5852374f7c7e459e7dbdf1c3 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期四, 04 十一月 2021 14:45:58 +0800
Subject: [PATCH] 编辑场景成功之后,取消之前的执行动作

---
 HDL_ON/Entity/Function/Scene.cs                      |   32 +++++++---
 HDL-ON_Android/Properties/AndroidManifest.xml        |    2 
 HDL_ON/DAL/Server/HttpUtil.cs                        |    4 
 HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs |   88 ++++++++++++++--------------
 .vs/HDL_APP_Project/xs/UserPrefs.xml                 |   34 ++---------
 HDL_ON/UI/MainPage.cs                                |    2 
 6 files changed, 77 insertions(+), 85 deletions(-)

diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml
index 725fb6e..2ac4a02 100644
--- a/.vs/HDL_APP_Project/xs/UserPrefs.xml
+++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,16 +1,8 @@
-锘�<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default">
+锘�<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default">
   <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget" />
-  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/MainPage.cs">
+  <MonoDevelop.Ide.Workbench>
     <Files>
-      <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" Line="21" Column="87" />
-      <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" Line="1142" Column="38" />
-      <File FileName="HDL_ON/UI/UI2/UserPage.cs" Line="1" Column="1" />
-      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs" Line="880" Column="6" />
-      <File FileName="HDL_ON/Entity/Function/Function.cs" Line="1575" Column="25" />
-      <File FileName="HDL_ON/DAL/DriverLayer/Control_Udp.cs" Line="832" Column="30" />
-      <File FileName="HDL_ON/DAL/DriverLayer/Packet.cs" Line="224" Column="50" />
-      <File FileName="HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs" Line="79" Column="30" />
-      <File FileName="HDL_ON/UI/MainPage.cs" Line="111" Column="27" />
+      <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" Line="21" Column="85" />
     </Files>
     <Pads>
       <Pad Id="ProjectPad">
@@ -18,26 +10,11 @@
           <Node name="HDL_APP_Project" expanded="True">
             <Node name="HDL_ON" expanded="True">
               <Node name="DAL" expanded="True">
-                <Node name="DriverLayer" expanded="True" />
-              </Node>
-              <Node name="Entity" expanded="True">
-                <Node name="Function" expanded="True" />
-              </Node>
-              <Node name="UI" expanded="True">
-                <Node name="UI0-Public" expanded="True" />
-                <Node name="UI2" expanded="True">
-                  <Node name="4-PersonalCenter" expanded="True" />
-                </Node>
-                <Node name="MainPage.cs" selected="True" />
+                <Node name="Server" expanded="True" />
               </Node>
             </Node>
-            <Node name="HDL-ON_iOS" expanded="True" />
+            <Node name="HDL-ON_iOS" expanded="True" selected="True" />
           </Node>
-        </State>
-      </Pad>
-      <Pad Id="MonoDevelop.Debugger.WatchPad">
-        <State>
-          <Value>this.Height</Value>
         </State>
       </Pad>
     </Pads>
@@ -53,6 +30,7 @@
   <MonoDevelop.Ide.DebuggingService.Breakpoints>
     <BreakpointStore>
       <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/DAL/Server/HttpServerRequest.cs" relfile="HDL_ON/DAL/Server/HttpServerRequest.cs" line="1415" column="1" />
+      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/Entity/Function/Scene.cs" relfile="HDL_ON/Entity/Function/Scene.cs" line="333" column="1" />
     </BreakpointStore>
   </MonoDevelop.Ide.DebuggingService.Breakpoints>
   <MultiItemStartupConfigurations />
diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml
index a12415b..9246634 100644
--- a/HDL-ON_Android/Properties/AndroidManifest.xml
+++ b/HDL-ON_Android/Properties/AndroidManifest.xml
@@ -1,5 +1,5 @@
 锘�<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202111031" android:versionName="1.3.202111031" package="com.hdl.onpro">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202111041" android:versionName="1.3.202111041" package="com.hdl.onpro">
 	<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="28" />
 	<!-- 涔愭鍙瀵硅闇�瑕佺殑鏉冮檺 -->
 	<!--<uses-permission android:name="android.permission.INTERNET" />-->
diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs
index cf4a06a..d2292ee 100644
--- a/HDL_ON/DAL/Server/HttpUtil.cs
+++ b/HDL_ON/DAL/Server/HttpUtil.cs
@@ -17,8 +17,8 @@
         /// 鍥哄畾鍩熷悕,姝e紡鐜
         /// 鍏叡鍩熷悕灏辫繎瑙f瀽
         /// </summary>
-        //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
-        public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
+        public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
+        //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
         /// <summary>
         /// RegionMark
         /// </summary>
diff --git a/HDL_ON/Entity/Function/Scene.cs b/HDL_ON/Entity/Function/Scene.cs
index 693db8d..684aad0 100644
--- a/HDL_ON/Entity/Function/Scene.cs
+++ b/HDL_ON/Entity/Function/Scene.cs
@@ -223,6 +223,18 @@
                 return "SceneData_" + sid;
             }
         }
+
+        /// <summary>
+        /// 鎵ц鍊掕鏃�
+        /// </summary>
+        int countdownTime = 0;
+        /// <summary>
+        /// 閲嶇疆鎵ц鍊掕鏃�
+        /// </summary>
+        public void ResetCountdownTime()
+        {
+            countdownTime = 0;
+        }
         /// <summary>
         /// 鍦烘櫙鎵ц\鍊掕鏃�
         /// </summary>
@@ -232,31 +244,30 @@
             //鍦烘櫙姝e湪鍊掕鏃舵墽琛屼腑
             if (LastExecutionTime != "" && Convert.ToDouble(LastExecutionTime) + Convert.ToDouble(delay) > Convert.ToDouble(Utlis.GetTimestamp(false)))
             {
-                int time = 0;
                 int.TryParse(Convert.ToInt32(
                     Convert.ToDouble(LastExecutionTime) + Convert.ToDouble(delay) - Convert.ToDouble(Utlis.GetTimestamp(false))
-                    ).ToString(), out time);
-                if (time > 0)
+                    ).ToString(), out countdownTime);
+                if (countdownTime > 0)
                 {
                     new System.Threading.Thread(() =>
                     {
-                        if (time > 0)
+                        if (countdownTime > 0)
                         {
-                            while (time > 0)
+                            while (countdownTime > 0)
                             {
                                 Application.RunOnMainThread(() =>
                                 {
-                                    if (time > 60)
+                                    if (countdownTime > 60)
                                     {
-                                        btnShowDelay.Text = (time / 60).ToString() + "min" + time % 60 + "s";
+                                        btnShowDelay.Text = (countdownTime / 60).ToString() + "min" + countdownTime % 60 + "s";
                                     }
                                     else
                                     {
-                                        btnShowDelay.Text = time.ToString() + "s";
+                                        btnShowDelay.Text = countdownTime.ToString() + "s";
                                     }
                                 });
                                 System.Threading.Thread.Sleep(1000);
-                                time--;
+                                countdownTime--;
                             }
                             Application.RunOnMainThread(() =>
                             {
@@ -317,6 +328,8 @@
             var revPack = pm.EditScene(this);
             if (revPack.Code == StateCode.SUCCESS)
             {
+                //閲嶇疆鎵ц鍊掕鏃�
+                this.countdownTime = 0;
                 if(MainPage.NoLoginMode)
                 {
                     var ssd = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(this));
@@ -349,6 +362,7 @@
             var revPack = pm.EditScene(this);
             if (revPack.Code == StateCode.SUCCESS)
             {
+                this.countdownTime = 0;
                 var scenes = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Scene>>(revPack.Data.ToString());
                 var tempScene = scenes.Find((obj) => obj.sid == sid);
                 if (tempScene != null)
diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs
index 9f34580..a41f04c 100644
--- a/HDL_ON/UI/MainPage.cs
+++ b/HDL_ON/UI/MainPage.cs
@@ -25,7 +25,7 @@
         /// <summary>
         /// 鐗堟湰鍙�
         /// </summary>
-        public static string VersionString = "1.3.1103";
+        public static string VersionString = "1.3.1104";
         ///// <summary>
         ///// 瀹㈡埛绔被鍨�
         ///// </summary>
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs
index da007cf..b333fe4 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs
@@ -851,55 +851,55 @@
             #endregion
 
             #region 鑾峰彇鏀寔
-            FrameLayout supView = new FrameLayout()
-            {
-                Height = Application.GetRealWidth(44),
-                BackgroundColor = 0xFFFF0000,
-            };
-            supportView.AddChidren(supView);
-            supView.MouseUpEventHandler = (sender, e) => {
-                Dialog dialog = new Dialog();
+            //FrameLayout supView = new FrameLayout()
+            //{
+            //    Height = Application.GetRealWidth(44),
+            //    BackgroundColor = 0xFFFF0000,
+            //};
+            //supportView.AddChidren(supView);
+            //supView.MouseUpEventHandler = (sender, e) => {
+            //    Dialog dialog = new Dialog();
 
-                var bodyView = new FrameLayout();
-                dialog.AddChidren(bodyView);
+            //    var bodyView = new FrameLayout();
+            //    dialog.AddChidren(bodyView);
 
-                var contentView = new VerticalScrolViewLayout()
-                {
-                    Height = Application.GetRealHeight(600),
-                    BackgroundColor = CSS_Color.MainBackgroundColor,
-                };
-                bodyView.AddChidren(contentView);
+            //    var contentView = new VerticalScrolViewLayout()
+            //    {
+            //        Height = Application.GetRealHeight(600),
+            //        BackgroundColor = CSS_Color.MainBackgroundColor,
+            //    };
+            //    bodyView.AddChidren(contentView);
 
-                var btnClose = new Button()
-                {
-                    Y = Application.GetRealHeight(600),
-                    Height = Application.GetRealHeight(67),
-                    BackgroundColor = CSS_Color.WarningColor,
-                    Text = "鍏� 闂�",
-                    TextAlignment = TextAlignment.CenterLeft,
-                    TextSize = CSS_FontSize.SubheadingFontSize,
-                };
-                btnClose.MouseUpEventHandler = (sender, e) => {
-                    dialog.Close();
-                };
-                bodyView.AddChidren(btnClose);
+            //    var btnClose = new Button()
+            //    {
+            //        Y = Application.GetRealHeight(600),
+            //        Height = Application.GetRealHeight(67),
+            //        BackgroundColor = CSS_Color.WarningColor,
+            //        Text = "鍏� 闂�",
+            //        TextAlignment = TextAlignment.CenterLeft,
+            //        TextSize = CSS_FontSize.SubheadingFontSize,
+            //    };
+            //    btnClose.MouseUpEventHandler = (sender, e) => {
+            //        dialog.Close();
+            //    };
+            //    bodyView.AddChidren(btnClose);
 
-                foreach (var msg in Control.Ins.MsgInfoList)
-                {
-                    var et = new TextView()
-                    {
-                        IsMoreLines = true,
-                        Height = Application.GetRealHeight(150),
-                        Width = Application.GetRealWidth(300),
-                        TextColor = CSS_Color.FirstLevelTitleColor,
-                        TextSize = CSS_FontSize.TextFontSize,
-                        Text = msg,
-                    };
-                    contentView.AddChidren(et);
-                }
+            //    foreach (var msg in Control.Ins.MsgInfoList)
+            //    {
+            //        var et = new TextView()
+            //        {
+            //            IsMoreLines = true,
+            //            Height = Application.GetRealHeight(150),
+            //            Width = Application.GetRealWidth(300),
+            //            TextColor = CSS_Color.FirstLevelTitleColor,
+            //            TextSize = CSS_FontSize.TextFontSize,
+            //            Text = msg,
+            //        };
+            //        contentView.AddChidren(et);
+            //    }
 
-                dialog.Show();
-            };
+            //    dialog.Show();
+            //};
 
             //Button btnSupportIcon = new Button()
             //{

--
Gitblit v1.8.0