From cc48110a814477bc0d01615f9844aea6ff2b609f Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期三, 28 四月 2021 14:51:38 +0800 Subject: [PATCH] Merge branch 'WJC' into wxr4 --- HDL-ON_iOS/Resources/Phone/LogicIcon/shiwaitianqi.png | 0 HDL-ON_Android/Assets/Language.ini | 2 HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs | 2 HDL-ON_iOS/HDL-ON_iOS.csproj | 1 HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs | 27 + HDL_ON/HDL_ON.projitems | 1 HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs | 137 +++++++--- HDL-ON_Android/HDL-ON_Android.csproj | 1 HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs | 15 + HDL-ON_iOS/Resources/Language.ini | 2 HDL_ON/DAL/Server/HttpUtil.cs | 1 HDL_ON/UI/UI2/3-Intelligence/Automation/OnePortAutomation.cs | 344 ++++++++++++++++++++++++++ HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs | 21 + HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs | 74 +--- HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs | 19 HDL_ON/Common/R.cs | 2 HDL-ON_Android/Assets/Phone/LogicIcon/shiwaitianqi.png | 0 HDL_ON/UI/UI2/3-Intelligence/Automation/InputPushText.cs | 107 ++++++-- 18 files changed, 618 insertions(+), 138 deletions(-) diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini index 1b61d49..d952a7b 100644 --- a/HDL-ON_Android/Assets/Language.ini +++ b/HDL-ON_Android/Assets/Language.ini @@ -1601,6 +1601,8 @@ 7129=(100瀛楀唴) 7130=璐﹀彿閫夋嫨 7131=App鎺ㄩ�� +7132=鑷姩鍖� +7133=宸叉墽琛� 9000=璇蜂娇鐢ㄦ柊鐨勬墜鏈鸿处鍙风櫥褰旳PP 9001=璇蜂娇鐢ㄦ柊鐨勯偖绠辫处鍙风櫥褰旳PP diff --git a/HDL-ON_Android/Assets/Phone/LogicIcon/shiwaitianqi.png b/HDL-ON_Android/Assets/Phone/LogicIcon/shiwaitianqi.png new file mode 100644 index 0000000..a920e56 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/LogicIcon/shiwaitianqi.png Binary files differ diff --git a/HDL-ON_Android/HDL-ON_Android.csproj b/HDL-ON_Android/HDL-ON_Android.csproj index fd84eda..2b2c1f9 100644 --- a/HDL-ON_Android/HDL-ON_Android.csproj +++ b/HDL-ON_Android/HDL-ON_Android.csproj @@ -1126,6 +1126,7 @@ <AndroidAsset Include="Assets\Phone\FunctionIcon\ArmCenter\HouseDefenseIconOn.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\ArmCenter\BurglarAlarmIcon.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\ArmCenter\HistoryIcon.png" /> + <AndroidAsset Include="Assets\Phone\LogicIcon\shiwaitianqi.png" /> </ItemGroup> <ItemGroup> <AndroidNativeLibrary Include="libs\armeabi-v7a\libelianjni.so" /> diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj index 7b0b0cb..90c1150 100644 --- a/HDL-ON_iOS/HDL-ON_iOS.csproj +++ b/HDL-ON_iOS/HDL-ON_iOS.csproj @@ -1233,6 +1233,7 @@ <BundleResource Include="Resources\Phone\FunctionIcon\ArmCenter\BurglarAlarmIcon.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\ArmCenter\HistoryIcon.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\FunctionBg\SecurityCenterFunctionBg.png" /> + <BundleResource Include="Resources\Phone\LogicIcon\shiwaitianqi.png" /> </ItemGroup> <ItemGroup> <ITunesArtwork Include="iTunesArtwork" /> diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini index a69148f..d02a5e5 100644 --- a/HDL-ON_iOS/Resources/Language.ini +++ b/HDL-ON_iOS/Resources/Language.ini @@ -1601,6 +1601,8 @@ 7129=(100瀛楀唴) 7130=璐﹀彿閫夋嫨 7131=App鎺ㄩ�� +7132=鑷姩鍖� +7133=宸叉墽琛� 9000=璇蜂娇鐢ㄦ柊鐨勬墜鏈鸿处鍙风櫥褰旳PP 9001=璇蜂娇鐢ㄦ柊鐨勯偖绠辫处鍙风櫥褰旳PP diff --git a/HDL-ON_iOS/Resources/Phone/LogicIcon/shiwaitianqi.png b/HDL-ON_iOS/Resources/Phone/LogicIcon/shiwaitianqi.png new file mode 100644 index 0000000..a920e56 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/LogicIcon/shiwaitianqi.png Binary files differ diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs index b4c9508..6fb3396 100644 --- a/HDL_ON/Common/R.cs +++ b/HDL_ON/Common/R.cs @@ -1099,6 +1099,8 @@ public const int xianzhichangdu = 7129; public const int zhanghaoxuanze = 7130; public const int apptuisong = 7131; + public const int zidontghua = 7132; + public const int yizhixing = 7133; #region LE鏂板 /// <summary> diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs index 94dcf38..2b7a612 100644 --- a/HDL_ON/DAL/Server/HttpUtil.cs +++ b/HDL_ON/DAL/Server/HttpUtil.cs @@ -153,6 +153,7 @@ { urlHead = OnAppConfig.Instance.RequestHttpsHost; } + //"https://test-gz.hdlcontrol.com"; //"https://bahrain-gateway.hdlcontrol.com"; //urlHead="https://china-gateway.hdlcontrol.com"; string requestFullUrl = urlHead + apiPath; diff --git a/HDL_ON/HDL_ON.projitems b/HDL_ON/HDL_ON.projitems index 9629070..217113f 100644 --- a/HDL_ON/HDL_ON.projitems +++ b/HDL_ON/HDL_ON.projitems @@ -402,6 +402,7 @@ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\ArmCenter\ArmCenterPage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Entity\Function\SecurityAlarm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\ArmCenter\ArmDeploymentSettingPage.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\OnePortAutomation.cs" /> </ItemGroup> <ItemGroup> <Folder Include="$(MSBuildThisFileDirectory)DAL\" /> diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs index a319a5c..41b3be7 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs @@ -32,7 +32,10 @@ LogicView.SelectTypeView timeView = new LogicView.SelectTypeView(); timeView.btnText.TextID = StringId.time; timeView.btnIcon.UnSelectedImagePath = "LogicIcon/time.png"; - viewLayout.AddChidren(timeView.FLayoutView()); + if (MainView.IsGatewayType) + { + viewLayout.AddChidren(timeView.FLayoutView()); + } //鍔熻兘 LogicView.SelectTypeView functionView = new LogicView.SelectTypeView(); @@ -40,13 +43,21 @@ functionView.btnText.TextID = StringId.funLogic; functionView.btnIcon.UnSelectedImagePath = "LogicIcon/functionicon.png"; viewLayout.AddChidren(functionView.FLayoutView()); + if (!MainView.IsGatewayType) + { + functionView.frameLayout.Y = Application.GetRealHeight(0); + } //瀹ゅ鍙樺寲 LogicView.SelectTypeView shiwaiView = new LogicView.SelectTypeView(); shiwaiView.frameLayout.Y = functionView.frameLayout.Bottom; shiwaiView.btnText.TextID = StringId.shiwaibainhua; shiwaiView.btnIcon.UnSelectedImagePath = "LogicIcon/changesinoutdoor.png"; - viewLayout.AddChidren(shiwaiView.FLayoutView()); + + if (MainView.IsGatewayType) + { + viewLayout.AddChidren(shiwaiView.FLayoutView()); + } #endregion diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs index 757f209..f8b2ea0 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs @@ -129,8 +129,8 @@ notification.btnText.TextID = StringId.notification; notification.btnLine.BackgroundColor = CSS.CSS_Color.textWhiteColor; viewLayout.AddChidren(notification.FLayoutView()); - - if (Logic.currlogic.pushConfigs.Count > 0) + //鏄剧ず涔嬪墠鎺ㄩ�佸紑鍏崇姸鎬� + if (Logic.currlogic.noticeConfig.enable) { push.btnNextIcon.IsSelected = true; } @@ -141,7 +141,7 @@ ///涓婁笅闂撮殧62鍍忕礌 viewLayout.AddChidren(new FrameLayout { Height = Application.GetRealHeight(40) }); #endregion - + #region 淇濆瓨 ///淇濆瓨View LogicView.SaveView saveView = new LogicView.SaveView(); @@ -188,47 +188,25 @@ DateMethod(cyclicTitle.btnText); }; ///鏄惁瑕佹帹閫佺偣鍑讳簨浠� - //鍒濆鍖栧璞� - PushConfigs pushConfigs = new PushConfigs(); - if (Logic.currlogic.pushConfigs.Count > 0) - { - pushConfigs = Logic.currlogic.pushConfigs[0]; - } - else - { - if (!string.IsNullOrEmpty(UserInfo.Current.userMobileInfo)) - { - //榛樿鎺ㄩ�佸綋鍓嶈处鍙� - pushConfigs.pushTarget.Add(UserInfo.Current.userMobileInfo); - } - else - { - //榛樿鎺ㄩ�佸綋鍓嶈处鍙� - pushConfigs.pushTarget.Add(UserInfo.Current.userEmailInfo); - } - } push.btnNextIcon.MouseUpEventHandler += (sender, e) => { - push.btnNextIcon.IsSelected = !push.btnNextIcon.IsSelected; + //璐﹀彿鍒楄〃涓虹┖榛樿鎺ㄩ�佸綋鍓嶈处鍙� + if (Logic.currlogic.pushConfigs.Count == 0) + { + //鍒濆鍖栧璞� + PushConfigs pushConfigs = new PushConfigs(); + //榛樿娣诲姞鎺ㄩ�佸綋鍓嶈处鍙� + pushConfigs.pushTarget.Add(UserInfo.Current.ID); + Logic.currlogic.pushConfigs.Add(pushConfigs); + } + push.btnNextIcon.IsSelected = !push.btnNextIcon.IsSelected; if (push.btnNextIcon.IsSelected) { - if (Logic.currlogic.pushConfigs.Count > 0) - { - //娓呯┖涔嬪墠鏃ч厤缃暟鎹� - Logic.currlogic.pushConfigs.Clear(); - } - //澧炲姞閰嶇疆鏁版嵁 - Logic.currlogic.pushConfigs.Add(pushConfigs); + Logic.currlogic.noticeConfig.enable = true; } else { - if (Logic.currlogic.pushConfigs.Count > 0) - { - //榛樿鍙栫涓�涓祴鍊� - pushConfigs = Logic.currlogic.pushConfigs[0]; - //娓呯┖閰嶇疆鏁版嵁 - Logic.currlogic.pushConfigs.Clear(); - } + Logic.currlogic.noticeConfig.enable = false; } }; ///杈撳叆鎺ㄩ�佹枃鏈� @@ -236,18 +214,13 @@ { InputPushText inputPushText = new InputPushText(); MainPage.BasePageView.AddChidren(inputPushText); - inputPushText.Show(pushConfigs); + inputPushText.Show(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - inputPushText.action += (pushConfigsIfon) => - { - //璧嬪�� - pushConfigs = pushConfigsIfon; - }; }; ///淇濆瓨鐐瑰嚮浜嬩欢 saveView.btnClick.MouseUpEventHandler += (sender, e) => { - if (Logic.currlogic.input.Count == 0&& Logic.currlogic.output.Count == 0) + if (Logic.currlogic.input.Count == 0 && Logic.currlogic.output.Count == 0) { new LogicView.TipPopView().TipBox(StringId.tip, StringId.conditioncNullOrtargetNull); return; @@ -272,7 +245,7 @@ { list.Add(logic.name); } - new LogicView.TipPopView().InputBox(StringId.editName, InpOrOutLogicMethod.GetLogicName(Logic.currlogic), StringId.nameNull, StringId.NameAlreadyExists, list, (logicName,view + new LogicView.TipPopView().InputBox(StringId.editName, InpOrOutLogicMethod.GetLogicName(Logic.currlogic), StringId.nameNull, StringId.NameAlreadyExists, list, (logicName, view ) => { Logic.currlogic.name = logicName; @@ -336,7 +309,7 @@ }) { IsBackground = true }.Start(); - },()=> { }); + }, () => { }); } else @@ -366,7 +339,7 @@ { new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.gatewayNotOnline)); } - else + else { new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.saveFail)); } @@ -536,7 +509,7 @@ //鍔犺浇涔嬪墠淇濆瓨鐨勬暟鎹� weekStateList.AddRange(list); } - var weekListStr= weekView.GetViewList("week"); + var weekListStr = weekView.GetViewList("week"); weekView.MultiSelectShow(fLayout, weekListStr, Language.StringByID(StringId.cyclic), weekStateList , (list) => { @@ -564,7 +537,7 @@ weekView.MonSelectShow(fLayout, Logic.currlogic, (monList) => { //閫変腑鏁版嵁澶勭悊 - string textStr= MainView.GetMonString(monList); + string textStr = MainView.GetMonString(monList); //鏄剧ず閫変腑鏁版嵁 button.Text = textStr; //灏佽鏁版嵁 @@ -603,8 +576,7 @@ } - - + } } diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs index cd334f8..47f2d15 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs @@ -135,13 +135,14 @@ } } break; - case SPK.SensorDoorWindow: { + case SPK.SensorDoorWindow: + { LogicView.FunTypeView view = new LogicView.FunTypeView(); view.btnText.TextID = StringId.kaiqiandbihe; fLayout.AddChidren(view.FLayoutView()); view.btnClick.MouseUpEventHandler += (sender, e) => { - DeviceView(device, view.btnState, StringId.kaiqi , StringId.bihe); + DeviceView(device, view.btnState, StringId.kaiqi, StringId.bihe); }; if (edit) { @@ -151,7 +152,7 @@ break; case SPK.SensoruUtrasonic: { - + LogicView.FunTypeView view = new LogicView.FunTypeView(); view.btnText.TextID = StringId.yourenandwuren; fLayout.AddChidren(view.FLayoutView()); @@ -214,10 +215,22 @@ return; } LogicMethod.RemoveAllView(); - AddLogic addLogic = new AddLogic(); - MainPage.BasePageView.AddChidren(addLogic); - addLogic.Show(); - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + + if (MainView.IsGatewayType) + { //A缃戝叧 + var addLogic = new AddLogic(); + MainPage.BasePageView.AddChidren(addLogic); + addLogic.Show(); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + } + else + { + //涓�绔彛缃戝叧 + var onePortAutomation = new OnePortAutomation(); + MainPage.BasePageView.AddChidren(onePortAutomation); + onePortAutomation.Show(); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + } }; #endregion diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InputPushText.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InputPushText.cs index e183494..b05e5c7 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InputPushText.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InputPushText.cs @@ -11,8 +11,7 @@ { Tag = "Logic"; } - public Action<PushConfigs> action; - public void Show(PushConfigs pushConfigs) + public void Show() { this.BackgroundColor = CSS.CSS_Color.viewMiddle; @@ -41,7 +40,7 @@ Height = Application.GetRealHeight(152), TextAlignment = TextAlignment.TopLeft, Radius=(uint)Application.GetRealHeight(12), - Text= pushConfigs.pushContent, + Text= Logic.currlogic.noticeConfig.noticeContent, TextSize = LogicView.TextSize.text14, TextColor= CSS.CSS_Color.textColor, PlaceholderText =Language.StringByID(StringId.xianzhichangdu),//"(100瀛椾互鍐�)", @@ -61,7 +60,6 @@ #endif } - pushConfigs.pushContent = textBox.Text.Trim(); }; #endregion @@ -72,10 +70,11 @@ appPush.btnText.TextID = StringId.apptuisong; appPush.btnText.X = Application.GetRealWidth(12); viewLayout.AddChidren(appPush.FLayoutView()); + //瀹氫箟涓�涓眬閮ㄨ处鍙峰垪琛ㄧ敤鏉ヨ褰曢�変腑鏁版嵁; + List<string> selectedAccountList = new List<string>(); appPush.btnClick.MouseUpEventHandler += (sender, e) => { - //瀹氫箟涓�涓眬閮ㄨ处鍙峰垪琛ㄧ敤鏉ヨ褰曢�変腑鏁版嵁; - List<string> accountList = new List<string>(); + var userList = new List<HDL_ON.Entity.ResidenceMemberInfo>(); Loading loading = new Loading(); this.AddChidren(loading); loading.Start(); @@ -83,12 +82,8 @@ { try { - var userList = Send.GetResidenceMemberAccount(); - for (int i = 0; i < userList.Count; i++) - { - var user = userList[i]; - accountList.Add(user.Account); - } + userList = Send.GetResidenceMemberAccount(); + } catch { } finally @@ -96,21 +91,49 @@ Application.RunOnMainThread(() => { loading.Hide(); - if (!string.IsNullOrEmpty(UserInfo.Current.userMobileInfo)) + userList.Add(new Entity.ResidenceMemberInfo { childAccountId = UserInfo.Current.ID, childAccountPhone = UserInfo.Current.userMobileInfo, childAccountEmail = UserInfo.Current.userEmailInfo }); + //浣忓畢瀛愯处鍙峰垪琛� + List<string> accountList = new List<string>(); + //涔嬪墠鐘舵�佸垪琛� + List<string> stateList = new List<string>(); + for (int i = 0; i < userList.Count; i++) { - //榛樿鎺ㄩ�佸綋鍓嶈处鍙� - accountList.Insert(0, UserInfo.Current.userMobileInfo); + var user = userList[i]; + accountList.Add(user.Account); } - else + + if (Logic.currlogic.pushConfigs.Count > 0) { - //榛樿鎺ㄩ�佸綋鍓嶈处鍙� - accountList.Insert(0, UserInfo.Current.userEmailInfo); + var list = Logic.currlogic.pushConfigs[0].pushTarget; + for (int i = 0;i< userList.Count; i++) + { + + var user = userList[i]; + if (list.Contains(user.childAccountId)) + { + stateList.Add(user.Account); + } + + } + + } + PublicInterface view = new PublicInterface(); - view.FrameOrVvList(this, accountList, pushConfigs.pushTarget, StringId.zhanghaoxuanze + view.FrameOrVvList(this, accountList, stateList, StringId.zhanghaoxuanze , (list) => { - pushConfigs.pushTarget = list; + //娓呯┖鏃ф暟鎹垪琛� + selectedAccountList.Clear(); + for (int i = 0;i<userList.Count; i++) + { + var user = userList[i]; + if (list.Contains(user.Account)) + { + selectedAccountList.Add(user.childAccountId); + } + } + }); }); } @@ -127,18 +150,50 @@ topView.clickBackBtn.MouseUpEventHandler += (e, sen) => { - - action(pushConfigs); - RemoveFromParent(); + this.RemoveFromParent(); }; saveView.btnClick.MouseUpEventHandler += (e, sen) => { - action(pushConfigs); - RemoveFromParent(); + Logic.currlogic.noticeConfig.noticeContent = textBox.Text.Trim(); + if (selectedAccountList.Count > 0) + { + Logic.currlogic.pushConfigs.Clear();//娓呯┖鏃ф暟鎹垪琛� + Logic.currlogic.pushConfigs.Add(new PushConfigs { pushTarget = selectedAccountList }); + } + //璐﹀彿鍒楄〃涓虹┖榛樿鎺ㄩ�佸綋鍓嶈处鍙� + if (Logic.currlogic.pushConfigs.Count == 0) + { + //鍒濆鍖栧璞� + PushConfigs pushConfigs = new PushConfigs(); + //榛樿娣诲姞鎺ㄩ�佸綋鍓嶈处鍙� + pushConfigs.pushTarget.Add(UserInfo.Current.ID); + Logic.currlogic.pushConfigs.Add(pushConfigs); + } + this.RemoveFromParent(); }; #endregion } - + + /// <summary> + /// 鎵嬫満璐﹀彿涓哄厛锛屾墜鏈鸿处鍙蜂负绌猴紝鍏舵鍒伴偖绠辫处鍙� + /// </summary> + private string Account + { + get + { + ///鎵嬫満璐﹀彿涓哄厛锛屾墜鏈鸿处鍙蜂负绌猴紝鍏舵鍒伴偖绠辫处鍙�; + if (!string.IsNullOrEmpty(UserInfo.Current.userMobileInfo)) + { + //榛樿鎺ㄩ�佸綋鍓嶆墜鏈鸿处鍙� + return UserInfo.Current.userMobileInfo; + } + else + { + //榛樿鎺ㄩ�佸綋鍓嶉偖绠辫处鍙� + return UserInfo.Current.userEmailInfo; + } + } + } } } diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs index d643f14..d392722 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs @@ -50,6 +50,10 @@ /// </summary> public List<Output> output = new List<Output>(); /// <summary> + /// 閫氱煡閰嶇疆 + /// </summary> + public NoticeConfig noticeConfig = new NoticeConfig(); + /// <summary> /// 鎺ㄩ�侀厤缃� /// </summary> public List<PushConfigs> pushConfigs = new List<PushConfigs>(); @@ -136,6 +140,21 @@ public string radius = string.Empty; } /// <summary> + /// 閫氱煡閰嶇疆 + /// </summary> + [Serializable] + public class NoticeConfig + { + /// <summary> + /// 鏄惁寮�鍚�氱煡 + /// </summary> + public bool enable = false; + /// <summary> + /// 閫氱煡鍐呭 + /// </summary> + public string noticeContent = "鑷姩鍖栧凡缁忔墽琛�";//string.Empty; + } + /// <summary> /// 鎺ㄩ�侀厤缃� /// </summary> [Serializable] @@ -148,7 +167,7 @@ /// <summary> /// 鎺ㄩ�佸唴瀹� /// </summary> - public string pushContent = string.Empty; + //public string pushContent = string.Empty; /// <summary> /// 鎺ㄩ�佺洰鏍� /// </summary> diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs index 9a56c61..2543213 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs @@ -46,11 +46,12 @@ logicView.btnWeekText.Text = GetCyclicText(currLogic); logicView.btnclick.MouseUpEventHandler += (sen, e) => { - Logic.currlogic = currLogic; - var addLogic = new AddLogic(); - MainPage.BasePageView.AddChidren(addLogic); - addLogic.Show(); - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + //Logic.currlogic = currLogic; + //var addLogic = new AddLogic(); + //MainPage.BasePageView.AddChidren(addLogic); + //addLogic.Show(); + //MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + new MainView { }.SkipAddLogicPage(currLogic); }; //寮�鍏冲浘鏍囩殑鐐瑰嚮浜嬩欢 logicView.btnSwitchIcon.MouseUpEventHandler += (sender1, e1) => @@ -123,13 +124,30 @@ /// <summary> /// 鎸�+璺宠浆鍒伴�昏緫鐣岄潰鐨勬柟娉� /// </summary> - public void SkipAddLogicPage() + public void SkipAddLogicPage(Logic logic=null) { - Logic.currlogic = new Logic(); - var addLogic = new AddLogic(); - MainPage.BasePageView.AddChidren(addLogic); - addLogic.Show(); - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + if (logic == null) + { + Logic.currlogic = new Logic(); + } + else { + Logic.currlogic = logic; + } + if (IsGatewayType) + { + var addLogic = new AddLogic(); + MainPage.BasePageView.AddChidren(addLogic); + addLogic.Show(); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + } + else + { + + var onePortAutomation = new OnePortAutomation(); + MainPage.BasePageView.AddChidren(onePortAutomation); + onePortAutomation.Show(); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + } } /// <summary> ///杩斿洖寰幆鎻忚堪鏂囨湰 @@ -209,7 +227,6 @@ } return weekTextName.TrimEnd(','); } - /// <summary> /// 鑾峰彇姣忔湀鐨勫瓧绗︿覆 /// </summary> @@ -262,6 +279,7 @@ var jay = jArray[a]; //鏁版嵁杩斿簭鍒楀寲涓篖ogic瀵硅薄 var str = Newtonsoft.Json.JsonConvert.SerializeObject(jay); + Console.WriteLine("鑾峰彇閫昏緫==="+str); var logic = Newtonsoft.Json.JsonConvert.DeserializeObject<Logic>(str); if (logic != null) { @@ -270,37 +288,38 @@ if (if_logic == null) { - Logic newlogic = new Logic(); - newlogic.name = logic.name; - newlogic.userLogicId = logic.userLogicId; - newlogic.sid = logic.sid; - newlogic.relation = logic.relation; - newlogic.enable = logic.enable; - newlogic.cycle = logic.cycle; - for (int i = 0; i < logic.input.Count; i++) - { - if (logic.input[i] == null || string.IsNullOrEmpty(logic.input[i].condition_type)) - { - //闃叉璋冭瘯杞欢涔变紶涓滆タ涓婃潵; - //闃叉鏈夌┖瀵硅薄锛� - //姝e父鎯呭喌涓嬩笉浼氬嚭鐜扮殑鐜拌薄锛� - continue; - } - newlogic.input.Add(logic.input[i]); - } - for (int i = 0; i < logic.output.Count; i++) - { - if (logic.output[i] == null || string.IsNullOrEmpty(logic.output[i].target_type)) - { - //闃叉璋冭瘯杞欢涔变紶涓滆タ涓婃潵; - //闃叉鏈夌┖瀵硅薄锛� - //姝e父鎯呭喌涓嬩笉浼氳鐜拌薄锛� - continue; - } - newlogic.output.Add(logic.output[i]); - } + //Logic newlogic = new Logic(); + //newlogic.name = logic.name; + //newlogic.userLogicId = logic.userLogicId; + //newlogic.sid = logic.sid; + //newlogic.relation = logic.relation; + //newlogic.enable = logic.enable; + //newlogic.cycle = logic.cycle; + //for (int i = 0; i < logic.input.Count; i++) + //{ + // if (logic.input[i] == null || string.IsNullOrEmpty(logic.input[i].condition_type)) + // { + // //闃叉璋冭瘯杞欢涔变紶涓滆タ涓婃潵; + // //闃叉鏈夌┖瀵硅薄锛� + // //姝e父鎯呭喌涓嬩笉浼氬嚭鐜扮殑鐜拌薄锛� + // continue; + // } + // newlogic.input.Add(logic.input[i]); + //} + //for (int i = 0; i < logic.output.Count; i++) + //{ + // if (logic.output[i] == null || string.IsNullOrEmpty(logic.output[i].target_type)) + // { + // //闃叉璋冭瘯杞欢涔变紶涓滆タ涓婃潵; + // //闃叉鏈夌┖瀵硅薄锛� + // //姝e父鎯呭喌涓嬩笉浼氳鐜拌薄锛� + // continue; + // } + // newlogic.output.Add(logic.output[i]); + //} + //娣诲姞閫昏緫 - Logic.LogicList.Add(newlogic); + Logic.LogicList.Add(logic); } } @@ -323,7 +342,6 @@ } return false; } - /// <summary> /// 鏄剧ず鏉′欢鎴栬�呯洰鏍囩被鍨嬪浘鏍� /// </summary> @@ -356,6 +374,14 @@ case 3: { iconInt = 2; + + } + break; + case 4: + case 6: + case 9: + { + iconInt = 3; } break; @@ -450,6 +476,12 @@ strIcon = "LogicIcon/selectTheFun.png"; } break; + case 3: + { + + strIcon = "LogicIcon/shiwaitianqi.png"; + } + break; case 11: { //鍒嗗壊鏉′欢鍜岀洰鏍囩殑鍥炬爣 @@ -477,6 +509,25 @@ btnIcon.UnSelectedImagePath = strIcon; } } + /// <summary> + /// 鍒ゆ柇缃戝叧绫诲瀷 + /// </summary> + /// <returns></returns> + public static bool IsGatewayType + { + get + { + if (Entity.DB_ResidenceData.Instance.GatewayType == 1) + { + return true; + } + else + { + return false; + + } + } + } } class LogicData { diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/OnePortAutomation.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/OnePortAutomation.cs new file mode 100644 index 0000000..4610303 --- /dev/null +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/OnePortAutomation.cs @@ -0,0 +1,344 @@ +锘縰sing System; +using Shared; +using System.Collections.Generic; + + +namespace HDL_ON.UI.UI2.Intelligence.Automation +{ + public class OnePortAutomation : FrameLayout + { + public OnePortAutomation() + { + Tag = "Logic"; + } + + public void Show() + { + #region 鐣岄潰甯冨眬 + this.BackgroundColor = CSS.CSS_Color.viewMiddle; + LogicView.TopView topView = new LogicView.TopView(); + topView.setBtn.Visible = true; + this.AddChidren(topView.FLayoutView()); + topView.clickBackBtn.MouseUpEventHandler += (e, sen) => + { + RemoveFromParent(); + }; + if (string.IsNullOrEmpty(Logic.currlogic.userLogicId)) + { + topView.topNameBtn.TextID = StringId.newAutomation; + topView.setBtn.Visible = false; + topView.clickSetBtn.Visible = false; + } + else + { + topView.topNameBtn.TextID = StringId.editAutomation; + topView.setBtn.Visible = true; + topView.clickSetBtn.Visible = true; + } + + + VerticalScrolViewLayout viewLayout = new VerticalScrolViewLayout + { + Y = Application.GetRealHeight(64), + Width = Application.GetRealWidth(LogicView.TextSize.view375), + Height = Application.GetRealHeight(LogicView.TextSize.view667 - 64 - 76), + BackgroundColor = CSS.CSS_Color.viewMiddle, + }; + this.AddChidren(viewLayout); + #region 鏉′欢 + ///濡傛灉鐨刅iew + LogicView.AddOutputInputTextView addInputTextView = new LogicView.AddOutputInputTextView(); + addInputTextView.btnIf.TextID = StringId.ifCondition; + viewLayout.AddChidren(addInputTextView.FLayoutView(46, 12)); + ///婊¤冻浠ヤ笅鏉′欢鐨刅iew + LogicView.LogicTypeTitleView titleCondition = new LogicView.LogicTypeTitleView(); + titleCondition.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight); + titleCondition.btnText.TextID = StringId.andCondition; + viewLayout.AddChidren(titleCondition.FLayoutView()); + + if (Logic.currlogic.relation == "and") + { + titleCondition.btnText.Text = Language.StringByID(StringId.andCondition); + } + else + { + titleCondition.btnText.Text = Language.StringByID(StringId.orCondition); + + } + + // 鏉′欢澶勭悊鏂规硶 + InpOrOutLogicMethod.InputCondition(this, viewLayout); + ///娣诲姞鍥炬爣鐨刅iew + LogicView.LogicAddView addInputIcon = new LogicView.LogicAddView(); + addInputIcon.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight); + viewLayout.AddChidren(addInputIcon.FLayoutView()); + #endregion + + #region 鐩爣 + ///灏辨墽琛孷iew + LogicView.AddOutputInputTextView addOutpuTextView = new LogicView.AddOutputInputTextView(); + addOutpuTextView.btnIf.TextID = StringId.isExecuted; + viewLayout.AddChidren(addOutpuTextView.FLayoutView(54, 20)); + + + #region 鎵ц鎺ㄩ�� 鍙戦�侀�氱煡 + ///涓婁笅闂撮殧12鍍忕礌 + viewLayout.AddChidren(new FrameLayout { Height = Application.GetRealHeight(12) }); + ///鎵ц鎺ㄩ�乮ew + LogicView.LogicTypeTitleView push = new LogicView.LogicTypeTitleView(); + push.frameLayout.Height = Application.GetRealHeight(50); + push.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight); + push.btnText.TextID = StringId.push; + push.btnNextIcon.Width = Application.GetRealWidth(36); + push.btnNextIcon.Height = Application.GetRealWidth(36); + push.btnNextIcon.X = Application.GetRealWidth(305); + push.btnNextIcon.UnSelectedImagePath = "LogicIcon/off.png"; + push.btnNextIcon.SelectedImagePath = "LogicIcon/on.png"; + push.btnClick.Width = Application.GetRealWidth(305); + viewLayout.AddChidren(push.FLayoutView()); + ///鍙戦�侀�氱煡View + LogicView.LogicTypeTitleView notification = new LogicView.LogicTypeTitleView(); + notification.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight); + notification.btnText.TextID = StringId.notification; + notification.btnLine.BackgroundColor = CSS.CSS_Color.textWhiteColor; + viewLayout.AddChidren(notification.FLayoutView()); + //鏄剧ず涔嬪墠鎺ㄩ�佸紑鍏崇姸鎬� + if (Logic.currlogic.noticeConfig.enable) + { + push.btnNextIcon.IsSelected = true; + } + else + { + push.btnNextIcon.IsSelected = false; + } + ///涓婁笅闂撮殧62鍍忕礌 + viewLayout.AddChidren(new FrameLayout { Height = Application.GetRealHeight(40) }); + #endregion + + #region 淇濆瓨 + ///淇濆瓨View + LogicView.SaveView saveView = new LogicView.SaveView(); + saveView.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(24), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight); + this.AddChidren(saveView.FLayoutView()); + + #endregion + #endregion + #endregion + #region 鐣岄潰鍚勭鐐瑰嚮浜嬩欢 + ///璁剧疆鍥炬爣鐐瑰嚮浜嬩欢 + topView.clickSetBtn.MouseUpEventHandler += (sender, e) => + { + Set set = new Set(); + MainPage.BasePageView.AddChidren(set); + set.Show(); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + + }; + ///鎴栧拰涓庣偣鍑讳簨浠� + titleCondition.btnClick.MouseUpEventHandler += (sender, e) => + { + AndOrMethod(titleCondition.btnText); + }; + ///鏉′欢娣诲姞鐐瑰嚮浜嬩欢 + addInputIcon.btnClick.MouseUpEventHandler += (sen, e) => + { + var addInputType = new AddInputType(); + MainPage.BasePageView.AddChidren(addInputType); + addInputType.Show(); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + }; + ///鏄惁瑕佹帹閫佺偣鍑讳簨浠� + push.btnNextIcon.MouseUpEventHandler += (sender, e) => + { + //璐﹀彿鍒楄〃涓虹┖榛樿鎺ㄩ�佸綋鍓嶈处鍙� + if (Logic.currlogic.pushConfigs.Count == 0) + { + //鍒濆鍖栧璞� + PushConfigs pushConfigs = new PushConfigs(); + //榛樿娣诲姞鎺ㄩ�佸綋鍓嶈处鍙� + pushConfigs.pushTarget.Add(UserInfo.Current.ID); + Logic.currlogic.pushConfigs.Add(pushConfigs); + } + push.btnNextIcon.IsSelected = !push.btnNextIcon.IsSelected; + if (push.btnNextIcon.IsSelected) + { + Logic.currlogic.noticeConfig.enable = true; + } + else + { + Logic.currlogic.noticeConfig.enable = false; + } + }; + ///杈撳叆鎺ㄩ�佹枃鏈� + notification.btnClick.MouseUpEventHandler += (sender, e) => + { + InputPushText inputPushText = new InputPushText(); + MainPage.BasePageView.AddChidren(inputPushText); + inputPushText.Show(); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + }; + ///淇濆瓨鐐瑰嚮浜嬩欢 + saveView.btnClick.MouseUpEventHandler += (sender, e) => + { + if (Logic.currlogic.input.Count == 0) + { + new LogicView.TipPopView().TipBox(StringId.tip, StringId.conditioncNull); + return; + } + Loading loading = new Loading(); + this.AddChidren(loading); + HDL_ON.DAL.Server.ResponsePackNew responsePackNew = null; + if (string.IsNullOrEmpty(Logic.currlogic.userLogicId)) + { + List<string> list = new List<string>(); + foreach (var logic in Logic.LogicList) + { + list.Add(logic.name); + } + new LogicView.TipPopView().InputBox(StringId.editName, InpOrOutLogicMethod.GetLogicName(Logic.currlogic), StringId.nameNull, StringId.NameAlreadyExists, list, (logicName, view + ) => + { + Logic.currlogic.name = logicName; + Logic.currlogic.sid = LogicMethod.NewSid(); + loading.Start(); + new System.Threading.Thread(() => + { + + try + { + //鍙戦�佹柊鍔犻�昏緫鍛戒护锛� + responsePackNew = Send.AddLogic(Logic.currlogic); + + } + catch { } + finally + { + Application.RunOnMainThread(() => + { + loading.Hide(); + if (responsePackNew != null && responsePackNew.Code == "0" && responsePackNew.Data.ToString() != "") + { + + + //鑾峰彇閫昏緫璇︾粏杩斿洖鏄竴涓暟缁�(object绫诲瀷杞崲涓烘暟缁�); + var jArray = Newtonsoft.Json.Linq.JArray.Parse(responsePackNew.Data.ToString()); + for (int a = 0; a < jArray.Count; a++) + { + var jay = jArray[a]; + //鏁版嵁杩斿簭鍒楀寲涓篖ogic瀵硅薄 + var str = Newtonsoft.Json.JsonConvert.SerializeObject(jay); + var logic = Newtonsoft.Json.JsonConvert.DeserializeObject<Logic>(str); + if (logic.userLogicId != "") + { + //鏇存柊浜戠鍞竴鑷姩鍖杋d; + Logic.currlogic.userLogicId = logic.userLogicId; + } + else + { + //鑷繁鐪嬬殑鎵�浠ヤ笉闇�瑕佹敮鎸佷腑鑻辨枃 + new LogicView.TipPopView().FlashingBox("娌℃湁杩斿洖浜戠鍞竴鑷姩鍖杋d"); + } + + } + + Logic.LogicList.Add(Logic.currlogic); + LogicMethod.RemoveAllView(); + MainView.MainShow(); + } + else if (responsePackNew != null && responsePackNew.Code == "14005") + { + new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.gatewayNotOnline)); + } + else + { + new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.saveFail)); + } + }); + } + + }) + { IsBackground = true }.Start(); + + }, () => { }); + + } + else + { + loading.Start(); + new System.Threading.Thread(() => + { + + try + { + //鍙戦�佷慨鏀归�昏緫鍛戒护锛� + responsePackNew = Send.UpdateLogic(Logic.currlogic); + + } + catch { } + finally + { + Application.RunOnMainThread(() => + { + loading.Hide(); + if (responsePackNew != null && responsePackNew.Code == "0") + { + LogicMethod.RemoveAllView(); + MainView.MainShow(); + } + else if (responsePackNew != null && responsePackNew.Code == "14005") + { + new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.gatewayNotOnline)); + } + else + { + new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.saveFail)); + } + }); + } + + + + }) + { IsBackground = true }.Start(); + + } + + }; + #endregion + } + + + /// <summary> + /// 婊¤冻鏉′欢 + /// </summary> + /// <param name="button">鏄剧ず鏂囨湰</param> + public void AndOrMethod(Button button) + { + + ///涔嬪墠鐨勭姸鎬佹枃鏈� + string currCondition = button.Text; + PublicInterface conditionView = new PublicInterface(); + var strList = conditionView.GetViewList("andor"); + conditionView.SingleSelectionShow(this, strList, Language.StringByID(StringId.meetTheCondition), currCondition + , (stateValue) => + { + //鐣岄潰鏄剧ず閫変腑鍊� + button.Text = stateValue; + //灏佽鏁版嵁 + if (stateValue == Language.StringByID(StringId.orCondition)) + { + Logic.currlogic.relation = "or"; + } + else + { + Logic.currlogic.relation = "and"; + } + + }); + + + } + + + } +} \ No newline at end of file diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs index 838ba08..65ad0e0 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs @@ -127,6 +127,11 @@ outputArray.Add(outputTypeJOb); } + + var noticeConfigJObject = new JObject(); + noticeConfigJObject.Add("enable", logic.noticeConfig.enable); + noticeConfigJObject.Add("noticeContent", logic.noticeConfig.noticeContent); + var pushConfigsArray = new JArray { }; if (logic.pushConfigs.Count > 0) { //聽鎺ㄩ�佹枃鏈� @@ -135,7 +140,6 @@ var pushConfigJob = new JObject { }; pushConfigJob.Add("pushMethod", pushConfig.pushMethod); - pushConfigJob.Add("pushContent", pushConfig.pushContent); var accountArray = new JArray { }; foreach (var account in pushConfig.pushTarget) { @@ -156,6 +160,7 @@ logicIfon.Add("cycle", cycleJObject); logicIfon.Add("input", inputArray); logicIfon.Add("output", outputArray); + logicIfon.Add("noticeConfig", noticeConfigJObject); logicIfon.Add("pushConfigs", pushConfigsArray); logicjArray.Add(logicIfon); var jObject = new JObject { { "homeId", LogicMethod.HomeId }, { "logics", logicjArray } }; @@ -166,14 +171,12 @@ RefreshToken(); AddLogic(logic); } - + Console.WriteLine("娣诲姞閫昏緫===" + logicjArray); } catch (Exception e) { var dd = e.Message; } - - return responsePackNew; } /// <summary> @@ -234,6 +237,10 @@ outputArray.Add(outputTypeJOb); } + var noticeConfigJObject = new JObject(); + noticeConfigJObject.Add("enable", logic.noticeConfig.enable); + noticeConfigJObject.Add("noticeContent", logic.noticeConfig.noticeContent); + var pushConfigsArray = new JArray { }; if (logic.pushConfigs.Count > 0) { //聽鎺ㄩ�佹枃鏈� @@ -242,7 +249,6 @@ var pushConfigJob = new JObject { }; pushConfigJob.Add("pushMethod", pushConfig.pushMethod); - pushConfigJob.Add("pushContent", pushConfig.pushContent); var accountArray = new JArray { }; foreach (var account in pushConfig.pushTarget) { @@ -264,6 +270,7 @@ logicIfon.Add("cycle", cycleJObject); logicIfon.Add("input", inputArray); logicIfon.Add("output", outputArray); + logicIfon.Add("noticeConfig", noticeConfigJObject); logicIfon.Add("pushConfigs", pushConfigsArray); logicjArray.Add(logicIfon); @@ -280,8 +287,6 @@ { var dd = e.Message; } - - return responsePackNew; } /// <summary> diff --git a/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs b/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs index 00152c0..4579724 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs @@ -72,7 +72,7 @@ bodyView.AddChidren(topView); //涓嶆槸A缃戝叧鎴栬�呮槸鎴愬憳 鍙厑璁告坊鍔犲満鏅殣钘忚嚜鍔ㄥ寲 - var HideAutoPage = DB_ResidenceData.Instance.GatewayType != 1|| DB_ResidenceData.Instance.CurrentRegion.IsOthreShare; + var HideAutoPage = DB_ResidenceData.Instance.CurrentRegion.IsOthreShare; //鍒ゆ柇鏄惁闇�瑕侀殣钘忚嚜鍔ㄥ寲 if (HideAutoPage) { -- Gitblit v1.8.0