Smobiler上海石磨_.NET移动开发平台
标题:
TextBox焦点切后TouchLeave事件换引起的“请稍候”提示框问题。
[打印本页]
作者:
no8chat
时间:
2019-12-23 15:02
标题:
TextBox焦点切后TouchLeave事件换引起的“请稍候”提示框问题。
TextBox的TouchLeave事件中更新赋值了Label的Text属性。
打包版的APP中会出现”请稍候“提示框,影响体验。开发版的APP不会出现。
附件中我上传了2个版本的操作视频。
TextBox的TouchLeave事件代码如下:
private void txtAmount_TouchLeave(object sender, EventArgs e)
{
string Amount = txtAmount.Text;
if (Amount != oldAmount)
{
if (Amount == "" || Amount == "0" || Amount == "0.0")
{
txtAmount.Text = oldAmount;
}
else
{
handleUI();
}
}
}
private void handleUI()
{
string WholePackRate = txtWholePackRate.Text;
string WholeAmount = txtWholeAmount.Text;
string Amount = txtAmount.Text;
if (string.IsNullOrEmpty(WholePackRate) || string.IsNullOrEmpty(Amount))
return;
double dWholePackRate = 0, dAmount = 0;
bool bFlag = double.TryParse(WholePackRate, out dWholePackRate);
if (!bFlag) return;
bFlag = double.TryParse(Amount, out dAmount);
if (!bFlag) return;
string s = Math.Ceiling(dAmount / dWholePackRate).ToString();
txtWholeAmount.Text = s;
if (lblTaskState.Text == "未执行")
{
lblTaskState.ForeColor = System.Drawing.Color.Red;
}
}
[attach]1767[/attach][attach]1766[/attach]https://www.smobiler.com/forum.php?mod=attachment&aid=MTc2N3wwYWZlN2MwMmJkYzUyZGQ1MTJkYmM3MDk3MWQ3MmRiM3wxNzQ2MTE1MzE4&request=yes&_f=.rarattach://1766.rar
作者:
neil
时间:
2019-12-24 11:16
这边测试使用你提供的handleUI()方法,并未发生loading,是否是你这边更新了更多的内容.
欢迎光临 Smobiler上海石磨_.NET移动开发平台 (https://www.smobiler.com/)
Powered by Discuz! X3.2