public override bool OnMouseClick(Vector2 position, MouseButton button) { if (!enabled) { return(false); } if (entrance != -1 && handler != null) { if (handler.OnClickEntrance(entrance, button)) { return(true); } } IMapObject mostTopObj = null; foreach (Maps.IMapViewOverlay overlay in overlays) { IMapObject obj = overlay.GetObjectAt(position - ScrollPosition); if (obj != null) { mostTopObj = obj; } } if (mostTopObj != null) { if (ClickObject != null) { ClickObject.Invoke(this, new ObjectArgs(mostTopObj, position, button)); } return(true); } if (mouseClickEvent != null && button == MouseButton.Left) { mouseClickEvent.Execute(position - ScrollPosition, button); return(true); } return(false); }
private void AddDepartmentButton_Click(object sender, EventArgs e) { ClickObject?.Invoke(this, EventArgs.Empty); }
private void AddExecutiveButton_Click(object sender, EventArgs e) { ClickObject?.Invoke(this, EventArgs.Empty); }