登山者的仰望

不仅要走好脚下的每一步,也要仰望山顶
C#设计的一个向导程序(Wizard)框架 -- VS2008(二)

新建一个项目中添加四个继承于MailInfoBase的窗体。
MailConfigureStep1.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace UserControl
{
    
public partial class MailConfigureStep1 : MailControl.MailInfoBase
    
{
        
public MailConfigureStep1()
        
{
            InitializeComponent();
        }

        
protected override void UpdataInfo()
        
{
            
this.controller.info.NickName = NickName.Text;
        }

    }

}

MailConfigureStep1.designer.cs

namespace UserControl
{
    
partial class MailConfigureStep1
    
{
        
/// <summary>
        
/// 必需的设计器变量。
        
/// </summary>

        private System.ComponentModel.IContainer components = null;

        
/// <summary>
        
/// 清理所有正在使用的资源。
        
/// </summary>
        
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>

        protected override void Dispose(bool disposing)
        
{
            
if (disposing && (components != null))
            
{
                components.Dispose();
            }

            
base.Dispose(disposing);
        }


        
Windows 窗体设计器生成的代码

        
private System.Windows.Forms.Label label18;
        
public System.Windows.Forms.TextBox NickName;
        
private System.Windows.Forms.Label label3;
        
private System.Windows.Forms.Label label2;
        
private System.Windows.Forms.Label label1;
    }

}

MailConfigureStep2.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace UserControl
{
    
public partial class MailConfigureStep2 : MailControl.MailInfoBase
    
{
        
public MailConfigureStep2()
        
{
            InitializeComponent();
        }

        
protected override void UpdataInfo()
        
{
            
this.controller.info.Email = Email.Text;
        }

    }

}

MailConfigureStep2.designer.cs

namespace UserControl
{
    
partial class MailConfigureStep2
    
{
        
/// <summary>
        
/// 必需的设计器变量。
        
/// </summary>

        private System.ComponentModel.IContainer components = null;

        
/// <summary>
        
/// 清理所有正在使用的资源。
        
/// </summary>
        
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>

        protected override void Dispose(bool disposing)
        
{
            
if (disposing && (components != null))
            
{
                components.Dispose();
            }

            
base.Dispose(disposing);
        }


        
Windows 窗体设计器生成的代码

        
private System.Windows.Forms.Label label4;
        
public System.Windows.Forms.TextBox Email;
        
private System.Windows.Forms.Label label3;
        
private System.Windows.Forms.Label label2;
        
private System.Windows.Forms.Label label1;
    }

}

MailConfigureStep3.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace UserControl
{
    
public partial class MailConfigureStep3 : MailControl.MailInfoBase
    
{
        
public MailConfigureStep3()
        
{
            InitializeComponent();
        }

        
protected override void UpdataInfo()
        
{
            
this.controller.info.Pop3Server = pop3server.Text;
            
this.controller.info.Port = Port.Text;
            
this.controller.info.SmtpServer = smtpserver.Text;
        }

    }

}

MailConfigureStep3.designer.cs

namespace UserControl
{
    
partial class MailConfigureStep3
    
{
        
/// <summary>
        
/// 必需的设计器变量。
        
/// </summary>

        private System.ComponentModel.IContainer components = null;

        
/// <summary>
        
/// 清理所有正在使用的资源。
        
/// </summary>
        
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>

        protected override void Dispose(bool disposing)
        
{
            
if (disposing && (components != null))
            
{
                components.Dispose();
            }

            
base.Dispose(disposing);
        }


        
Windows 窗体设计器生成的代码

        
public System.Windows.Forms.TextBox Port;
        
private System.Windows.Forms.Label label6;
        
public System.Windows.Forms.TextBox smtpserver;
        
private System.Windows.Forms.Label label5;
        
private System.Windows.Forms.Label label4;
        
public System.Windows.Forms.TextBox pop3server;
        
private System.Windows.Forms.Label label3;
        
private System.Windows.Forms.Label label2;
        
private System.Windows.Forms.Label label1;
    }

}


 

posted on 2008-06-03 23:36  光光GG  阅读(889)  评论(0)    收藏  举报