old mode 100755
new mode 100644
| | |
| | | txtInput.PlaceholderText = Language.StringByID(R.MyInternationalizationString.uYouSuggestionMsg);
|
| | | frameInput.AddChidren(txtInput);
|
| | | txtInput.InitIosPlaceholderUILabelWithHeight(Application.GetRealHeight(60));
|
| | | txtInput.TextChangeEventHandler += (sender, txtvalue) =>
|
| | | //输入值改变事件
|
| | | Action<View, string> txtInputChangedEvent = (sender, txtValue) =>
|
| | | {
|
| | | if (this.suggestionCount <= 0)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | int length = txtvalue.Length;
|
| | | var newValue = txtValue;
|
| | | //如果输入的值,已经大于指定的数,则截取
|
| | | if (newValue.Length > 500)
|
| | | {
|
| | | //截取指定的byte字节
|
| | | newValue = newValue.Substring(0, 500);
|
| | | txtInput.Text = newValue;
|
| | | #if Android
|
| | | //将光标至于最后
|
| | | txtInput.SetSelectionEnd();
|
| | | #endif
|
| | | }
|
| | |
|
| | | int length = newValue.Length;
|
| | | if (length == 0)
|
| | | {
|
| | | if (btnSubmit.CanClick == true) { btnSubmit.CanClick = false; }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (btnSubmit.CanClick == false) |
| | | if (btnSubmit.CanClick == false)
|
| | | {
|
| | | //变灰色字体
|
| | | btnFild.TextColor = UserCenterColor.Current.TextGrayColor1;
|
| | |
| | | }
|
| | | }
|
| | | btnFild.Text = (500 - length).ToString();
|
| | |
|
| | | if (length > 500)
|
| | | {
|
| | | if (btnSubmit.CanClick == true) |
| | | { |
| | | btnSubmit.CanClick = false;
|
| | | //变红色字体
|
| | | btnFild.TextColor = Common.ZigbeeColor.Current.GXCTextRed;
|
| | | }
|
| | | }
|
| | | };
|
| | | txtInput.TextChangeEventHandler += txtInputChangedEvent;
|
| | | |
| | | var framType = new FrameLayout();
|
| | | framType.Height = Application.GetRealHeight(150);
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | #endregion
|
| | | #endregion
|
| | |
|
| | | #region ■ 上传意见___________________________
|
| | | #region ■ 上传意见___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 上传意见
|
| | |
| | | });
|
| | | }
|
| | |
|
| | | #endregion
|
| | | #endregion
|
| | | }
|
| | | }
|