Ejemplo n.º 1
0
 private void AlarmSaveData(ref DH_REC_TSECT recTsect)
 {
     //时间段一
     recTsect.sTSECT[0].bEnable = chkAT1Enable.Checked;
     recTsect.sTSECT[0].iBeginHour = int.Parse(txtAT1StartH.Text);
     recTsect.sTSECT[0].iBeginMin = int.Parse(txtAT1StartM.Text);
     recTsect.sTSECT[0].iBeginSec = int.Parse(txtAT1StartS.Text);
     recTsect.sTSECT[0].iEndHour = int.Parse(txtAT1EndH.Text);
     recTsect.sTSECT[0].iEndMin = int.Parse(txtAT1EndM.Text);
     recTsect.sTSECT[0].iEndSec = int.Parse(txtAT1EndS.Text);
     //时间段二
     recTsect.sTSECT[1].bEnable = chkAT2Enable.Checked;
     recTsect.sTSECT[1].iBeginHour = int.Parse(txtAT2StartH.Text);
     recTsect.sTSECT[1].iBeginMin = int.Parse(txtAT2StartM.Text);
     recTsect.sTSECT[1].iBeginSec = int.Parse(txtAT2StartS.Text);
     recTsect.sTSECT[1].iEndHour = int.Parse(txtAT2EndH.Text);
     recTsect.sTSECT[1].iEndMin = int.Parse(txtAT2EndM.Text);
     recTsect.sTSECT[1].iEndSec = int.Parse(txtAT2EndS.Text);
     //时间段三
     recTsect.sTSECT[2].bEnable = chkAT3Enable.Checked;
     recTsect.sTSECT[2].iBeginHour = int.Parse(txtAT3StartH.Text);
     recTsect.sTSECT[2].iBeginMin = int.Parse(txtAT3StartM.Text);
     recTsect.sTSECT[2].iBeginSec = int.Parse(txtAT3StartS.Text);
     recTsect.sTSECT[2].iEndHour = int.Parse(txtAT3EndH.Text);
     recTsect.sTSECT[2].iEndMin = int.Parse(txtAT3EndM.Text);
     recTsect.sTSECT[2].iEndSec = int.Parse(txtAT3EndS.Text);
     //时间段四
     recTsect.sTSECT[3].bEnable = chkAT4Enable.Checked;
     recTsect.sTSECT[3].iBeginHour = int.Parse(txtAT4StartH.Text);
     recTsect.sTSECT[3].iBeginMin = int.Parse(txtAT4StartM.Text);
     recTsect.sTSECT[3].iBeginSec = int.Parse(txtAT4StartS.Text);
     recTsect.sTSECT[3].iEndHour = int.Parse(txtAT4EndH.Text);
     recTsect.sTSECT[3].iEndMin = int.Parse(txtAT4EndM.Text);
     recTsect.sTSECT[3].iEndSec = int.Parse(txtAT4EndS.Text);
     //时间段五
     recTsect.sTSECT[4].bEnable = chkAT5Enable.Checked;
     recTsect.sTSECT[4].iBeginHour = int.Parse(txtAT5StartH.Text);
     recTsect.sTSECT[4].iBeginMin = int.Parse(txtAT5StartM.Text);
     recTsect.sTSECT[4].iBeginSec = int.Parse(txtAT5StartS.Text);
     recTsect.sTSECT[4].iEndHour = int.Parse(txtAT5EndH.Text);
     recTsect.sTSECT[4].iEndMin = int.Parse(txtAT5EndM.Text);
     recTsect.sTSECT[4].iEndSec = int.Parse(txtAT5EndS.Text);
     //时间段六
     recTsect.sTSECT[5].bEnable = chkAT6Enable.Checked;
     recTsect.sTSECT[5].iBeginHour = int.Parse(txtAT6StartH.Text);
     recTsect.sTSECT[5].iBeginMin = int.Parse(txtAT6StartM.Text);
     recTsect.sTSECT[5].iBeginSec = int.Parse(txtAT6StartS.Text);
     recTsect.sTSECT[5].iEndHour = int.Parse(txtAT6EndH.Text);
     recTsect.sTSECT[5].iEndMin = int.Parse(txtAT6EndM.Text);
     recTsect.sTSECT[5].iEndSec = int.Parse(txtAT6EndS.Text);
 }
Ejemplo n.º 2
0
  /// <summary>
 /// 录像配置信息时间段信息显示
 /// </summary>
 /// <param name="netConfig">时间段信息</param>
 private void setDataToControl(DH_REC_TSECT tsectConfig,string strType)
 {
     try
     {
         if (strType == "Alarm")
         {
             //时间段一
             chkAT1Enable.Checked = tsectConfig.sTSECT[0].bEnable;
             txtAT1StartH.Text = tsectConfig.sTSECT[0].iBeginHour.ToString();
             txtAT1StartM.Text = tsectConfig.sTSECT[0].iBeginMin.ToString();
             txtAT1StartS.Text = tsectConfig.sTSECT[0].iBeginSec.ToString();
             txtAT1EndH.Text = tsectConfig.sTSECT[0].iEndHour.ToString();
             txtAT1EndM.Text = tsectConfig.sTSECT[0].iEndMin.ToString();
             txtAT1EndS.Text = tsectConfig.sTSECT[0].iEndSec.ToString();
             //时间段二
             chkAT2Enable.Checked = tsectConfig.sTSECT[1].bEnable;
             txtAT2StartH.Text = tsectConfig.sTSECT[1].iBeginHour.ToString();
             txtAT2StartM.Text = tsectConfig.sTSECT[1].iBeginMin.ToString();
             txtAT2StartS.Text = tsectConfig.sTSECT[1].iBeginSec.ToString();
             txtAT2EndH.Text = tsectConfig.sTSECT[1].iEndHour.ToString();
             txtAT2EndM.Text = tsectConfig.sTSECT[1].iEndMin.ToString();
             txtAT2EndS.Text = tsectConfig.sTSECT[1].iEndSec.ToString();
             //时间段三
             chkAT3Enable.Checked = tsectConfig.sTSECT[2].bEnable;
             txtAT3StartH.Text = tsectConfig.sTSECT[2].iBeginHour.ToString();
             txtAT3StartM.Text = tsectConfig.sTSECT[2].iBeginMin.ToString();
             txtAT3StartS.Text = tsectConfig.sTSECT[2].iBeginSec.ToString();
             txtAT3EndH.Text = tsectConfig.sTSECT[2].iEndHour.ToString();
             txtAT3EndM.Text = tsectConfig.sTSECT[2].iEndMin.ToString();
             txtAT3EndS.Text = tsectConfig.sTSECT[2].iEndSec.ToString();
             //时间段四
             chkAT4Enable.Checked = tsectConfig.sTSECT[3].bEnable;
             txtAT4StartH.Text = tsectConfig.sTSECT[3].iBeginHour.ToString();
             txtAT4StartM.Text = tsectConfig.sTSECT[3].iBeginMin.ToString();
             txtAT4StartS.Text = tsectConfig.sTSECT[3].iBeginSec.ToString();
             txtAT4EndH.Text = tsectConfig.sTSECT[3].iEndHour.ToString();
             txtAT4EndM.Text = tsectConfig.sTSECT[3].iEndMin.ToString();
             txtAT4EndS.Text = tsectConfig.sTSECT[3].iEndSec.ToString();
             //时间段五
             chkAT5Enable.Checked = tsectConfig.sTSECT[4].bEnable;
             txtAT5StartH.Text = tsectConfig.sTSECT[4].iBeginHour.ToString();
             txtAT5StartM.Text = tsectConfig.sTSECT[4].iBeginMin.ToString();
             txtAT5StartS.Text = tsectConfig.sTSECT[4].iBeginSec.ToString();
             txtAT5EndH.Text = tsectConfig.sTSECT[4].iEndHour.ToString();
             txtAT5EndM.Text = tsectConfig.sTSECT[4].iEndMin.ToString();
             txtAT5EndS.Text = tsectConfig.sTSECT[4].iEndSec.ToString();
             //时间段六
             chkAT6Enable.Checked = tsectConfig.sTSECT[5].bEnable;
             txtAT6StartH.Text = tsectConfig.sTSECT[5].iBeginHour.ToString();
             txtAT6StartM.Text = tsectConfig.sTSECT[5].iBeginMin.ToString();
             txtAT6StartS.Text = tsectConfig.sTSECT[5].iBeginSec.ToString();
             txtAT6EndH.Text = tsectConfig.sTSECT[5].iEndHour.ToString();
             txtAT6EndM.Text = tsectConfig.sTSECT[5].iEndMin.ToString();
             txtAT6EndS.Text = tsectConfig.sTSECT[5].iEndSec.ToString();
         }
     }
     catch
     {
         MessageBox.Show("赋值错误!", pMsgTitle);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 ///  录像信息星期选择前数据保存处理
 /// </summary>
 /// <param name="recTsect"></param>
 private void TSECTSaveDate(ref DH_REC_TSECT recTsect)
 {
     
     //时间段一
     int intTimeIndex = 0;
     recTsect.sTSECT[intTimeIndex].bEnable = chkT1Enable.Checked;
     recTsect.sTSECT[intTimeIndex].iBeginHour = int.Parse(txtT1StartH.Text);
     recTsect.sTSECT[intTimeIndex].iBeginMin = int.Parse(txtT1StartM.Text);
     recTsect.sTSECT[intTimeIndex].iBeginSec = int.Parse(txtT1StartS.Text);
     recTsect.sTSECT[intTimeIndex].iEndHour = int.Parse(txtT1EndH.Text);
     recTsect.sTSECT[intTimeIndex].iEndMin = int.Parse(txtT1EndM.Text);
     recTsect.sTSECT[intTimeIndex].iEndSec = int.Parse(txtT1EndS.Text);
     //时间段二
     intTimeIndex = 1;
     recTsect.sTSECT[intTimeIndex].bEnable = chkT2Enable.Checked;
     recTsect.sTSECT[intTimeIndex].iBeginHour = int.Parse(txtT2StartH.Text);
     recTsect.sTSECT[intTimeIndex].iBeginMin = int.Parse(txtT2StartM.Text);
     recTsect.sTSECT[intTimeIndex].iBeginSec = int.Parse(txtT2StartS.Text);
     recTsect.sTSECT[intTimeIndex].iEndHour = int.Parse(txtT2EndH.Text);
     recTsect.sTSECT[intTimeIndex].iEndMin = int.Parse(txtT2EndM.Text);
     recTsect.sTSECT[intTimeIndex].iEndSec = int.Parse(txtT2EndS.Text);
     //时间段三
     intTimeIndex = 2;
     recTsect.sTSECT[intTimeIndex].bEnable = chkT3Enable.Checked;
     recTsect.sTSECT[intTimeIndex].iBeginHour = int.Parse(txtT3StartH.Text);
     recTsect.sTSECT[intTimeIndex].iBeginMin = int.Parse(txtT3StartM.Text);
     recTsect.sTSECT[intTimeIndex].iBeginSec = int.Parse(txtT3StartS.Text);
     recTsect.sTSECT[intTimeIndex].iEndHour = int.Parse(txtT3EndH.Text);
     recTsect.sTSECT[intTimeIndex].iEndMin = int.Parse(txtT3EndM.Text);
     recTsect.sTSECT[intTimeIndex].iEndSec = int.Parse(txtT3EndS.Text);
     //时间段四
     intTimeIndex = 3;
     recTsect.sTSECT[intTimeIndex].bEnable = chkT4Enable.Checked;
     recTsect.sTSECT[intTimeIndex].iBeginHour = int.Parse(txtT4StartH.Text);
     recTsect.sTSECT[intTimeIndex].iBeginMin = int.Parse(txtT4StartM.Text);
     recTsect.sTSECT[intTimeIndex].iBeginSec = int.Parse(txtT4StartS.Text);
     recTsect.sTSECT[intTimeIndex].iEndHour = int.Parse(txtT4EndH.Text);
     recTsect.sTSECT[intTimeIndex].iEndMin = int.Parse(txtT4EndM.Text);
     recTsect.sTSECT[intTimeIndex].iEndSec = int.Parse(txtT4EndS.Text);
     //时间段五
     intTimeIndex = 4;
     recTsect.sTSECT[intTimeIndex].bEnable = chkT5Enable.Checked;
     recTsect.sTSECT[intTimeIndex].iBeginHour = int.Parse(txtT5StartH.Text);
     recTsect.sTSECT[intTimeIndex].iBeginMin = int.Parse(txtT5StartM.Text);
     recTsect.sTSECT[intTimeIndex].iBeginSec = int.Parse(txtT5StartS.Text);
     recTsect.sTSECT[intTimeIndex].iEndHour = int.Parse(txtT5EndH.Text);
     recTsect.sTSECT[intTimeIndex].iEndMin = int.Parse(txtT5EndM.Text);
     recTsect.sTSECT[intTimeIndex].iEndSec = int.Parse(txtT5EndS.Text);
     //时间段六
     intTimeIndex = 5;
     recTsect.sTSECT[intTimeIndex].bEnable = chkT6Enable.Checked;
     recTsect.sTSECT[intTimeIndex].iBeginHour = int.Parse(txtT6StartH.Text);
     recTsect.sTSECT[intTimeIndex].iBeginMin = int.Parse(txtT6StartM.Text);
     recTsect.sTSECT[intTimeIndex].iBeginSec = int.Parse(txtT6StartS.Text);
     recTsect.sTSECT[intTimeIndex].iEndHour = int.Parse(txtT6EndH.Text);
     recTsect.sTSECT[intTimeIndex].iEndMin = int.Parse(txtT6EndM.Text);
     recTsect.sTSECT[intTimeIndex].iEndSec = int.Parse(txtT6EndS.Text);
 }