BBDInstaller/BandagedBD/Controls/Button.cs

34 lines
876 B
C#
Raw Normal View History

2018-10-29 07:15:48 +01:00
namespace BandagedBD.Controls {
public partial class Button : System.Windows.Forms.Button {
public Button HideDisable(string newText = null) {
if (newText != null) Text = newText;
Hide();
Enabled = false;
return this;
}
public Button HideEnable(string newText = null) {
if (newText != null) Text = newText;
Hide();
Enabled = true;
return this;
}
public Button ShowDisable(string newText = null) {
if (newText != null) Text = newText;
Show();
Enabled = false;
return this;
}
public Button ShowEnable(string newText = null) {
if (newText != null) Text = newText;
Show();
Enabled = true;
return this;
}
}
}