private void OnClickView(object sender, EventArgs e) { if (IsStructuredReport) { var form = new ReportForm(_file); form.ShowDialog(this); } else { var form = new DisplayForm(_file); form.ShowDialog(this); } }