BF2Statistics.InstallForm.ServerBtn_Click C# (CSharp) Method

ServerBtn_Click() private method

Event fired when the Server Path button is clicked... Opens the Dialog to select the Server executable
private ServerBtn_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        private void ServerBtn_Click(object sender, EventArgs e)
        {
            OpenFileDialog Dialog = new OpenFileDialog();
            Dialog.FileName = "bf2_w32ded.exe";
            Dialog.Filter = "BF2 Server Executable|bf2_w32ded.exe";

            // Set the initial search directory if we found an install path via registry
            if (!String.IsNullOrWhiteSpace(ServerInstallPath))
                Dialog.InitialDirectory = ServerInstallPath;

            if (Dialog.ShowDialog() == DialogResult.OK)
                ServerPath.Text = Path.GetDirectoryName(Dialog.FileName);
        }