private void loadValues()
        {
            MODBUSMaster mbm = mbList.ElementAt(editIndex);

            if (mbm != null)
            {
                ucmb.txtMasterNo.Text = mbm.MasterNum;
                ucmb.cmbProtocolType.SelectedIndex = ucmb.cmbProtocolType.FindStringExact(mbm.ProtocolType);
                ucmb.cmbPortNo.SelectedIndex       = ucmb.cmbPortNo.FindStringExact(mbm.PortNum);

                ucmb.txtClockSyncInterval.Text = mbm.PollingIntervalmSec;
                ucmb.txtPollingInterval.Text   = mbm.PollingIntervalmSec;
                ucmb.txtRefreshInterval.Text   = mbm.RefreshInterval;
                ucmb.cmbDebug.SelectedIndex    = ucmb.cmbDebug.FindStringExact(mbm.DEBUG);
                ucmb.txtFirmwareVersion.Text   = mbm.AppFirmwareVersion;
                if (mbm.Run.ToLower() == "yes")
                {
                    ucmb.chkRun.Checked = true;
                }
                else
                {
                    ucmb.chkRun.Checked = false;
                }
                ucmb.txtDescription.Text = mbm.Description;
            }
        }
 private void fillOptions()
 {
     //Fill Protocol Type's...
     ucmb.cmbProtocolType.Items.Clear();
     foreach (String pt in MODBUSMaster.getProtocolTypes())
     {
         ucmb.cmbProtocolType.Items.Add(pt.ToString());
     }
     ucmb.cmbProtocolType.SelectedIndex = 0;
     //Fill Debug levels...
     ucmb.cmbDebug.Items.Clear();
     for (int i = 1; i <= Globals.MAX_DEBUG_LEVEL; i++)
     {
         ucmb.cmbDebug.Items.Add(i.ToString());
     }
     ucmb.cmbDebug.SelectedIndex = 0;
 }