void CheckState()
{
if (this.allowTemplateEdit && comboBoxTemplate.SelectedValue == null)
{
this.buttonEdit.Enabled = false;
this.buttonAdd.Enabled = false;
this.toolStripStatusLabel1.Text = "You must select a device template";
}
else
{
this.buttonEdit.Enabled = true;
this.buttonAdd.Enabled = true;
this.toolStripStatusLabel1.Text = "";
}
}