From 9b44e30275621a48335fbea7b32b5065a2859c9c Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 16 三月 2021 16:54:33 +0800
Subject: [PATCH] Merge branch 'WJC' into temp-wxr

---
 HDL_ON/UI/UI0-Public/TopViewDiv.cs |   56 +++++++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 47 insertions(+), 9 deletions(-)

diff --git a/HDL_ON/UI/UI0-Public/TopViewDiv.cs b/HDL_ON/UI/UI0-Public/TopViewDiv.cs
index 31e109f..080a209 100644
--- a/HDL_ON/UI/UI0-Public/TopViewDiv.cs
+++ b/HDL_ON/UI/UI0-Public/TopViewDiv.cs
@@ -100,8 +100,7 @@
 
             btnBack = new Button()
             {
-                Width = Application.GetRealWidth(50),
-                //BackgroundColor = CSS_Color.AuxiliaryColor2,
+                Width = Application.GetRealWidth(100),
             };
             contentView.AddChidren(btnBack);
 
@@ -146,8 +145,12 @@
                 Height = Application.GetMinRealAverage(28),
                 UnSelectedImagePath = "Public/FuncInfoSetIcon.png",
             };
-            contentView.AddChidren(btnSetting);
 
+            //濡傛灉鏄垚鍛橀殣钘忕紪杈戝姛鑳�
+            if (!DB_ResidenceData.Instance.CurrentRegion.IsOthreShare)
+            {
+                contentView.AddChidren(btnSetting);
+            }
             btnSetting.MouseUpEventHandler = (sender, e) =>
             {
                 editAction();
@@ -168,12 +171,16 @@
             var btnSetting = new Button()
             {
                 X = Application.GetRealWidth(337),
-                Y = Application.GetRealHeight(29),
-                Width = Application.GetMinRealAverage(28),
-                Height = Application.GetMinRealAverage(28),
+                Y = Application.GetRealHeight(28),
+                Width = Application.GetMinRealAverage(32),
+                Height = Application.GetMinRealAverage(32),
                 UnSelectedImagePath = "Public/FuncInfoSetIcon.png",
             };
-            contentView.AddChidren(btnSetting);
+            //濡傛灉鏄垚鍛橀殣钘忕紪杈戝姛鑳�
+            if (!DB_ResidenceData.Instance.CurrentRegion.IsOthreShare)
+            {
+                contentView.AddChidren(btnSetting);
+            }
 
             btnSetting.MouseUpEventHandler = (sender, e) =>
             {
@@ -201,7 +208,12 @@
                 Height = Application.GetMinRealAverage(28),
                 UnSelectedImagePath = "Public/FuncInfoSetIcon.png",
             };
-            contentView.AddChidren(btnSetting);
+
+            //濡傛灉鏄垚鍛橀殣钘忕紪杈戝姛鑳�
+            if (!DB_ResidenceData.Instance.CurrentRegion.IsOthreShare)
+            {
+                contentView.AddChidren(btnSetting);
+            }
 
             btnSetting.MouseUpEventHandler += (sender, e) =>
             {
@@ -230,7 +242,33 @@
 
             btnAddIcon.MouseUpEventHandler += (sender, e) =>
             {
-                LoadEvent_AddEvent(type, callBack);
+                if (type == "floors")
+                {
+                    Action<string> callBackAction = (floorName) =>
+                    {
+                        callBack("add", floorName);
+                    };
+                    string newFloorName = "1F";
+                    for (int i = 0; i < SpatialInfo.CurrentSpatial.FloorList.Count + 1;)
+                    {
+                        newFloorName = ++i + "F";
+                        if (null == SpatialInfo.CurrentSpatial.FloorList.Find((obj) => obj.roomName == newFloorName))
+                        {
+                            break;
+                        }
+                    }
+                    var fs = new List<string>();
+                    foreach (var f in SpatialInfo.CurrentSpatial.FloorList)
+                    {
+                        fs.Add(f.roomName);
+                    }
+                    new PublicAssmebly().LoadDialog_EditParater(StringId.AddFloors, newFloorName, callBackAction, StringId.FloorNameCannotBeEmpty,
+                        StringId.AddFloorFailed_FloorAlreadyExist, fs);
+                }
+                else
+                {
+                    callBack("", "");
+                }
             };
         }
 

--
Gitblit v1.8.0