Public Class PowerSupplyMainForm Private G_Controller As PowerSupplycontroller Private Sub PowerSupplyForm1_Load(sender As Object, e As EventArgs) Handles MyBase.Load G_Controller = New PowerSupplycontroller(TabControl1) End Sub Public Sub ShowForm(pst As PowerSupplyBase.PowerSupplyType, formtitie As String) G_Controller.AddForm(pst, [Enum].GetName(GetType(PowerSupplyBase.PowerSupplyType), pst), "无卡取电") End Sub Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click 'GetPortTable() 'GetIfTable() Me.DialogResult = System.Windows.Forms.DialogResult.OK Me.Close() Return End Sub Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click Me.DialogResult = System.Windows.Forms.DialogResult.Cancel Me.Close() Return End Sub End Class