Ejemplo n.º 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;
                    }
                }
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Open Station Form Info by selected MAC address
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void listStations_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     for (int i = 0; i < _objects.Count; i++)
     {
         if (_objects[i].GetType() == typeof(STA))
         {
             STA _tsta = (STA)_objects[i];
             if (_tsta.getMACAddress().Equals(listStations.Text))
             {
                 StationInfo staForm = new StationInfo(_tsta, _objects);
                 staForm.Show();
                 return;
             }
         }
     }
 }
Ejemplo n.º 3
0
 private void listStations_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     for (int i = 0; i < _objects.Count; i++)
     {
         if (_objects[i].GetType() == typeof(STA))
         {
             STA _tsta = (STA)_objects[i];
             if (_tsta.getMACAddress().Equals(listStations.Text))
             {
                 //txtConsole.Text = "Station selected for view :" + i.ToString() + "\r\n" + txtConsole.Text;
                 StationInfo staForm = new StationInfo(_tsta, _objects);
                 staForm.Show();
                 return;
             }
         }
     }
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Open Station Form Info by selected MAC address
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void listStations_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     for (int i = 0; i < _objects.Count; i++){
         if (_objects[i].GetType() == typeof (STA)){
             STA _tsta = (STA) _objects[i];
             if (_tsta.getMACAddress().Equals(listStations.Text))
             {
                 StationInfo staForm = new StationInfo(_tsta,_objects);
                 staForm.Show();
                 return;
             }
         }
     }
 }
Ejemplo n.º 5
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;
                    }
                }
            }
        }