From 38df05b600e7a41106f710a3e4287e37fbf35d03 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期四, 27 十月 2022 09:10:34 +0800
Subject: [PATCH] 备份

---
 HDL_ON/UI/UI2/1-HomePage/HomePage.cs |   77 ++++++++++++++------------------------
 1 files changed, 28 insertions(+), 49 deletions(-)

diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
index 4ab1481..7e79081 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -8,6 +8,7 @@
 using Newtonsoft.Json;
 using Newtonsoft.Json.Linq;
 using Shared;
+using Com.Hdl;
 
 namespace HDL_ON.UI
 {
@@ -193,7 +194,8 @@
 #if DEBUG
                 btnResidenceName.MouseUpEventHandler = (sender, e) =>
                 {
-
+                    Com.Hdl.HDLToDaHai.InitApplication(Shared.Application.Activity.Application);
+                    Com.Hdl.HDLToDaHai.OpneActivity(Shared.Application.Activity);
                 };
 #endif
 
@@ -659,36 +661,10 @@
                 var list = FunctionList.List.GetDeviceFunctionList();
                 foreach (var function in list)
                 {
-
-
                     //闊充箰妯″潡鏈変富浠庡叧绯伙紝闇�瑕佺壒娈婂鐞�
                     if (SPK.MusicSpkList().Contains( function.spk))
                     {
                         continue;
-                        //var music = function as Music.A31MusicModel;
-                        //var music = Music.A31MusicModel.A31MusicModelList.Find((obj) => obj.sid == function.sid);
-                        //if (music == null)
-                        //{
-                        //    continue;
-                        //}
-                        //if (music.ServerClientType == -1)
-                        //{
-                        //    continue;
-                        //}
-                        //else if (music.ServerClientType == 1)
-                        //{
-                        //    if (!music.MainPlayCollection)
-                        //    {
-                        //        continue;
-                        //    }
-                        //}
-                        //else
-                        //{
-                        //    if (!music.collect)
-                        //    {
-                        //        continue;
-                        //    }
-                        //}
                     }
                     else
                     {
@@ -1283,28 +1259,31 @@
             };
 
 
-            Button btnAcstPower = new Button()
-            {
-                X = Application.GetRealWidth(115),
-                Y = Application.GetRealHeight(70),
-                Width = Application.GetRealWidth(32),
-                Height = Application.GetRealWidth(32),
-                SelectedImagePath = "Public/PowerOpen.png",
-                UnSelectedImagePath = "Public/PowerClose.png",
-                IsSelected = function.trait_on_off.curValue.ToString() == "on",
-            };
-            view.AddChidren(btnAcstPower);
-            btnAcstPower.MouseUpEventHandler = (sender, e) => {
-                btnAcstPower.IsSelected = !btnAcstPower.IsSelected;
-                string onoff = btnAcstPower.IsSelected ? "on" : "off";
-                Dictionary<string, string> d = new Dictionary<string, string>();
-                d.Add(FunctionAttributeKey.OnOff, onoff);
-                foreach(var temp in FunctionList.List.GetAcstParentList())
-                {
-                    Control.Ins.SendWriteCommand(temp, d);
-                }
-
-            };
+            //Button btnAcstPower = new Button()
+            //{
+            //    X = Application.GetRealWidth(115),
+            //    Y = Application.GetRealHeight(70),
+            //    Width = Application.GetRealWidth(32),
+            //    Height = Application.GetRealWidth(32),
+            //    SelectedImagePath = "Public/PowerOpen.png",
+            //    UnSelectedImagePath = "Public/PowerClose.png",
+            //    IsSelected = function.trait_on_off.curValue.ToString() == "on",
+            //};
+            //view.AddChidren(btnAcstPower);
+            //btnAcstPower.MouseUpEventHandler = (sender, e) => {
+            //    btnAcstPower.IsSelected = !btnAcstPower.IsSelected;
+            //    new System.Threading.Thread(() =>
+            //    {
+            //        string onoff = btnAcstPower.IsSelected ? "on" : "off";
+            //        Dictionary<string, string> d = new Dictionary<string, string>();
+            //        d.Add(FunctionAttributeKey.OnOff, onoff);
+            //        foreach (var temp in FunctionList.List.GetAcstParentList())
+            //        {
+            //            Control.Ins.SendWriteCommand(temp, d);
+            //        }
+            //    })
+            //    { IsBackground = true }.Start();
+            //};
            
 
 

--
Gitblit v1.8.0