public void Click() { bool doubleClicked = timeSinceLastClicked < 0.5f; if (Child.State == Child.ChildState.kAlive) { if (Child.IsSelected && !doubleClicked) { ChildManager.DeselectChild(Child); } else { // If we double click, we must always select the child otherwise the data dialog will have nothing to show ChildManager.SelectChild(Child); } if (doubleClicked) { dataDialog.Show(Child); } } timeSinceLastClicked = 0; }