Imports System.Windows.Forms

Public Class RenameDialog

    Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.OK
        Me.Close()
    End Sub

    Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel_Button.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
        Me.Close()
    End Sub

  Private Sub RenameDialog_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    CheckBox1.Checked = False
    CheckBox2.Checked = False
    CheckBox3.Checked = True
    RadioButton2.Checked = True
    RadioButton1.Enabled = False
    RadioButton2.Enabled = False
    TextBox1.Enabled = True
    TextBox1.Focus()
  End Sub

  Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.CheckedChanged
    RadioButton1.Enabled = CheckBox2.Checked
    RadioButton2.Enabled = CheckBox2.Checked
  End Sub

  Private Sub CheckBox3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox3.CheckedChanged
    TextBox1.Enabled = CheckBox3.Checked
  End Sub

  Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
    CheckBox2.Enabled = Not CheckBox1.Checked
    CheckBox3.Enabled = Not CheckBox1.Checked
    RadioButton1.Enabled = Not CheckBox1.Checked
    RadioButton2.Enabled = Not CheckBox1.Checked
    TextBox1.Enabled = Not CheckBox1.Checked
  End Sub
End Class
