📄 frmfeedback.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace FeedBackProject
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class frmFeedBack : System.Windows.Forms.Form
{
private System.Windows.Forms.Label lblNameWhat;
private System.Windows.Forms.TextBox txtName;
private System.Windows.Forms.Label lblEmailId;
private System.Windows.Forms.TextBox txtEmailId;
private System.Windows.Forms.Label lblSubject;
private System.Windows.Forms.ComboBox cboSubject;
private System.Windows.Forms.Label lblTypeFeedBack;
private System.Windows.Forms.TextBox txtFeedback;
private System.Windows.Forms.Button btnSend;
private System.Windows.Forms.Button btnClose;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public frmFeedBack()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
[STAThread]
static void Main()
{
Application.Run(new frmFeedBack());
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.lblNameWhat = new System.Windows.Forms.Label();
this.txtName = new System.Windows.Forms.TextBox();
this.txtEmailId = new System.Windows.Forms.TextBox();
this.lblEmailId = new System.Windows.Forms.Label();
this.lblSubject = new System.Windows.Forms.Label();
this.cboSubject = new System.Windows.Forms.ComboBox();
this.lblTypeFeedBack = new System.Windows.Forms.Label();
this.txtFeedback = new System.Windows.Forms.TextBox();
this.btnSend = new System.Windows.Forms.Button();
this.btnClose = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// lblNameWhat
//
this.lblNameWhat.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.lblNameWhat.Location = new System.Drawing.Point(16, 17);
this.lblNameWhat.Name = "lblNameWhat";
this.lblNameWhat.Size = new System.Drawing.Size(128, 21);
this.lblNameWhat.TabIndex = 0;
this.lblNameWhat.Text = "姓名";
//
// txtName
//
this.txtName.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.txtName.Location = new System.Drawing.Point(120, 16);
this.txtName.Name = "txtName";
this.txtName.Size = new System.Drawing.Size(180, 21);
this.txtName.TabIndex = 1;
this.txtName.Text = "";
//
// txtEmailId
//
this.txtEmailId.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.txtEmailId.Location = new System.Drawing.Point(120, 48);
this.txtEmailId.Name = "txtEmailId";
this.txtEmailId.Size = new System.Drawing.Size(180, 21);
this.txtEmailId.TabIndex = 1;
this.txtEmailId.Text = "";
//
// lblEmailId
//
this.lblEmailId.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.lblEmailId.Location = new System.Drawing.Point(16, 48);
this.lblEmailId.Name = "lblEmailId";
this.lblEmailId.Size = new System.Drawing.Size(120, 21);
this.lblEmailId.TabIndex = 2;
this.lblEmailId.Text = "电子邮件地址";
//
// lblSubject
//
this.lblSubject.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.lblSubject.Location = new System.Drawing.Point(16, 80);
this.lblSubject.Name = "lblSubject";
this.lblSubject.Size = new System.Drawing.Size(120, 21);
this.lblSubject.TabIndex = 5;
this.lblSubject.Text = "主题";
//
// cboSubject
//
this.cboSubject.Location = new System.Drawing.Point(120, 80);
this.cboSubject.Name = "cboSubject";
this.cboSubject.Size = new System.Drawing.Size(180, 20);
this.cboSubject.TabIndex = 6;
this.cboSubject.Text = "请选择";
//
// lblTypeFeedBack
//
this.lblTypeFeedBack.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.lblTypeFeedBack.Location = new System.Drawing.Point(16, 120);
this.lblTypeFeedBack.Name = "lblTypeFeedBack";
this.lblTypeFeedBack.Size = new System.Drawing.Size(120, 21);
this.lblTypeFeedBack.TabIndex = 0;
this.lblTypeFeedBack.Text = "您的反馈";
//
// txtFeedback
//
this.txtFeedback.Location = new System.Drawing.Point(120, 112);
this.txtFeedback.Multiline = true;
this.txtFeedback.Name = "txtFeedback";
this.txtFeedback.Size = new System.Drawing.Size(360, 120);
this.txtFeedback.TabIndex = 8;
this.txtFeedback.Text = "";
//
// btnSend
//
this.btnSend.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnSend.ForeColor = System.Drawing.Color.Black;
this.btnSend.Location = new System.Drawing.Point(312, 240);
this.btnSend.Name = "btnSend";
this.btnSend.Size = new System.Drawing.Size(80, 24);
this.btnSend.TabIndex = 10;
this.btnSend.Text = "发 送(&S)";
this.btnSend.Click += new System.EventHandler(this.btnSend_Click);
//
// btnClose
//
this.btnClose.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnClose.ForeColor = System.Drawing.Color.Black;
this.btnClose.Location = new System.Drawing.Point(408, 240);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(75, 24);
this.btnClose.TabIndex = 11;
this.btnClose.Text = "关 闭(&C)";
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// frmFeedBack
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.BackColor = System.Drawing.SystemColors.Control;
this.ClientSize = new System.Drawing.Size(496, 277);
this.Controls.Add(this.btnClose);
this.Controls.Add(this.btnSend);
this.Controls.Add(this.txtFeedback);
this.Controls.Add(this.cboSubject);
this.Controls.Add(this.lblSubject);
this.Controls.Add(this.txtName);
this.Controls.Add(this.lblNameWhat);
this.Controls.Add(this.txtEmailId);
this.Controls.Add(this.lblEmailId);
this.Controls.Add(this.lblTypeFeedBack);
this.Name = "frmFeedBack";
this.Text = "反馈表";
this.Load += new System.EventHandler(this.frmFeedBack_Load);
this.ResumeLayout(false);
}
#endregion
private void frmFeedBack_Load(object sender, System.EventArgs e)
{
this.cboSubject.Items.Add("一般反馈");
this.cboSubject.Items.Add("设计反馈");
this.cboSubject.Items.Add("颜色反馈");
this.cboSubject.Items.Add("字体反馈");
}
private void btnSend_Click(object sender, System.EventArgs e)
{
frmUserDetails fUD = new frmUserDetails(this.txtName.Text,this.txtEmailId.Text,this.cboSubject.SelectedItem.ToString(),this.txtFeedback.Text);
fUD.Show();
}
private void btnClose_Click(object sender, System.EventArgs e)
{
this.Close();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -