コード例 #1
0
        /// <summary>
        /// 关闭连接
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnDisconnect_Click(object sender, EventArgs e)
        {
            try
            {
                var tasks = new List <Task>();

                foreach (var iixServer in Global.ListIIXSerevr)
                {
                    if (iixServer.IsEnable == false)
                    {
                        continue;
                    }

                    tasks.Add(Task.Factory.StartNew(() =>
                    {
                        IIXExecute.Disconnect(iixServer);
                    }));
                }
            }
            catch (Exception ex)
            {
                Log.WriterExceptionLog(ex.ToString());
            }
        }