| | |
| | | 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(); |
| | | } |
| | | }; |
| | |
| | | }; |
| | | |
| | | |
| | | //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();
|
| | | //};
|
| | | |
| | | |
| | | } |
| | | } |