From 9189e6c3fa549717e95a4d29de890941197eee03 Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期二, 20 四月 2021 11:38:47 +0800 Subject: [PATCH] 增加二次调试开关 --- HDL_ON/UI/UI2/3-Intelligence/Automation/InputPushText.cs | 144 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 144 insertions(+), 0 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InputPushText.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InputPushText.cs new file mode 100644 index 0000000..e183494 --- /dev/null +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InputPushText.cs @@ -0,0 +1,144 @@ +锘縰sing System; +using Shared; +using System.Collections.Generic; + + +namespace HDL_ON.UI.UI2.Intelligence.Automation +{ + public class InputPushText : FrameLayout + { + public InputPushText() + { + Tag = "Logic"; + } + public Action<PushConfigs> action; + public void Show(PushConfigs pushConfigs) + { + + this.BackgroundColor = CSS.CSS_Color.viewMiddle; + LogicView.TopView topView = new LogicView.TopView(); + topView.topNameBtn.TextID = StringId.fasongtongzhi; + this.AddChidren(topView.FLayoutView()); + + FrameLayout viewLayout = new FrameLayout + { + 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 閫氱煡鍐呭 + LogicView.AddOutputInputTextView addInputTextView = new LogicView.AddOutputInputTextView(); + addInputTextView.btnIf.TextID = StringId.tongzhineirong; + viewLayout.AddChidren(addInputTextView.FLayoutView(46, 12)); + ///杈撳叆鎺ㄩ�佹枃鏈� + EditTextView textBox = new EditTextView//EditText + { + Y = Application.GetRealHeight(42), + X = Application.GetRealWidth(16), + Width = Application.GetRealWidth(343), + Height = Application.GetRealHeight(152), + TextAlignment = TextAlignment.TopLeft, + Radius=(uint)Application.GetRealHeight(12), + Text= pushConfigs.pushContent, + TextSize = LogicView.TextSize.text14, + TextColor= CSS.CSS_Color.textColor, + PlaceholderText =Language.StringByID(StringId.xianzhichangdu),//"(100瀛椾互鍐�)", + PlaceholderTextColor = CSS.CSS_Color.textCancelColor, + BackgroundColor = CSS.CSS_Color.textWhiteColor, + + }; + viewLayout.AddChidren(textBox); + textBox.TextChangeEventHandler += (sender, e) => + { + var leng = e.Length; + if (leng > 100) + { + textBox.Text = e.Substring(0,100); +#if __Android__ + textBox.SetSelectionEnd(); +#endif + + } + pushConfigs.pushContent = textBox.Text.Trim(); + + }; + #endregion + #region App鎺ㄩ�� + LogicView.LogicTypeTitleView appPush = new LogicView.LogicTypeTitleView(); + appPush.frameLayout.Y = Application.GetRealHeight(206); + appPush.frameLayout.Radius = (uint)Application.GetRealHeight(12); + appPush.btnText.TextID = StringId.apptuisong; + appPush.btnText.X = Application.GetRealWidth(12); + viewLayout.AddChidren(appPush.FLayoutView()); + appPush.btnClick.MouseUpEventHandler += (sender, e) => + { + //瀹氫箟涓�涓眬閮ㄨ处鍙峰垪琛ㄧ敤鏉ヨ褰曢�変腑鏁版嵁; + List<string> accountList = new List<string>(); + Loading loading = new Loading(); + this.AddChidren(loading); + loading.Start(); + new System.Threading.Thread(() => + { + try + { + var userList = Send.GetResidenceMemberAccount(); + for (int i = 0; i < userList.Count; i++) + { + var user = userList[i]; + accountList.Add(user.Account); + } + } + catch { } + finally + { + Application.RunOnMainThread(() => + { + loading.Hide(); + if (!string.IsNullOrEmpty(UserInfo.Current.userMobileInfo)) + { + //榛樿鎺ㄩ�佸綋鍓嶈处鍙� + accountList.Insert(0, UserInfo.Current.userMobileInfo); + } + else + { + //榛樿鎺ㄩ�佸綋鍓嶈处鍙� + accountList.Insert(0, UserInfo.Current.userEmailInfo); + } + PublicInterface view = new PublicInterface(); + view.FrameOrVvList(this, accountList, pushConfigs.pushTarget, StringId.zhanghaoxuanze + , (list) => + { + pushConfigs.pushTarget = list; + }); + }); + } + }) + { IsBackground = true }.Start(); + }; + + #endregion + #region 纭 + LogicView.SaveView saveView = new LogicView.SaveView(); + saveView.btnSave.TextID = StringId.queren; + saveView.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(24), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight); + this.AddChidren(saveView.FLayoutView()); + + topView.clickBackBtn.MouseUpEventHandler += (e, sen) => + { + + action(pushConfigs); + RemoveFromParent(); + }; + saveView.btnClick.MouseUpEventHandler += (e, sen) => + { + action(pushConfigs); + RemoveFromParent(); + }; + #endregion + + } + + } +} -- Gitblit v1.8.0