找传奇、传世资源到传世资源站!

winform mvp 入门级示例代码

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

from clipboardusing System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using MVP;namespace WinFirst{ public partial class Form1 : Form,IFirstView { private FirstPresenter firstPresenter; public Form1() { InitializeComponent(); firstPresenter = new FirstPresenter(this); } #region IView成员 public event EventHandler Save; public event EventHandler Option; public string MVPName { get { return this.txtName.Text; } set { this.txtName.Text = value; } } public string MVPPassword { get { return this.txtPwd.Text; } set { this.txtPwd.Text = value; } } public string MVPTip { get { return this.lblTip.Text; } set { this.lblTip.Text = value; } } #endregion private void btnSure_Click(object sender, EventArgs e) { if (this.Save != null) { this.Save(sender,e); } } private void btnOption_Click(object sender, EventArgs e) { if (this.Option != null) { this.Option(sender,e); } } }}

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复