private void btnXML_Click(object sender, EventArgs e)
 {
     string subjectArea = cbSubjectArea.SelectedItem.ToString();
     frmPasteCode frmPasteCode = new frmPasteCode(subjectArea);
     //
     frmPasteCode.Show();
     this.Hide();
 }
 private void btnPaste_Click(object sender, EventArgs e)
 {
     frmPasteCode frmPasteCode = new frmPasteCode(_subjectArea);
     DialogResult userConfirmation = frmPasteCode.ShowDialog();
     if (userConfirmation == DialogResult.OK)
     {
         this.Dispose(); // if new code is pasted, dispose the old grid. New instance of frmXmlFormatting will be generated from frmPasteCode
     }
 }
 private void radioXML_CheckedChanged(object sender, EventArgs e)
 {
     frmPasteCode frmPasteCode = new frmPasteCode(_subjectArea);
     frmPasteCode.Show();
     this.Hide();
 }