mirror of https://github.com/quasar/Quasar.git
Compacted Builder method
Compacted the validation on frmBuilder's btnBuild_Click(object, EventArgs) method. This is a slight optimization, but it does help remove the repetitive else statements.
This commit is contained in:
parent
d5cb5b9c92
commit
e720d20811
|
@ -202,11 +202,10 @@ namespace xServer.Forms
|
||||||
|
|
||||||
private void btnBuild_Click(object sender, EventArgs e)
|
private void btnBuild_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(txtHost.Text) && !string.IsNullOrEmpty(txtPort.Text) && !string.IsNullOrEmpty(txtDelay.Text) && !string.IsNullOrEmpty(txtPassword.Text) && !string.IsNullOrEmpty(txtMutex.Text))
|
if (!string.IsNullOrEmpty(txtHost.Text) && !string.IsNullOrEmpty(txtPort.Text) && !string.IsNullOrEmpty(txtDelay.Text) && // Connection Information
|
||||||
{
|
!string.IsNullOrEmpty(txtPassword.Text) && !string.IsNullOrEmpty(txtMutex.Text) && // Client Options
|
||||||
if (!chkInstall.Checked || (chkInstall.Checked && !string.IsNullOrEmpty(txtInstallname.Text) && !string.IsNullOrEmpty(txtInstallsub.Text)))
|
!chkInstall.Checked || (chkInstall.Checked && !string.IsNullOrEmpty(txtInstallname.Text) && !string.IsNullOrEmpty(txtInstallsub.Text)) && // Installation Options
|
||||||
{
|
!chkStartup.Checked || (chkStartup.Checked && !string.IsNullOrEmpty(txtRegistryKeyName.Text))) // Persistence and Registry Features
|
||||||
if (!chkStartup.Checked || (chkStartup.Checked && !string.IsNullOrEmpty(txtRegistryKeyName.Text)))
|
|
||||||
{
|
{
|
||||||
string output = string.Empty;
|
string output = string.Empty;
|
||||||
string icon = string.Empty;
|
string icon = string.Empty;
|
||||||
|
@ -265,12 +264,6 @@ namespace xServer.Forms
|
||||||
else
|
else
|
||||||
MessageBox.Show("Please fill out all required fields!", "Builder", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
MessageBox.Show("Please fill out all required fields!", "Builder", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
MessageBox.Show("Please fill out all required fields!", "Builder", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
MessageBox.Show("Please fill out all required fields!", "Builder", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
||||||
}
|
|
||||||
|
|
||||||
private int GetInstallPath()
|
private int GetInstallPath()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue