/// <summary> /// 代码生成 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void button1_Click(object sender, EventArgs e) { VariableAssignment(); fileName = txtClassName.Text; var mk = new MakeModel(); Filtername = "CS 文件|*.cs"; txtContent.Text = mk.TransformText(); tabControl1.SelectedIndex = 1; }