private async void CheckPingSelected(object parameter)
        {
            // add task
            processing_check_ping = true;
            TaskView task = new TaskView
            {
                Name = sr_task_ping_server,
                StopAction = null
            };
            InterfaceCtrl.AddHomeTask(task);

            // check selection items;
            IEnumerator<BaseServer> enumerator = (parameter as System.Collections.IList).Cast<BaseServer>().GetEnumerator();
            List<BaseServer> selection = new List<BaseServer>();
            while (enumerator.MoveNext())
            {
                selection.Add(enumerator.Current);
            }

            for (int i = 0; i < selection.Count; ++i)
            {
                if (!processing_check_ping)
                {
                    break;
                }

                await Task.Run(() => selection[i].UpdatePingDelay()).ConfigureAwait(true);
                task.Progress100 = i * 100 / selection.Count;
            }

            // done
            processing_check_ping = false;
            InterfaceCtrl.RemoveHomeTask(task);
            CommandManager.InvalidateRequerySuggested();
        }
        private async void CheckPingAll(object parameter)
        {
            // add task
            processing_check_ping = true;
            TaskView task = new TaskView
            {
                Name = sr_task_ping_server,
                StopAction = () => { processing_check_ping = false; }
            };
            InterfaceCtrl.AddHomeTask(task);

            // run
            IEnumerator<BaseServer> enumerator = Servers.GetEnumerator();
            int count = Servers.Count();
            int timeout = SettingManager.Configuration.TimeoutPing;

            using (Ping pingSender = new Ping())
            {
                int complete = 0;
                enumerator.Reset();
                while (enumerator.MoveNext())
                {
                    // isPingInProcess is also use to cancel task
                    if (processing_check_ping == false)
                    {
                        break;
                    }

                    BaseServer server = enumerator.Current;
                    try
                    {
                        PingReply reply = await pingSender.SendPingAsync(server.HostAddress, timeout).ConfigureAwait(true);
                        server.PingDelay = (reply.Status == IPStatus.Success) ? reply.RoundtripTime : -1;
                    }
                    catch
                    {
                        server.PingDelay = -1;
                    }

                    task.Progress100 = ++complete * 100 / count;
                }

                enumerator.Dispose();
            }

            // done
            processing_check_ping = false;
            InterfaceCtrl.RemoveHomeTask(task);
            CommandManager.InvalidateRequerySuggested();
        }