Label4









How do I use Label4
Below are practical examples compiled from projects for learning and reference purposes

Featured Snippets


File name: frmThongTinNhom.cs Copy
29         private void label4_Click(object sender, EventArgs e)
30         {
31             this.Close();
32         }
File name: frmColor.cs Copy
86   private void InitializeComponent()
87   {
88             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ColorInput));
89             this.Blue = new System.Windows.Forms.TextBox();
90             this.label4 = new System.Windows.Forms.Label();
91             this.Green = new System.Windows.Forms.TextBox();
92             this.label3 = new System.Windows.Forms.Label();
93             this.Red = new System.Windows.Forms.TextBox();
94            this.label2 = new System.Windows.Forms.Label();
95             this.label1 = new System.Windows.Forms.Label();
96             this.Cancel = new System.Windows.Forms.Button();
97             this.OK = new System.Windows.Forms.Button();
98             this.SuspendLayout();
99             //
100             // Blue
101             //
102             this.Blue.Location = new System.Drawing.Point(103, 112);
103             this.Blue.Name = "Blue";
104             this.Blue.Size = new System.Drawing.Size(100, 20);
105             this.Blue.TabIndex = 17;
106             ////
107             // label4
108             //
109             this.label4.ForeColor = System.Drawing.Color.Blue;
110             this.label4.Location = new System.Drawing.Point(32, 112);
111             this.label4.Name = "label4";
112             this.label4.Size = new System.Drawing.Size(32, 16);
113             this.label4.TabIndex = 16;
114             this.label4.Text = "Blue";
115            // //
116            // // Green
117            // //
118             this.Green.Location = new System.Drawing.Point(103, 80);
119             this.Green.Name = "Green";
120             this.Green.Size = new System.Drawing.Size(100, 20);
121             this.Green.TabIndex = 15;
122             //
123            // // label3
124            // //
125             this.label3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(255)))));
126             this.label3.Location = new System.Drawing.Point(32, 80);
127             this.label3.Name = "label3";
128             this.label3.Size = new System.Drawing.Size(32, 16);
129             this.label3.TabIndex = 14;
130             this.label3.Text = "Green";
131             //
132            // // Red
133            // //
134             this.Red.Location = new System.Drawing.Point(103, 48);
135             this.Red.Name = "Red";
136             this.Red.Size = new System.Drawing.Size(100, 20);
137             this.Red.TabIndex = 13;
138            // //
139            // // label2
140            // //
141             this.label2.ForeColor = System.Drawing.Color.Red;
142             this.label2.Location = new System.Drawing.Point(32, 48);
143             this.label2.Name = "label2";
144             this.label2.Size = new System.Drawing.Size(32, 16);
145             this.label2.TabIndex = 12;
146             this.label2.Text = "Red";
147             //
148            // // label1
149            // //
150             this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
151             this.label1.ForeColor = System.Drawing.Color.Blue;
152             this.label1.Location = new System.Drawing.Point(16, 16);
153             this.label1.Name = "label1";
154             this.label1.Size = new System.Drawing.Size(281, 24);
155             this.label1.TabIndex = 11;
156             this.label1.Text = "Nhập các giá trị màu từ -255 đến 255";
157             // this.label1.Click += new System.EventHandler(this.label1_Click);
158            // //
159            // // Cancel
160            // //
161             this.Cancel.Location = new System.Drawing.Point(176, 178);
162             this.Cancel.Name = "Cancel";
163             this.Cancel.Size = new System.Drawing.Size(75, 23);
164             this.Cancel.TabIndex = 9;
165             this.Cancel.Text = "Bỏ qua";
166             //
167            // // OK
168            // //
169             this.OK.Location = new System.Drawing.Point(19, 178);
170             this.OK.Name = "OK";
171             this.OK.Size = new System.Drawing.Size(75, 23);
172             this.OK.TabIndex = 10;
173             this.OK.Text = "Đồng ý";
174            // this.OK.Click += new System.EventHandler(this.OK_Click);
175             //
176             // ColorInput
177             //
178             this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
179             this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
180             this.ClientSize = new System.Drawing.Size(309, 226);
181             this.Controls.Add(this.Blue);
182             this.Controls.Add(this.label4);
183             this.Controls.Add(this.Green);
184             this.Controls.Add(this.label3);
185             this.Controls.Add(this.Red);
186             this.Controls.Add(this.label2);
187             this.Controls.Add(this.label1);
188             this.Controls.Add(this.OK);
189             this.Controls.Add(this.Cancel);
190             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
191             this.Name = "ColorInput";
192             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
193             this.Text = "CHON MAU";
194             //this.Load += new System.EventHandler(this.ColorInput_Load);
195             this.ResumeLayout(false);
196             this.PerformLayout();
197
198   }
File name: frmMainMenu.cs Copy
136         private void frmMainMenu_Load(object sender, EventArgs e)
137         {
138             if (lblUserType.Text.Trim()== "Admin")
139                     {
140
141                         this.masterEntryToolStripMenuItem.Enabled=true;
142                         this.usersToolStripMenuItem.Enabled=true;
143                         this.customerToolStripMenuItem1.Enabled=true;
144                         this.suppliersToolStripMenuItem.Enabled=true;
145                         this.productsToolStripMenuItem.Enabled=true;
146                         this.recordsToolStripMenuItem.Enabled=true;
147                         this.registrationToolStripMenuItem.Enabled=true;
148                         this.databaseToolStripMenuItem.Enabled=true;
149                         this.customerToolStripMenuItem.Enabled=true;
150                         this.supplierToolStripMenuItem.Enabled=true;
151                         this.productToolStripMenuItem.Enabled=true;
152                         this.stockToolStripMenuItem.Enabled=true;
153                         this.invoiceToolStripMenuItem.Enabled = true;
154
155
156                     }
157                     if (lblUserType.Text.Trim() == "Sales Person")
158                     {
159                         this.masterEntryToolStripMenuItem.Enabled = false;
160                         this.usersToolStripMenuItem.Enabled = false;
161                         this.customerToolStripMenuItem1.Enabled = true;
162                         this.suppliersToolStripMenuItem.Enabled = false;
163                         this.productsToolStripMenuItem.Enabled = false;
164                         this.recordsToolStripMenuItem.Enabled = false;
165                         this.registrationToolStripMenuItem.Enabled = false;
166                         this.databaseToolStripMenuItem.Enabled = false;
167                         this.customerToolStripMenuItem.Enabled = true;
168                         this.supplierToolStripMenuItem.Enabled = false;
169                         this.productToolStripMenuItem.Enabled = false;
170                         this.stockToolStripMenuItem.Enabled = false;
171                         this.invoiceToolStripMenuItem.Enabled = true;
172
173                     }
174                     if (lblUserType.Text.Trim() == "Warehouse Worker")
175                     {
176                         this.masterEntryToolStripMenuItem.Enabled = false;
177                         this.usersToolStripMenuItem.Enabled = false;
178                         this.customerToolStripMenuItem1.Enabled = false;
179                         this.suppliersToolStripMenuItem.Enabled = false;
180                         this.productsToolStripMenuItem.Enabled = false;
181                         this.recordsToolStripMenuItem.Enabled = false;
182                         this.registrationToolStripMenuItem.Enabled = false;
183                         this.databaseToolStripMenuItem.Enabled = false;
184                         this.customerToolStripMenuItem.Enabled = false;
185                         this.supplierToolStripMenuItem.Enabled = false;
186                         this.productToolStripMenuItem.Enabled = false;
187                         this.stockToolStripMenuItem.Enabled = false;
188                         this.invoiceToolStripMenuItem.Enabled = false;
189
190                     }
191
192                        if (lblUserType.Text.Trim() == "Warehouse Manager")
193                     {
194                         this.masterEntryToolStripMenuItem.Enabled = false;
195                         this.usersToolStripMenuItem.Enabled = false;
196                         this.customerToolStripMenuItem1.Enabled = false;
197                         this.suppliersToolStripMenuItem.Enabled = false;
198                         this.productsToolStripMenuItem.Enabled = false;
199                         this.recordsToolStripMenuItem.Enabled = false;
200                         this.registrationToolStripMenuItem.Enabled = false;
201                         this.databaseToolStripMenuItem.Enabled = false;
202                         this.customerToolStripMenuItem.Enabled = false;
203                         this.supplierToolStripMenuItem.Enabled = true;
204                         this.productToolStripMenuItem.Enabled = true;
205                         this.stockToolStripMenuItem.Enabled = true;
206                         this.invoiceToolStripMenuItem.Enabled = false;
207
208                     }
209                         ToolStripStatusLabel4.Text = System.DateTime.Now.ToString();
210                         GetData();
211         }
File name: frmMainMenu.cs Copy
213         private void timer1_Tick(object sender, EventArgs e)
214         {
215             ToolStripStatusLabel4.Text = System.DateTime.Now.ToString();
216         }
File name: MainForm.cs Copy
82         void FrameGrabber(object sender, EventArgs e)
83         {
84             label3.Text = "0";
85
86             NamePersons.Add("");
87
88
89             currentFrame = grabber.QueryFrame().Resize(320, 240, Emgu.CV.CvEnum.INTER.CV_INTER_CUBIC);
90
91                     gray = currentFrame.Convert();
92
93                     MCvAvgComp[][] facesDetected = gray.DetectHaarCascade(
94                   face,
95                   1.2,
96                   10,
97                   Emgu.CV.CvEnum.HAAR_DETECTION_TYPE.DO_CANNY_PRUNING,
98                   new Size(20, 20));
99
100                     foreach (MCvAvgComp f in facesDetected[0])
101                     {
102                         t = t + 1;
103                         result = currentFrame.Copy(f.rect).Convert().Resize(100, 100, Emgu.CV.CvEnum.INTER.CV_INTER_CUBIC);
104                         currentFrame.Draw(f.rect, new Bgr(Color.Red), 2);
105
106
107                         if (trainingImages.ToArray().Length != 0)
108                         {
109                         MCvTermCriteria termCrit = new MCvTermCriteria(ContTrain, 0.001);
110
111                          EigenObjectRecognizer recognizer = new EigenObjectRecognizer(
112                            trainingImages.ToArray(),
113                            labels.ToArray(),
114                            5000,
115                            ref termCrit);
116
117                         name = recognizer.Recognize(result);
118
119                         currentFrame.Draw(name, ref font, new Point(f.rect.X - 2, f.rect.Y - 2), new Bgr(Color.LightGreen));
120
121                         }
122
123                             NamePersons[t-1] = name;
124                             NamePersons.Add("");
125
126
127                         label3.Text = facesDetected[0].Length.ToString();
128
129                         /*
130                         gray.ROI = f.rect;
131                         MCvAvgComp[][] eyesDetected = gray.DetectHaarCascade(
132                            eye,
133                            1.1,
134                            10,
135                            Emgu.CV.CvEnum.HAAR_DETECTION_TYPE.DO_CANNY_PRUNING,
136                            new Size(20, 20));
137                         gray.ROI = Rectangle.Empty;
138
139                         foreach (MCvAvgComp ey in eyesDetected[0])
140                         {
141                             Rectangle eyeRect = ey.rect;
142                             eyeRect.Offset(f.rect.X, f.rect.Y);
143                             currentFrame.Draw(eyeRect, new Bgr(Color.Blue), 2);
144                         }
145                          */
146
147                     }
148                         t = 0;
149
150                     for (int nnn = 0; nnn < facesDetected[0].Length; nnn++)
151                     {
152                         names = names + NamePersons[nnn] + ", ";
153                     }
154
155                     imageBoxFrameGrabber.Image = currentFrame;
156                     label4.Text = names;
157                     names = "";
158
159                     NamePersons.Clear();
160
161                 }
File name: frm_prev.cs Copy
44         private void frm_prev_Load(object sender, EventArgs e)
45         {
46             label1.Text = "Name : " + Name1;
47             label2.Text = "Nickname : " + Nickname;
48             label3.Text = "Phone Number : " + PhoneNumber;
49             label4.Text = "Mobile Number : " + MobileNumber;
50             label5.Text = "Email Address : " + EmailAddress;
51             label6.Text = "Home Address : " + HomeAddress;
52             label7.Text = "Company : " + Company;
53             label8.Text = "Position : " + Position;
54             label9.Text = "Group : " + GroupName;
55             label10.Text = "Website : " + Website;
56             label11.Text = "Facebook Account : " + FacebookAccount;
57         }

Label4 104 lượt xem

Gõ tìm kiếm nhanh...