Ejemplo n.º 1
0
        /// <summary>
        /// 获取License剩余次数
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnGetRemainingCount_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.GetLicenseRemainingCount(iixServer);
                    }));
                }

                Task.WaitAll(tasks.ToArray());
            }
            catch (Exception ex)
            {
                Log.WriterExceptionLog(ex.ToString());
            }
        }