示例#1
0
 public void LoadTeams()
 {
     NIM.Team.TeamAPI.QueryAllMyTeamsInfo((list) =>
     {
         _actionWrapper.InvokeAction(() =>
         {
             if (list != null)
             {
                 for (int i = 0; i < list.Count(); i++)
                 {
                     UpdateTeamItem(list[i]);
                 }
             }
         });
     });
 }
示例#2
0
 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;
     });
 }
示例#3
0
        public void ShowInfo(string info)
        {
            Action action = () =>
            {
                _richTextbox.AppendText(info + Environment.NewLine);
                _richTextbox.Select(_richTextbox.Text.Length, 0);
                _richTextbox.Focus();
            };

            _actionWrapper.InvokeAction(action);
        }
示例#4
0
        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);
        }