Example #1
0
        //====================================================================================================
        private void BoardDblClick(object sender, MouseEventArgs e)
        {
            txtConsole.Text = "X = " + e.X + "    Y = " + e.Y + "\r\n" + txtConsole.Text;
            const int _rad_size = 12;

            for (int i = 0; i < _objects.Count; i++)
            {
                if (_objects[i].GetType() == typeof(STA))
                {
                    STA _tsta = (STA)_objects[i];
                    if (_tsta.x >= e.X - _rad_size && _tsta.x <= e.X + _rad_size && _tsta.y >= e.Y - _rad_size &&
                        _tsta.y <= e.Y + _rad_size)
                    {
                        //txtConsole.Text = "Station selected for view :" + i.ToString() + "\r\n" + txtConsole.Text;
                        StationInfo staForm = new StationInfo(_tsta, _objects);
                        staForm.Show();
                        return;
                    }
                }
                else if (_objects[i].GetType() == typeof(AP))
                {
                    AP _tap = (AP)_objects[i];
                    if (_tap.x >= e.X - _rad_size && _tap.x <= e.X + _rad_size && _tap.y >= e.Y - _rad_size &&
                        _tap.y <= e.Y + _rad_size)
                    {
                        //txtConsole.Text = "AP selected for move :" + i.ToString() + "\r\n" + txtConsole.Text;
                        APInfo apInf = new APInfo(_tap, _objects);
                        apInf.Show();
                        return;
                    }
                }
            }
        }
Example #2
0
 //=====================================================================
 private void lblAssociatedAP_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     foreach (object t in _rfObjects)
     {
         if (t.GetType() == typeof(AP))
         {
             var tap = (AP)t;
             if (lblAssociatedAP.Text.Equals(tap.SSID))
             {
                 var apInf = new APInfo(tap, _rfObjects);
                 apInf.Show();
                 return;
             }
         }
     }
 }
 private void lblAssociatedAP_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     for (int i = 0; i < _objects.Count; i++)
     {
         if (_objects[i].GetType() == typeof(AP))
         {
             AP _tap = (AP)_objects[i];
             if (lblAssociatedAP.Text.ToString().Equals(_tap.SSID.ToString()))
             {
                 //txtConsole.Text = "AP selected for move :" + i.ToString() + "\r\n" + txtConsole.Text;
                 APInfo apInf = new APInfo(_tap, _objects);
                 apInf.Show();
                 return;
             }
         }
     }
 }
Example #4
0
        //====================================================================================================
        private void BoardDblClick(object sender, MouseEventArgs e)
        {
            txtConsole.Text = "X = " + e.X + "    Y = " + e.Y + "\r\n" + txtConsole.Text;
            const int _rad_size = 12;

            for (int i = 0; i < _objects.Count; i++)
            {
                if (_objects[i].GetType() == typeof (STA))
                {
                    STA _tsta = (STA) _objects[i];
                    if (_tsta.x >= e.X - _rad_size && _tsta.x <= e.X + _rad_size && _tsta.y >= e.Y - _rad_size &&
                        _tsta.y <= e.Y + _rad_size)
                    {
                        //txtConsole.Text = "Station selected for view :" + i.ToString() + "\r\n" + txtConsole.Text;
                        StationInfo staForm = new StationInfo(_tsta, _objects);
                        staForm.Show();
                        return;
                    }
                }
                else if (_objects[i].GetType() == typeof (AP))
                {

                    AP _tap = (AP) _objects[i];
                    if (_tap.x >= e.X - _rad_size && _tap.x <= e.X + _rad_size && _tap.y >= e.Y - _rad_size &&
                        _tap.y <= e.Y + _rad_size)
                    {
                        //txtConsole.Text = "AP selected for move :" + i.ToString() + "\r\n" + txtConsole.Text;
                        APInfo apInf = new APInfo(_tap, _objects);
                        apInf.Show();
                        return;
                    }
                }
            }
        }
Example #5
0
 //=====================================================================
 private void lblAssociatedAP_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     foreach (object t in _rfObjects)
     {
         if (t.GetType() == typeof(AP))
         {
             var tap = (AP)t;
             if (lblAssociatedAP.Text.Equals(tap.SSID))
             {
                 var apInf = new APInfo(tap, _rfObjects);
                 apInf.Show();
                 return;
             }
         }
     }
 }