static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); using (LoginForm lf = new LoginForm()) { if (lf.ShowDialog() == DialogResult.OK) { string[] info = new string[3]{lf.ftpHost,lf.ftpUserName,lf.ftpPassword}; Application.Run(new MainForm(info)); } else { return; } } }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); System.Net.ServicePointManager.DefaultConnectionLimit = 200; System.Threading.ThreadPool.SetMaxThreads(5, 5); var server = ConfigurationManager.AppSettings["FtpServer"]; using (LoginForm lf = new LoginForm()) { if (lf.ShowDialog() == DialogResult.OK) { string[] info = new string[3]{lf.ftpHost,lf.ftpUserName,lf.ftpPassword}; Application.Run(new MainForm(info)); } else { return; } } }
public frmReg(LoginForm fLogin) { // TODO: Complete member initialization this.fLogin = fLogin; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(284, 262); this.Name = "frmReg"; this.Text = "Regester"; ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(frmReg)); this.label1 = new Label(); this.txt_phone = new TextBox(); this.label2 = new Label(); this.txt_userName = new TextBox(); this.label3 = new Label(); this.txt_pwd1 = new TextBox(); this.label4 = new Label(); this.txt_pwd2 = new TextBox(); this.label5 = new Label(); this.txt_QQ = new TextBox(); this.label6 = new Label(); this.txt_WW = new TextBox(); this.label7 = new Label(); this.txt_tjr = new TextBox(); this.button1 = new Button(); this.label8 = new Label(); this.txt_Msg = new TextBox(); this.label9 = new Label(); this.label10 = new Label(); this.label12 = new Label(); this.label11 = new Label(); this.label13 = new Label(); this.label14 = new Label(); this.lab_phone = new Label(); this.lab_userName = new Label(); this.lab_pwd1 = new Label(); this.lab_pwd2 = new Label(); this.lab_QQ = new Label(); this.lab_WW = new Label(); this.lab_tjr = new Label(); this.SuspendLayout(); this.label1.AutoSize = true; this.label1.Location = new Point(6, 39); this.label1.Name = "label1"; this.label1.Size = new Size(59, 12); this.label1.TabIndex = 0; this.label1.Text = "用 户 名:"; this.txt_phone.Location = new Point(71, 6); this.txt_phone.MaxLength = 11; this.txt_phone.Name = "txt_phone"; this.txt_phone.Size = new Size(148, 21); this.txt_phone.TabIndex = 1; // ISSUE: method pointer // ISSUE: method pointer this.txt_phone.Leave += new EventHandler(txt_phone_Leave); // ISSUE: method pointer this.txt_phone.KeyPress += new KeyPressEventHandler(txt_phone_KeyPress); this.label2.AutoSize = true; this.label2.Location = new Point(6, 9); this.label2.Name = "label2"; this.label2.Size = new Size(59, 12); this.label2.TabIndex = 0; this.label2.Text = "手机号码:"; this.txt_userName.Location = new Point(71, 36); this.txt_userName.MaxLength = 20; this.txt_userName.Name = "txt_userName"; this.txt_userName.Size = new Size(148, 21); this.txt_userName.TabIndex = 2; // ISSUE: method pointer this.txt_userName.Leave += new EventHandler(txt_userName_Leave); // ISSUE: method pointer this.txt_userName.KeyPress += new KeyPressEventHandler(txt_userName_KeyPress); this.label3.AutoSize = true; this.label3.Location = new Point(6, 69); this.label3.Name = "label3"; this.label3.Size = new Size(59, 12); this.label3.TabIndex = 0; this.label3.Text = "密 码:"; this.txt_pwd1.Location = new Point(71, 66); this.txt_pwd1.MaxLength = 15; this.txt_pwd1.Name = "txt_pwd1"; this.txt_pwd1.PasswordChar = '*'; this.txt_pwd1.Size = new Size(148, 21); this.txt_pwd1.TabIndex = 3; // ISSUE: method pointer this.txt_pwd1.Leave += new EventHandler(txt_pwd1_Leave); this.label4.AutoSize = true; this.label4.Location = new Point(6, 129); this.label4.Name = "label4"; this.label4.Size = new Size(59, 12); this.label4.TabIndex = 0; this.label4.Text = "Q Q 号码:"; this.txt_pwd2.Location = new Point(71, 96); this.txt_pwd2.MaxLength = 15; this.txt_pwd2.Name = "txt_pwd2"; this.txt_pwd2.PasswordChar = '*'; this.txt_pwd2.Size = new Size(148, 21); this.txt_pwd2.TabIndex = 4; // ISSUE: method pointer this.txt_pwd2.Leave += new EventHandler(txt_pwd2_Leave); this.label5.AutoSize = true; this.label5.Location = new Point(6, 159); this.label5.Name = "label5"; this.label5.Size = new Size(59, 12); this.label5.TabIndex = 0; this.label5.Text = "店铺旺旺:"; this.txt_QQ.Location = new Point(71, 126); this.txt_QQ.MaxLength = 15; this.txt_QQ.Name = "txt_QQ"; this.txt_QQ.Size = new Size(148, 21); this.txt_QQ.TabIndex = 5; // ISSUE: method pointer this.txt_QQ.Leave += new EventHandler(txt_QQ_Leave); // ISSUE: method pointer this.txt_QQ.KeyPress += new KeyPressEventHandler(txt_QQ_KeyPress); this.label6.AutoSize = true; this.label6.Location = new Point(6, 189); this.label6.Name = "label6"; this.label6.Size = new Size(59, 12); this.label6.TabIndex = 0; this.label6.Text = "推荐人QQ:"; this.txt_WW.Location = new Point(71, 156); this.txt_WW.MaxLength = 30; this.txt_WW.Name = "txt_WW"; this.txt_WW.Size = new Size(148, 21); this.txt_WW.TabIndex = 6; // ISSUE: method pointer this.txt_WW.Leave += new EventHandler(txt_WW_Leave); // ISSUE: method pointer this.txt_WW.KeyPress += new KeyPressEventHandler(txt_WW_KeyPress); this.label7.AutoSize = true; this.label7.Location = new Point(6, 99); this.label7.Name = "label7"; this.label7.Size = new Size(59, 12); this.label7.TabIndex = 0; this.label7.Text = "确认密码:"; this.txt_tjr.Location = new Point(71, 186); this.txt_tjr.MaxLength = 20; this.txt_tjr.Name = "txt_tjr"; this.txt_tjr.Size = new Size(148, 21); this.txt_tjr.TabIndex = 7; // ISSUE: method pointer this.txt_tjr.Leave += new EventHandler(txt_tjr_Leave); // ISSUE: method pointer this.txt_tjr.KeyPress += new KeyPressEventHandler(txt_tjr_KeyPress); this.button1.Location = new Point(121, 213); this.button1.Name = "button1"; this.button1.Size = new Size(85, 32); this.button1.TabIndex = 8; this.button1.Text = "提交注册"; this.button1.UseVisualStyleBackColor = true; // ISSUE: method pointer this.button1.Click += new EventHandler(button1_Click); this.label8.AutoSize = true; this.label8.ForeColor = Color.Red; this.label8.Location = new Point(221, 227); this.label8.Name = "label8"; this.label8.Size = new Size(47, 12); this.label8.TabIndex = 3; this.label8.Text = "*为必填"; this.txt_Msg.Location = new Point(8, 251); this.txt_Msg.Multiline = true; this.txt_Msg.Name = "txt_Msg"; this.txt_Msg.Size = new Size(359, 69); this.txt_Msg.TabIndex = 10; // ISSUE: method pointer this.txt_Msg.KeyPress += new KeyPressEventHandler(txt_Msg_KeyPress); // ISSUE: method pointer this.txt_Msg.Enter += new EventHandler(txt_Msg_Enter); this.label9.AutoSize = true; this.label9.Font = new Font("新宋体", 9f, FontStyle.Regular, GraphicsUnit.Point, (byte)134); this.label9.ForeColor = Color.Red; this.label9.Location = new Point(221, 9); this.label9.Name = "label9"; this.label9.Size = new Size(11, 12); this.label9.TabIndex = 3; this.label9.Text = "*"; this.label10.AutoSize = true; this.label10.Font = new Font("新宋体", 9f, FontStyle.Regular, GraphicsUnit.Point, (byte)134); this.label10.ForeColor = Color.Red; this.label10.Location = new Point(221, 39); this.label10.Name = "label10"; this.label10.Size = new Size(11, 12); this.label10.TabIndex = 3; this.label10.Text = "*"; this.label12.AutoSize = true; this.label12.Font = new Font("新宋体", 9f, FontStyle.Regular, GraphicsUnit.Point, (byte)134); this.label12.ForeColor = Color.Red; this.label12.Location = new Point(221, 69); this.label12.Name = "label12"; this.label12.Size = new Size(11, 12); this.label12.TabIndex = 3; this.label12.Text = "*"; this.label11.AutoSize = true; this.label11.Font = new Font("新宋体", 9f, FontStyle.Regular, GraphicsUnit.Point, (byte)134); this.label11.ForeColor = Color.Red; this.label11.Location = new Point(221, 99); this.label11.Name = "label11"; this.label11.Size = new Size(11, 12); this.label11.TabIndex = 3; this.label11.Text = "*"; this.label13.AutoSize = true; this.label13.Font = new Font("新宋体", 9f, FontStyle.Regular, GraphicsUnit.Point, (byte)134); this.label13.ForeColor = Color.Red; this.label13.Location = new Point(221, 129); this.label13.Name = "label13"; this.label13.Size = new Size(11, 12); this.label13.TabIndex = 3; this.label13.Text = "*"; this.label14.AutoSize = true; this.label14.Font = new Font("新宋体", 9f, FontStyle.Regular, GraphicsUnit.Point, (byte)134); this.label14.ForeColor = Color.Red; this.label14.Location = new Point(221, 159); this.label14.Name = "label14"; this.label14.Size = new Size(11, 12); this.label14.TabIndex = 3; this.label14.Text = "*"; this.lab_phone.AutoSize = true; this.lab_phone.ForeColor = Color.FromArgb(64, 64, 64); this.lab_phone.Location = new Point(236, 9); this.lab_phone.Name = "lab_phone"; this.lab_phone.Size = new Size(137, 12); this.lab_phone.TabIndex = 0; this.lab_phone.Text = "可以联系到您的手机号码"; this.lab_userName.AutoSize = true; this.lab_userName.ForeColor = Color.FromArgb(64, 64, 64); this.lab_userName.Location = new Point(236, 39); this.lab_userName.Name = "lab_userName"; this.lab_userName.Size = new Size(131, 12); this.lab_userName.TabIndex = 0; this.lab_userName.Text = "3位以上英文字母或数字"; this.lab_pwd1.AutoSize = true; this.lab_pwd1.ForeColor = Color.FromArgb(64, 64, 64); this.lab_pwd1.Location = new Point(236, 69); this.lab_pwd1.Name = "lab_pwd1"; this.lab_pwd1.Size = new Size(107, 12); this.lab_pwd1.TabIndex = 0; this.lab_pwd1.Text = "3-15位,区分大小写"; this.lab_pwd2.AutoSize = true; this.lab_pwd2.ForeColor = Color.FromArgb(64, 64, 64); this.lab_pwd2.Location = new Point(236, 99); this.lab_pwd2.Name = "lab_pwd2"; this.lab_pwd2.Size = new Size(77, 12); this.lab_pwd2.TabIndex = 0; this.lab_pwd2.Text = "再次输入密码"; this.lab_QQ.AutoSize = true; this.lab_QQ.ForeColor = Color.FromArgb(64, 64, 64); this.lab_QQ.Location = new Point(236, 129); this.lab_QQ.Name = "lab_QQ"; this.lab_QQ.Size = new Size(113, 12); this.lab_QQ.TabIndex = 0; this.lab_QQ.Text = "可以联系到您QQ号码"; this.lab_WW.AutoSize = true; this.lab_WW.ForeColor = Color.FromArgb(64, 64, 64); this.lab_WW.Location = new Point(236, 159); this.lab_WW.Name = "lab_WW"; this.lab_WW.Size = new Size(113, 12); this.lab_WW.TabIndex = 0; this.lab_WW.Text = "您的店铺的旺旺号码"; this.lab_tjr.AutoSize = true; this.lab_tjr.ForeColor = Color.Red; this.lab_tjr.Location = new Point(224, 189); this.lab_tjr.Name = "lab_tjr"; this.lab_tjr.Size = new Size(143, 12); this.lab_tjr.TabIndex = 0; this.lab_tjr.Text = "推荐人将可获得888流量币"; this.AutoScaleDimensions = new SizeF(6f, 12f); this.AutoScaleMode = AutoScaleMode.Font; this.ClientSize = new Size(376, 324); this.Controls.Add((Control)this.label14); this.Controls.Add((Control)this.label13); this.Controls.Add((Control)this.label11); this.Controls.Add((Control)this.txt_Msg); this.Controls.Add((Control)this.label12); this.Controls.Add((Control)this.label10); this.Controls.Add((Control)this.label9); this.Controls.Add((Control)this.label8); this.Controls.Add((Control)this.button1); this.Controls.Add((Control)this.txt_tjr); this.Controls.Add((Control)this.label7); this.Controls.Add((Control)this.txt_WW); this.Controls.Add((Control)this.label6); this.Controls.Add((Control)this.txt_QQ); this.Controls.Add((Control)this.label5); this.Controls.Add((Control)this.txt_pwd2); this.Controls.Add((Control)this.label4); this.Controls.Add((Control)this.txt_pwd1); this.Controls.Add((Control)this.label3); this.Controls.Add((Control)this.txt_userName); this.Controls.Add((Control)this.lab_tjr); this.Controls.Add((Control)this.lab_WW); this.Controls.Add((Control)this.lab_QQ); this.Controls.Add((Control)this.lab_pwd2); this.Controls.Add((Control)this.lab_pwd1); this.Controls.Add((Control)this.lab_userName); this.Controls.Add((Control)this.lab_phone); this.Controls.Add((Control)this.label2); this.Controls.Add((Control)this.txt_phone); this.Controls.Add((Control)this.label1); this.Icon = (Icon)componentResourceManager.GetObject("$this.Icon"); this.MaximizeBox = false; this.Name = "frmReg"; this.StartPosition = FormStartPosition.CenterParent; this.Text = "新用户注册"; // ISSUE: method pointer this.Load += new EventHandler(frmReg_Load); this.ResumeLayout(false); InitializeComponent(); }
public UserForm(LoginForm form) { InitializeComponent(); this.form = form; }
public AdminForm(LoginForm form) { InitializeComponent(); BuildTabsNGrids(); this.form = form; }