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