| | |
| | | bodyFrameLayout.AddChidren(frameInput); |
| | | |
| | | //字数
|
| | | var btnFild = new NormalViewControl(120, 60, true);
|
| | | btnFild.X = frameInput.Width - ControlCommonResourse.XXLeft - Application.GetRealWidth(120);
|
| | | var btnFild = new NormalViewControl(150, 60, true);
|
| | | btnFild.X = frameInput.Width - ControlCommonResourse.XXLeft - Application.GetRealWidth(150);
|
| | | btnFild.Y = Application.GetRealHeight(503);
|
| | | btnFild.TextColor = UserCenterColor.Current.TextGrayColor1;
|
| | | btnFild.TextSize = 12;
|
| | |
| | | }
|
| | |
|
| | | 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; }
|
| | | if (btnSubmit.CanClick == false) |
| | | {
|
| | | //变灰色字体
|
| | | btnFild.TextColor = UserCenterColor.Current.TextGrayColor1;
|
| | | btnSubmit.CanClick = true;
|
| | | }
|
| | | }
|
| | | btnFild.Text = (500 - length).ToString();
|
| | |
|
| | | if (length > 500)
|
| | | {
|
| | | if (btnSubmit.CanClick == true) |
| | | { |
| | | btnSubmit.CanClick = false;
|
| | | //变红色字体
|
| | | btnFild.TextColor = Common.ZigbeeColor.Current.GXCTextRed;
|
| | | }
|
| | | }
|
| | | };
|
| | | |
| | | var framType = new FrameLayout();
|
| | |
| | | btnType.TextID = R.MyInternationalizationString.uSuggestionType;
|
| | | framType.AddChidren(btnType);
|
| | | //Bug
|
| | | var frameBug = new FrameLayoutControl();
|
| | | var frameBug = new FrameLayoutStatuControl();
|
| | | frameBug.UseClickStatu = false;
|
| | | frameBug.Width = Application.GetRealWidth(200);
|
| | | frameBug.X = Application.GetRealWidth(314);
|
| | |
| | | }
|
| | | };
|
| | | //优化
|
| | | var frameOptimization = new FrameLayoutControl();
|
| | | var frameOptimization = new FrameLayoutStatuControl();
|
| | | frameOptimization.UseClickStatu = false;
|
| | | frameOptimization.Width = Application.GetRealWidth(200);
|
| | | frameOptimization.X = Application.GetRealWidth(524);
|
| | |
| | | }
|
| | | };
|
| | | //新需求
|
| | | var frameDemand = new FrameLayoutControl();
|
| | | var frameDemand = new FrameLayoutStatuControl();
|
| | | frameDemand.UseClickStatu = false;
|
| | | frameDemand.Width = Application.GetRealWidth(200);
|
| | | frameDemand.X = Application.GetRealWidth(734);
|
| | |
| | | frameEmail.BackgroundColor = UserCenterColor.Current.White;
|
| | | frameEmail.Y = framType.Bottom + Application.GetRealHeight(23);
|
| | | bodyFrameLayout.AddChidren(frameEmail);
|
| | | //邮箱地址
|
| | | var btnEmail = new NormalViewControl(220, 60, true);
|
| | | btnEmail.X = ControlCommonResourse.XXLeft;
|
| | | btnEmail.Gravity = Gravity.CenterVertical;
|
| | | btnEmail.TextID = R.MyInternationalizationString.uEmailAddress;
|
| | | frameEmail.AddChidren(btnEmail);
|
| | | var txtEmail = new TextInputControl(500, 60, true);
|
| | | //联系方式
|
| | | var btnContact = new NormalViewControl(220, 60, true);
|
| | | btnContact.X = ControlCommonResourse.XXLeft;
|
| | | btnContact.Gravity = Gravity.CenterVertical;
|
| | | btnContact.TextID = R.MyInternationalizationString.uContactInformation;
|
| | | frameEmail.AddChidren(btnContact);
|
| | | var txtEmail = new TextInputControl(720, 60, true);
|
| | | txtEmail.X = Application.GetRealWidth(314);
|
| | | txtEmail.Gravity = Gravity.CenterVertical;
|
| | | txtEmail.PlaceholderText = Language.StringByID(R.MyInternationalizationString.uPleaseInputYouEmailAddress);
|
| | | txtEmail.PlaceholderText = Language.StringByID(R.MyInternationalizationString.uPleaseInputYourContactInformation);
|
| | | frameEmail.AddChidren(txtEmail);
|
| | |
|
| | | //提交
|
| | |
| | | btnSubmit.CanClick = false;
|
| | | btnSubmit.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //如果是虚拟住宅,则此功能无效
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | return;
|
| | | }
|
| | | //上传意见
|
| | | this.UploadSuggestion(txtInput.Text, txtEmail.Text);
|
| | | };
|