DeploymentTracker.App.Windows.AppConfigManager.BtnSave_Click C# (CSharp) Method

BtnSave_Click() private method

Handles the Click event of the btnSave control.
private BtnSave_Click ( object sender, EventArgs e ) : void
sender object The source of the event.
e EventArgs The instance containing the event data.
return void
        private void BtnSave_Click(object sender, EventArgs e)
        {
            try
            {
                // Check
                txtAppLogFolder.Text.VerifyNotNull("Application Log directory value", "Application Log directory value cannot be empty");
                txtDeploymentLogFolder.Text.VerifyNotNull("Deployment Log directory value", "Deployment Log directory value cannot be empty");
                txtTFSWorkingFolder.Text.VerifyNotNull("TFS Working path value", "TFS Working path value cannot be empty");
                txtParallelTasks.Text.VerifyInteger("Invalid MaxSesion permitted value");
                txtParallelTasks.Text.VerifyGreaterThanZero("Number of tasks should be greater than zero");
                txtNumberOfTries.Text.VerifyInteger("Invalid Number of tries value");
                txtNumberOfTries.Text.VerifyGreaterThanZero("Number of tries should be greater than zero");
                txtAzurePublishSettings.Text.VerifyNotNull("Azure publish Settings.", "Azure publishSettings Url cannot be empty");
                txtAzurePublishSettings.Text.VerifyUri(string.Format("Invalid Azure publishSettings Url : {0}", txtAzurePublishSettings.Text));
                txtAppLogFolder.Text.VerifyPath("Invalid path value Application Log directory");
                txtDeploymentLogFolder.Text.VerifyPath("Invalid path value Deployment Log Path");
                txtTFSWorkingFolder.Text.VerifyPath("Invalid path value TFS Working Path");

                // Save
                Settings.Default.ApplicationLogPath = txtAppLogFolder.Text;
                Settings.Default.AzurePublishSettingsDownloadLink = txtAzurePublishSettings.Text;
                Settings.Default.DeploymentLogPath = txtDeploymentLogFolder.Text;
                Settings.Default.MaxSessionsPermitted = txtParallelTasks.Text;
                Settings.Default.NumberOfTries = txtNumberOfTries.Text;
                Settings.Default.TFSWorkingPath = txtTFSWorkingFolder.Text;
                Settings.Default.Save();
                "Configurations saved successfully".ShowUIInformation();
            }
            catch (FormatException ex)
            {
                ex.ShowUIException();
            }
            catch (ArgumentNullException ex)
            {
                ex.ShowUIException();
            }
            catch (ArgumentException ex)
            {
                ex.ShowUIException();
            }
        }