BetterDiscordApp-v2/Installers/dotNet2/BetterDiscordWI/controls/Button.cs

37 lines
952 B
C#

namespace BetterDiscordWI.controls {
public partial class Button : System.Windows.Forms.Button {
public Button() {
InitializeComponent();
}
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;
}
}
}