예제 #1
0
 private void listViewIPChannel_MouseClick(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Right)
     {
         int iCurChan = iChannelNum[(int)iSelIndex];
         if (iCurChan >= m_struIpParaCfgV40.dwStartDChan)
         {
             if (DialogResult.OK == MessageBox.Show("是否配置该IP通道!", "配置提示", MessageBoxButtons.OKCancel))
             {
                 IPChannelConfig dlg = new IPChannelConfig();
                 dlg.m_struIPParaCfgV40 = m_struIpParaCfgV40;
                 dlg.m_lUserID          = m_lUserID;
                 int iCurChanIndex  = iCurChan - (int)m_struIpParaCfgV40.dwStartDChan; //通道索引
                 int iCurIPDevIndex = iIPDevID[iCurChanIndex];                         //设备ID索引
                 dlg.iIPDevIndex = iCurIPDevIndex;
                 dlg.iChanIndex  = iCurChanIndex;
                 dlg.ShowDialog();
             }
         }
         else
         {
         }
     }
 }
예제 #2
0
        private void listViewIPChannel_MouseClick(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                int iCurChan = iChannelNum[(int)iSelIndex];
                if (iCurChan >= m_struIpParaCfgV40.dwStartDChan)
                {
                    if (DialogResult.OK == MessageBox.Show("是否配置该IP通道!", "配置提示", MessageBoxButtons.OKCancel))
                    {
                        IPChannelConfig dlg = new IPChannelConfig();
                        dlg.m_struIPParaCfgV40 = m_struIpParaCfgV40;
                        dlg.m_lUserID = m_lUserID;
                        int iCurChanIndex = iCurChan - (int)m_struIpParaCfgV40.dwStartDChan; //通道索引
                        int iCurIPDevIndex = iIPDevID[iCurChanIndex]; //设备ID索引
                        dlg.iIPDevIndex = iCurIPDevIndex;
                        dlg.iChanIndex = iCurChanIndex;
                        dlg.ShowDialog();
                    }
                }
                else
                {

                }
            }
        }