PKStudio.SetSPOForm.OkBtn_Click C# (CSharp) Method

OkBtn_Click() private method

private OkBtn_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        private void OkBtn_Click(object sender, EventArgs e)
        {
            this.Path = this.textBoxSpoClientPath.Text;
            if (!Directory.Exists(this.Path) || !Directory.Exists(this.Path + @"\DeviceCode\Targets\"))
            {
                MessageBox.Show(this, Strings.InvalidPkDirectory, Strings.Error, MessageBoxButtons.OK, MessageBoxIcon.Hand);
                this.textBoxSpoClientPath.Select(0, -1);                
            }
            else
            {
                Environment.SetEnvironmentVariable("SPOCLIENT", this.Path);
                this.DialogResult = System.Windows.Forms.DialogResult.OK;
                this.Close();
            }
        }