public void LoadTeams() { NIM.Team.TeamAPI.QueryAllMyTeamsInfo((list) => { _actionWrapper.InvokeAction(() => { if (list != null) { for (int i = 0; i < list.Count(); i++) { UpdateTeamItem(list[i]); } } }); }); }
private void ReportInfo(long actual_upload_size, long upload_speed, string json_extension, IntPtr user_data) { _invokeWrapper.InvokeAction(() => { NosUploadData.ActualSize = actual_upload_size; NosUploadData.AvgSpeed = upload_speed; }); }
public void ShowInfo(string info) { Action action = () => { _richTextbox.AppendText(info + Environment.NewLine); _richTextbox.Select(_richTextbox.Text.Length, 0); _richTextbox.Focus(); }; _actionWrapper.InvokeAction(action); }
private void OnJoinConf(int code, string session_id, string json_extension, IntPtr user_data) { string info; if (code == 200) { info = string.Format("加入成功:\r\nsession id:{0}\r\ncustom info:{1}", session_id, json_extension); Action action = () => { sessionIdTxt.Text = session_id; }; _actionWrapper.InvokeAction(action); } else { info = string.Format("加入失败:{0} \r\n{1}", code, json_extension); } _outputTools.ShowInfo(info); }