Say I have a WPF Form for managing the training and evaluation of employees for the Fork Lift (FL) and other equipment (using SQL/LINQ). I have it setup so when the check box for Training is checked, it makes the Textbox (for entering the date) and the check box for evaluation become Visible and vice versa.
Is there a way to make it so I can use a general "Checked" method based on which training check box I click as apposed to copy pasting it for each piece of equipment?
(FLT is Fork Life Training and FLE is Evaluation)
private void Checked(object sender, RoutedEventArgs e)
{
FLT_txt.Visibility = Visibility.Visible;
FLE_ck.Visibility = Visibility.Visible;
}
//Basically a reverse of the above, just here for example's sake
private void Unchecked(object sender, RoutedEventArgs e)
{
FLT_txt.Visibility = Visibility.Hidden;
FLE_ck.Visibility = Visibility.Hidden;
}
I hope I didn't make that confusing.