void CreatExport_Click(object sender, EventArgs args) { var gen = new GenReportConfig((ModelType)this.DataInfo); StringBuilder builder = new StringBuilder(); gen.Generate(builder); this.OnGenerate(this, builder); }