Exemplo n.º 1
0
 private void frmSGMConfig_Load(object sender, EventArgs e)
 {
     if (SGMConfig.Flag_DisableReader)
     {
         openLoginFrm();
     }
     m_stSettingFile     = Application.StartupPath + m_stSettingFile;
     m_stCurrentPortName = RFIDReader.LoadConfig(m_stSettingFile);
     loadPortsName();
     if (!m_stCurrentPortName.Equals(""))
     {
         for (int i = 0; i < cboPorts.Items.Count; i++)
         {
             if (cboPorts.Items[i].ToString().Equals(m_stCurrentPortName))
             {
                 if (InitComPort())
                 {
                     openLoginFrm();
                 }
                 else
                 {
                     frmMsg.ShowMsg(SGMText.SGM_ERROR, SGMText.FRM_CONFIG_CANT_CONNECT_READER, SGMMessageType.SGM_MESSAGE_TYPE_ERROR);
                 }
             }
         }
     }
     m_stCurrentPortName = cboPorts.Text;
 }