Beispiel #1
0
        private void btnPlay_Click(object sender, EventArgs e)
        {
            if (m_iLogonID < 0)
            {
                return;
            }
            string sFileName = "";

            for (int i = 0; i < lvFileData.Items.Count; i++)
            {
                if (lvFileData.Items[i].Checked)
                {
                    sFileName = lvFileData.Items[i].SubItems[1].Text.ToString();
                    break;
                }
            }
            sFileName = sFileName.Trim();
            int irt = -1;

            irt = PLAYSDK.TC_CreateSystem(IntPtr.Zero);
            if (irt < 0)
            {
                MessageBox.Show("TC_CreateSystem failed!");
            }
            PlayForm frmPlay = new PlayForm(m_ClientInfo, sFileName, this);

            frmPlay.ShowDialog();
        }
Beispiel #2
0
        private void btnPlayTime_Click(object sender, EventArgs e)
        {
            if (dtStartTimeTime.Value >= dtEndTimeTime.Value)
            {
                MessageBox.Show("Start Time > End Time!");
                return;
            }
            if (m_iLogonID < 0)
            {
                return;
            }
            m_StartTime.m_iYear   = Convert.ToUInt16(dtStartTimeTime.Value.Year);
            m_StartTime.m_iMonth  = Convert.ToUInt16(dtStartTimeTime.Value.Month);
            m_StartTime.m_iDay    = Convert.ToUInt16(dtStartTimeTime.Value.Day);
            m_StartTime.m_iHour   = Convert.ToUInt16(dtStartTimeTime.Value.Hour);
            m_StartTime.m_iMinute = Convert.ToUInt16(dtStartTimeTime.Value.Minute);
            m_StartTime.m_iSecond = Convert.ToUInt16(dtStartTimeTime.Value.Second);


            m_EndTime.m_iYear   = Convert.ToUInt16(dtEndTimeTime.Value.Year);
            m_EndTime.m_iMonth  = Convert.ToUInt16(dtEndTimeTime.Value.Month);
            m_EndTime.m_iDay    = Convert.ToUInt16(dtEndTimeTime.Value.Day);
            m_EndTime.m_iHour   = Convert.ToUInt16(dtEndTimeTime.Value.Hour);
            m_EndTime.m_iMinute = Convert.ToUInt16(dtEndTimeTime.Value.Minute);
            m_EndTime.m_iSecond = Convert.ToUInt16(dtEndTimeTime.Value.Second);

            int iChannelNo  = cbPassNOTime.SelectedIndex;
            int iStreamNo   = cbBitStreamType.SelectedIndex;
            int iChannelNum = 0;

            NVSSDK.NetClient_GetChannelNum(m_ClientInfo.m_iServerID, ref iChannelNum);
            int iRealChannel = iStreamNo * iChannelNum + iChannelNo;
            //m_PlayPage.SetDownloadParam(m_iLogonID, iRealChannel/*iChannelNo*/, &begintime, &endtime);
            //m_PlayPage.DoModal();

            int irt = -1;

            irt = PLAYSDK.TC_CreateSystem(IntPtr.Zero);
            if (irt < 0)
            {
                MessageBox.Show("TC_CreateSystem failed!");
            }
            PlayForm frmPlay = new PlayForm(m_ClientInfo, iRealChannel, m_StartTime, m_EndTime, this);

            frmPlay.ShowDialog();
        }