public void BasicRepopulate(BasicMonitor basicMonitor)
 {
     switch (basicMonitor.BasicMonitorType)
     {
         case BasicMonitorType.Ftp:
             basicMonitorFtpPathTextBox.Text = basicMonitor.Data.UrlUncIp;
             basicMonitorFtpPathPortTextBox.Text = basicMonitor.Data.Port.ToString();
             basicMonitorFtpUseSslCheckBox.Checked = basicMonitor.Credential.UseSecure;
             basicMonitorFtpUserTextBox.Text = basicMonitor.Credential.Username;
             basicMonitorFtpPassTextBox.Text = basicMonitor.Credential.Password;
             basicMonitorFtpGroupBox.BackColor = Color.LightGray;
             basicMonitorFtpMonitorSelect.Checked = true;
             break;
         case BasicMonitorType.Http:
             basicMonitorHttpPathTextBox.Text = basicMonitor.Data.UrlUncIp;
             basicMonitorHttpPathPortTextBox.Text = basicMonitor.Data.Port.ToString();
             basicMonitorHttpGroupBox.BackColor = Color.LightGray;
             basicMonitorHttpMonitorSelect.Checked = true;
             break;
         case BasicMonitorType.Ping:
             basicMonitorIpTextBox.Text = basicMonitor.Data.UrlUncIp;
             basicMonitorPingGroupBox.BackColor = Color.LightGray;
             basicMonitorPingMonitorSelect.Checked = true;
             break;
     }
     _basicType = basicMonitor.BasicMonitorType;
     basicMonitorTestDataUpdateFreqTextBox.Text = basicMonitor.UpdateFrequency.ToString();
 }
 private void BasicMonitorGroupBoxEnter(object sender, EventArgs e)
 {
     GroupBox groupBox = (GroupBox) sender;
     groupBox.BackColor = Color.LightGray;
     //NOTE: uncheck boxes
     foreach (Control control in this.basicBaseTab.Controls)
     {
         if (control.GetType() == typeof(GroupBox))
         {
             if (control.Name != groupBox.Name)
             {
                 control.BackColor = Color.Transparent;
                 foreach (Control childcontrol in control.Controls)
                 {
                     if (childcontrol.Name.Contains("MonitorSelect") &&
                         childcontrol.GetType() == typeof (CheckBox))
                     {
                         ((CheckBox) childcontrol).CheckState = CheckState.Unchecked;
                         break;
                     }
                 }
             }
         }
     }
     foreach (Control control in groupBox.Controls)
     {
         if (control.GetType() == typeof(CheckBox))
         {
             if (control.Name.Contains("MonitorSelect"))
             {
                 ((CheckBox) control).Checked = true;
                 _basicType = (BasicMonitorType) control.Tag;// Enum.Parse(typeof(BasicMonitorType), control.Tag.ToString());
                 break;
             }
         }
     }
 }