Windows Mobile 6 UI更新问题
|
我有一个用C#编写的Windows Mobile应用程序,其中包含更多对话框。我想在触发事件时更新对话框。这是代码:
public void ServerStateChanged()
{
// update the interface
try
{
if (this.Focused)
{
this.noConnectionsLL.Text = this.tcpServer.ClientsCount.ToString();
}
}
catch (Exception exc)
{
}
}
该代码工作了几次,但随后我得到了这个带有堆栈跟踪的System.NotSupportedException
:at Microsoft.AGL.Common.MISC.HandleAr()\\r\\nat System.Windows.Forms.Control.get_Focused()\\r\\nat DialTester.Communication.TCPServerView.ServerStateChanged()\\r\\nat ...
从哪个线程触发事件有关系吗?因为我无法弄清楚问题出在哪里,为什么它工作几次,然后崩溃。
没有找到相关结果
已邀请:
2 个回复
稀瓣囊
并作出相应反应肯定可以提高功能的安全性。像这样:
掀辟髓观粟