www.pudn.com > IntMail.rar > FrmRegMailServer.cs


using System; 
using System.Collections.Generic; 
using System.ComponentModel; 
using System.Data; 
using System.Drawing; 
using System.Text; 
using System.Windows.Forms; 
 
namespace IntMail.RegMail 
{ 
    public partial class FrmRegMailServer : Form 
    { 
        public FrmRegMailServer() 
        { 
            InitializeComponent(); 
        } 
        int frmCount = 0; 
        private void button2_Click(object sender, EventArgs e) 
        { 
            try 
            { 
                MailAddress.MailAddressPOP3 = textBox1.Text.Trim(); 
                MailAddress.MailAddressSMTP = textBox2.Text.Trim(); 
                frmCount = 1; 
                FrmRegUserPass _fmUser = new FrmRegUserPass(); 
                _fmUser.Show(); 
                this.Close(); 
            } 
            catch (Exception ex) 
            { 
                MessageBox.Show(ex.Message); 
            } 
        } 
 
        private void button3_Click(object sender, EventArgs e) 
        { 
            Application.Exit(); 
        } 
 
        private void FrmRegMailServer_FormClosing(object sender, FormClosingEventArgs e) 
        { 
            if (frmCount == 0) 
            { 
                Application.Exit(); 
            } 
        } 
 
        private void button1_Click(object sender, EventArgs e) 
        { 
            frmCount = 1; 
            RegMail.FrmRegMailAddress _fmAd = new FrmRegMailAddress(); 
            _fmAd.Show(); 
            this.Close(); 
        } 
 
        private void FrmRegMailServer_Load(object sender, EventArgs e) 
        { 
            try 
            { 
                if (MailAddress.MailAddressPOP3 != null) 
                { 
                    textBox1.Text = MailAddress.MailAddressPOP3; 
                } 
                else 
                { 
                    textBox1.Text = ""; 
                } 
                if (MailAddress.MailAddressSMTP != null) 
                { 
                    textBox2.Text = MailAddress.MailAddressSMTP; 
                } 
                else 
                { 
                    textBox2.Text = ""; 
                } 
            } 
            catch (Exception ex) 
            { 
                textBox1.Text = ""; 
                textBox2.Text = ""; 
            } 
             
        } 
    } 
}