public HtmlControl(Control control) { Thiscontrol = control; switch (control.GetType().FullName) { case "System.Windows.Forms.TextBox": FormType = FormEnums.TextBox; break; case "System.Windows.Forms.PictureBox": FormType = FormEnums.PictureBox; break; case "System.Windows.Forms.Label": FormType = FormEnums.Label; break; case "System.Windows.Forms.Button": FormType = FormEnums.Button; break; } }