最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
分层体系结构(MVC)四
时间:2022-07-02 12:06:21 编辑:袖梨 来源:一聚教程网
四、WinForm 层
WinForm 层主要完成与用户互动操作,以及传递参数等。代码相对简单,因为工作都在下面的基层实现了。
以处理用户登录的代码login.vb为例,给大家一个概要的印象。
login.vb代码如下:
Public Class login
Inherits System.Windows.Forms.Form
Protected user As business.login.UserLimits
#Region " Windows 窗体设计器生成的代码 "
Public Sub New()
MyBase.New()
'该调用是 Windows 窗体设计器所必需的。
InitializeComponent()
'在 InitializeComponent() 调用之后添加任何初始化
End Sub
'窗体重写 dispose 以清理组件列表。
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Windows 窗体设计器所必需的
Private components As System.ComponentModel.IContainer
'注意: 以下过程是 Windows 窗体设计器所必需的
相关文章
- 致命公司传送器有什么用 传送器作用介绍 12-06
- dota2骑士之倚有什么用 骑士之倚效果介绍 12-06
- 致命公司雷达增强器怎么用 雷达发射器使用教学 12-06
- 恋爱吗我家的猫会后空翻第一章全流程攻略 12-06
- 星球重启球球宠物心愿解锁条件一览 12-06
- 星球重启冰霜琥珀在哪 冰霜琥珀位置一览 12-06