ButtonPosition GetButtonMouseOn(Control sender, int screenX = 0, int screenY = 0) { for (int i = 0; i < _buttonList.Length; i++) { if (CoodinateHandling.isEntered(_buttonList[i], screenX, screenY)) { return(_buttonPosList[i]); } } return(ButtonPosition.NotOnTheButton); }
IconCenter.ButtonPosition checkIfOverCenterBtns() { // Point pt = CoodinateHandling.FromScreenToClient(, , _iconCenter); for (int i = 0; i < _iconCenter._buttonList.Length; i++) { if (CoodinateHandling.isEntered(_iconCenter._buttonList[i])) { return(_iconCenter._buttonPosList[i]); } } return(IconCenter.ButtonPosition.NotOnTheButton); }
internal void Dragging(DockingContainer movingObj, int x, int y) { int maxDepth = 0; int depth; DockingContainer selectedSuccessor = null; this.Invalidate(); foreach (DockingContainer d in _successors.Values) { //for (int i = 0; i < _successors.Count; i++) //{ if (CoodinateHandling.isEntered(d, 0, 0) && d.isInPopup() == false) { if ((depth = d.getDepth()) > maxDepth) { maxDepth = depth; selectedSuccessor = d; } } } if (maxDepth > 0) { Rectangle rect = CoodinateHandling.FromClientToClient(selectedSuccessor, this); Point center = CoodinateHandling.getCenter(rect, _iconCenter.Width, _iconCenter.Height); ShowSelection(checkIfOverCenterBtns(), selectedSuccessor, movingObj); _iconCenter.SetBounds(center.X, center.Y, 0, 0, BoundsSpecified.Location); _iconCenter.Show(); _iconCenter.BringToFront(); _iconCenter.label1.Text = "" + selectedSuccessor.getDepth() + "/" + selectedSuccessor.Name + "/" + selectedSuccessor.getContainerType().ToString(); } else { _selection.Hide(); } }
internal Boolean isHotArea(int x, int y) { return(CoodinateHandling.isEntered(this, x, y)); }