FizVizController/FizVizController/Views/ViewUtility.cs
/// <summary>
/// Helper function - given a Panel, and an optional Button, set any Control children of the Panel
/// and the Button (if it isn't null) to be enabled or disabled
/// </summary>
/// <param name="controlPanel"></param>
/// <param name="button"></param>
/// <param name="commandsEnabled"></param>
Helper function - given a Panel, and an optional Button, set any Control children of the Panel
and the Button (if it isn't null) to be enabled or disabled
Helper function - given a Panel and an optional Button set any Control children of the Panel and the Button ( if it isn ' t null ) to be enabled or disabled
public static void SetUiEnabled(Panel controlPanel, Button button, bool commandsEnabled)
        {
            foreach (Control c in controlPanel.Children.OfType<Control>())
            {
                c.IsEnabled = commandsEnabled;
            }
            if (button != null)
            {
                button.IsEnabled = commandsEnabled;
            }
        }
public static void SetUiEnabled ( Panel controlPanel , Button button , bool commandsEnabled ) { foreach ( Control c in controlPanel . Children . OfType < Control > ( ) ) { c . IsEnabled = commandsEnabled ; } if ( button != null ) { button . IsEnabled = commandsEnabled ; } }
Helper function - given a Panel, and an optional Button, set any Control children of the Panel
and the Button (if it isn't null) to be enabled or disabled
Helper function - given a Panel and an optional Button set any Control children of the Panel and the Button ( if it isn ' t null ) to be enabled or disabled
controlPanel
Panel
None
button
Button
None
commandsEnabled
bool
None