/// <summary> /// Thread safe, sets the label showing the result /// </summary> /// <param name="result"></param> public void ShowResult(string result) { if (this.ResultLabel.InvokeRequired) { var d = new ShowResultCallback(ShowResult); this.Invoke(d, new object[] { result }); } else { this.ResultLabel.Text = result; } }
public RoomReqListener(ShowResultCallback showResult, MoveToPlayCallback MoveToPlay) { mShowResultCallback = showResult; mMoveToPlay = MoveToPlay; }
public RoomReqListener(ShowResultCallback showResult, MoveToPlayCallback MoveToPlay) { mShowResultCallback = showResult; mMoveToPlay = MoveToPlay; }
public ConnectionListener(ShowResultCallback showResult, ConnectionCallback onConnectDoneCallback) { mShowResultCallback = showResult; mOnConnectDoneCallback = onConnectDoneCallback; }
public ConnectionListener(ShowResultCallback showResult) { mShowResultCallback = showResult; }
public ConnectionListener(ShowResultCallback showResult, ConnectionCallback onConnectDoneCallback) { mShowResultCallback = showResult; mOnConnectDoneCallback = onConnectDoneCallback; }
public ConnectionListener(ShowResultCallback showResult) { mShowResultCallback = showResult; }
private void showResult() { if (this.InvokeRequired) { ShowResultCallback callback = new ShowResultCallback(showResult); this.Invoke(callback); } else { try { this.StopButton.Enabled = false; this.CalcButton.Enabled = true; this.ExportResultButton.Enabled = true; MessageBox.Show(this, string.Format("计算完成,共{0}个文件", this.totalDone), "结果", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception) { } } }