public int Now_Select_Object_Is(Point ePoint) { if (_graphicsList.Count < 1) { return(-1); } for (int i = 0; i < _graphicsList.Count; i++) { Rectangle tempRect = _graphicsList[i].GetSetRectangle(); if (tempRect.Contains(ePoint) == true) { _graphicsList.UnselectAll(); return(i); } } return(-1); }
public void AddNewObject(DrawObject o) { GetSetGraphicsList.UnselectAll(); o.Selected = true; GetSetGraphicsList.Add(o); pictureBox1.Capture = true; pictureBox1.Refresh(); }