public void TransForm(Form frm, string menu = null, string[] listview = null) { LanguageForm frmLan = new LanguageForm(); frmLan.Name = frm.Name; frmLan.Controls = this.GetAllControls(frm, null); if (menu != null) { frmLan.Menus = this.GetMenuItems((MenuStrip)frm.Controls[menu]); } if (listview != null) { foreach (string s in listview) { LanguageListView lv = new LanguageListView(); Control[] ctrls = frm.Controls.Find(s, true); if (ctrls.Length <= 0) { continue; } ListView lv1 = ctrls[0] as ListView; lv.Name = lv1.Name; lv.Columns = this.GetListViewColumns(lv1); lv.Groups = this.GetListViewGroups(lv1); frmLan.ListViews.Add(lv); } } this.Forms.Add(frmLan); frm.Dispose(); }