From 244e76efe44273434e1d0b2db8bea50c9f221677 Mon Sep 17 00:00:00 2001 From: WJC <wjc@hdlchina.com.cn> Date: 星期五, 03 一月 2020 11:22:14 +0800 Subject: [PATCH] 2020-01-03-01 --- ZigbeeApp/Home.Ios/Resources/Language.ini | 2 ZigbeeApp/Shared/Phone/Device/Logic/CustomText.cs | 64 +++++++++----------- ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml | 45 +++++++++++++- ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs | 1 ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicCommunalPage.cs | 4 + ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs | 5 + ZigbeeApp/Shared/Phone/Device/Category/Category.cs | 6 + ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs | 4 + 8 files changed, 89 insertions(+), 42 deletions(-) diff --git a/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml b/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml index fec5d63..0374469 100644 --- a/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml +++ b/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml @@ -1,15 +1,52 @@ 锘�<Properties StartupConfiguration="{F1296E2C-3777-4385-85B2-DA77617E3178}|Default"> <MonoDevelop.Ide.ItemProperties.GateWay.Droid PreferredExecutionTarget="Android.SelectDevice" /> <MonoDevelop.Ide.ItemProperties.ShardLib PreferredExecutionTarget="Android.SelectDevice" /> - <MonoDevelop.Ide.Workbench ActiveDocument="Shared/Common/ZigbeeColor.cs"> + <MonoDevelop.Ide.Workbench ActiveDocument="Home.Ios/Resources/Language.ini"> <Files> - <File FileName="Shared/Phone/Device/Logic/CustomText.cs" Line="94" Column="66" /> - <File FileName="GateWay.Droid/Application.cs" Line="187" Column="16" /> + <File FileName="Shared/Phone/Device/Logic/CustomText.cs" Line="171" Column="9" /> + <File FileName="GateWay.Droid/Application.cs" /> <File FileName="Home.Ios/AppDelegate.cs" /> - <File FileName="Shared/Common/CommonPage.cs" Line="41" Column="51" /> + <File FileName="Shared/Common/CommonPage.cs" /> <File FileName="Shared/Phone/UserCenter/Suggestion/FeedbackForm.cs" /> <File FileName="Shared/Common/ZigbeeColor.cs" Line="315" Column="40" /> + <File FileName="Shared/Phone/Device/Logic/LogicCommunalPage.cs" Line="2017" Column="14" /> + <File FileName="Shared/Phone/Device/Logic/Send.cs" Line="1142" Column="20" /> + <File FileName="Shared/Phone/Device/Logic/DoorLockLogic/LockLogicCommunalPage.cs" Line="1089" Column="17" /> + <File FileName="Shared/Phone/Device/Logic/TemplatePage.cs" Line="88" Column="23" /> + <File FileName="Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs" Line="85" Column="62" /> + <File FileName="Shared/Phone/Device/Category/Category.cs" Line="725" Column="114" /> + <File FileName="Shared/R.cs" Line="580" Column="54" /> + <File FileName="Home.Ios/Resources/Language.ini" Line="610" Column="5" /> </Files> + <Pads> + <Pad Id="ProjectPad"> + <State name="__root__"> + <Node name="GateWay" expanded="True"> + <Node name="GateWay.Droid" expanded="True"> + <Node name="Assets" expanded="True" /> + </Node> + <Node name="Home.IOS" expanded="True"> + <Node name="Resources" expanded="True"> + <Node name="Language.ini" selected="True" /> + </Node> + </Node> + <Node name="Shared" expanded="True"> + <Node name="Phone" expanded="True"> + <Node name="Device" expanded="True"> + <Node name="Category" expanded="True" /> + <Node name="Logic" expanded="True"> + <Node name="DoorLockLogic" expanded="True" /> + </Node> + </Node> + <Node name="UserCenter" expanded="True"> + <Node name="Suggestion" expanded="True" /> + </Node> + </Node> + </Node> + </Node> + </State> + </Pad> + </Pads> </MonoDevelop.Ide.Workbench> <MonoDevelop.Ide.ItemProperties.Home.IOS automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.913cb77b0eef11c9119c61a02bc00fec01bf67d6" /> <MonoDevelop.Ide.DebuggingService.PinnedWatches /> diff --git a/ZigbeeApp/Home.Ios/Resources/Language.ini b/ZigbeeApp/Home.Ios/Resources/Language.ini index b77531f..c0ad20d 100755 --- a/ZigbeeApp/Home.Ios/Resources/Language.ini +++ b/ZigbeeApp/Home.Ios/Resources/Language.ini @@ -607,7 +607,7 @@ 5370=璇烽�夋嫨鐢ㄦ埛锛屽惁鍒欐棤娉曟墽琛屼笅涓�姝�. 5371=璇烽�夋嫨鍦烘櫙锛屽惁鍒欐棤娉曟墽琛屼笅涓�姝�. 5372=璇烽�夋嫨瀹夐槻妯″紡锛屽惁鍒欐棤娉曟墽琛屼笅涓�姝�. -5373=鑷姩鍖栧凡鎵ц. +5373=宸叉墽琛�. 5374=娣诲姞浼犳劅鍣� 5375=娣诲姞寮�鍏�/鐏厜 5376=搴旂敤 diff --git a/ZigbeeApp/Shared/Phone/Device/Category/Category.cs b/ZigbeeApp/Shared/Phone/Device/Category/Category.cs index dd77780..68a8e4c 100644 --- a/ZigbeeApp/Shared/Phone/Device/Category/Category.cs +++ b/ZigbeeApp/Shared/Phone/Device/Category/Category.cs @@ -722,8 +722,8 @@ //new涓�涓柊閫昏緫瀵硅薄锛� Common.Logic.CurrentLogic = new Common.Logic(); Common.Logic.CurrentLogic.IsEnable = 1;//榛樿涓哄紑 - Common.Logic.CurrentLogic.LogicCustomPushText = Language.StringByID(MyInternationalizationString.defaulttext); Common.Logic.CurrentLogic.LogicName = Language.StringByID(MyInternationalizationString.automation1); + Common.Logic.CurrentLogic.LogicCustomPushText =Common.Logic.CurrentLogic.LogicName+Language.StringByID(MyInternationalizationString.defaulttext); var addLogicPage = new Shared.Phone.Device.Logic.AddLogicPage(); UserView.HomePage.Instance.AddChidren(addLogicPage); UserView.HomePage.Instance.PageIndex += 1; @@ -1875,7 +1875,8 @@ Common.Logic.CurrentLogic.IsEnable = 1;//榛樿涓哄紑 if (logiciocnBtn.Tag.ToString() == "3") { - Common.Logic.CurrentLogic.LogicName = logicnameBtn.Text;// Language.StringByID(MyInternationalizationString.automation1); + Common.Logic.CurrentLogic.LogicName = logicnameBtn.Text; + Common.Logic.CurrentLogic.LogicCustomPushText = Common.Logic.CurrentLogic.LogicName + Language.StringByID(MyInternationalizationString.defaulttext); var addLogicPage = new Logic.AddLogicPage(); HomePage.Instance.AddChidren(addLogicPage); HomePage.Instance.PageIndex += 1; @@ -1885,6 +1886,7 @@ { Common.Logic.CurrentLogic.LogicName = logicnameBtn.Text; + Common.Logic.CurrentLogic.LogicCustomPushText = Common.Logic.CurrentLogic.LogicName + Language.StringByID(MyInternationalizationString.defaulttext); Logic.TemplatePage templatePage = new Logic.TemplatePage(); Logic.TemplatePage.s = logiciocnBtn.Tag.ToString(); HomePage.Instance.AddChidren(templatePage); diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/CustomText.cs b/ZigbeeApp/Shared/Phone/Device/Logic/CustomText.cs index 0f27e05..84aaeb7 100644 --- a/ZigbeeApp/Shared/Phone/Device/Logic/CustomText.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/CustomText.cs @@ -94,16 +94,43 @@ Text = "50", }; middle.AddChidren(textBtn); + string s1 = ""; + string s2 = ""; textBox.TextChangeEventHandler += (sender, e) => { var leng = e.Length; if (leng > 50) { var substring = e.Substring(0, 50); - textBox.Text = substring; + s1 = substring; + if (s1 == s2) + { + s2 = s1; + } + else + { + if (s2 == "") + { + s2 = s1; + } + else + { + s1 = s2; + } + } + textBox.Text = s2; } else { + if (leng == 50) + { + s2 = e.Substring(0, 50); + } + else + { + s1 = ""; + s2 = ""; + } textBtn.Text = (50 - leng).ToString(); } }; @@ -141,40 +168,7 @@ }; - //var txtInput = new EditTextView(); - //txtInput.Width = bodyFrameLayout.Width - ControlCommonResourse.XXLeft * 2; - //txtInput.Height = Application.GetRealHeight(470); - //txtInput.Y = Application.GetRealHeight(32); - //txtInput.TextAlignment = TextAlignment.TopLeft; - //txtInput.Gravity = Gravity.CenterHorizontal; - //txtInput.TextColor = UserCenterColor.Current.TextColor1; - //txtInput.PlaceholderTextColor = UserCenterColor.Current.TextGrayColor1; - //txtInput.PlaceholderText = Language.StringByID(R.MyInternationalizationString.uYouSuggestionMsg); - //frameInput.AddChidren(txtInput); - //txtInput.TextChangeEventHandler += (sender, txtvalue) => - //{ - // if (this.suggestionCount <= 0) - // { - // return; - // } - - // int length = txtvalue.Length; - // if (length > 500) - // { - // if (btnSubmit.CanClick == true) { btnSubmit.CanClick = false; } - // btnFild.Text = "0"; - // return; - // } - // if (length == 0) - // { - // if (btnSubmit.CanClick == true) { btnSubmit.CanClick = false; } - // } - // else - // { - // if (btnSubmit.CanClick == false) { btnSubmit.CanClick = true; } - // } - // btnFild.Text = (500 - length).ToString(); - //}; + } } diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicCommunalPage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicCommunalPage.cs index 414d4df..f594023 100644 --- a/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicCommunalPage.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicCommunalPage.cs @@ -1082,11 +1082,15 @@ }; if (Common.Logic.CurrentLogic.LogicIsCustomPushText == 0) { + tag = false; btnswitch.IsSelected = false; + custompushFrameLayout.Height = Application.GetRealHeight(0); } else { + tag = true; btnswitch.IsSelected = true; + custompushFrameLayout.Height = Application.GetRealHeight(160); } var saveFrameLayout = new FrameLayout { diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs index 103104f..bdb9583 100644 --- a/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs @@ -83,6 +83,7 @@ Common.Logic.CurrentLogic.LogicType = 1; Common.Logic.CurrentLogic.Relationship = 1; Common.Logic.CurrentLogic.LogicName = Language.StringByID(MyInternationalizationString.automation1); + Common.Logic.CurrentLogic.LogicCustomPushText = Common.Logic.CurrentLogic.LogicName + Language.StringByID(MyInternationalizationString.defaulttext); var lockLogicCommunalPage = new LockLogicCommunalPage(); UserView.HomePage.Instance.AddChidren(lockLogicCommunalPage); UserView.HomePage.Instance.PageIndex += 1; diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs index 8d5a0a6..cab5da2 100644 --- a/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs @@ -2002,13 +2002,18 @@ } Send.Zj(tag,Common.Logic.CurrentLogic); }; + if (Common.Logic.CurrentLogic.LogicIsCustomPushText == 0) { + tag = false; btnswitch.IsSelected = false; + custompushFrameLayout.Height = Application.GetRealHeight(0); } else { + tag = true; btnswitch.IsSelected = true; + custompushFrameLayout.Height = Application.GetRealHeight(160); } #endregion diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs index d84baec..9231d7a 100644 --- a/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs @@ -1213,11 +1213,15 @@ }; if (Common.Logic.CurrentLogic.LogicIsCustomPushText == 0) { + tag = false; btnswitch.IsSelected = false; + custompushFrameLayout.Height = Application.GetRealHeight(0); } else { + tag = true; btnswitch.IsSelected = true; + custompushFrameLayout.Height = Application.GetRealHeight(160); } var saveFrameLayout = new FrameLayout { -- Gitblit v1.8.0