BatchGuy.App.Extensions.ExtensionMethods.SetEnabled C# (CSharp) Method

SetEnabled() public static method

public static SetEnabled ( this control, bool enabled ) : void
control this
enabled bool
return void
        public static void SetEnabled(this Control control, bool enabled)
        {
            control.Enabled = enabled;
            if (enabled)
            {
                control.Cursor = Cursors.Default;
            }
            else
            {
                control.Cursor = Cursors.WaitCursor;
            }
        }