Пример #1
0
        private void pingNetworkMenuItem_Click(object sender, EventArgs e)
        {
            if (listNetwork.SelectedItems.Count != 1)
                return;

            foreach (ListViewItem item in listNetwork.SelectedItems)
            {
                var remote = ((NetworkItem)item.Tag).Connection.Remote;

                if (remote != null)
                {
                    IPInfoWindow iw = new IPInfoWindow(remote.Address, IpAction.Ping);
                    iw.ShowDialog(this);
                }
            }
        }
Пример #2
0
        private void pingNetworkMenuItem_Click(object sender, EventArgs e)
        {
            if (listNetwork.SelectedItems.Count != 1)
                return;
            if (PhUtils.IsInternetConnected())
            {
                foreach (ListViewItem item in listNetwork.SelectedItems)
                {
                    var remote = ((NetworkItem)item.Tag).Connection.Remote;

                    if (remote != null)
                    {
                        IPInfoWindow iw = new IPInfoWindow(remote.Address, IpAction.Ping);
                        iw.ShowDialog(this);
                    }
                }
            }
            else
                PhUtils.ShowError("An Internet session could not be established. Please verify connectivity.");
        }