Esempio n. 1
0
 void displayFont(IntPtr dialog, Int64 timeStamp)
 {
     Dialog.OneDialog cuDlg = m_dialog.getDialog(dialog);
     if (null == cuDlg)
     {
         return;
     }
     if (cuDlg.panel != null)
     {
         AfterRenderIndex idx = getIdx(dialog);
         if (idx == null)
         {
             return;
         }
         cuDlg.panel.BeginInvoke(refreshAfterRenderIdx, new object[] { cuDlg, timeStamp });
         BVCU.Color color = new BVCU.Color(0xFFFFFFFF);
         try
         {
             BVCU.BVDisplay_DisplayFont(idx.dispHandle, idx.index, ref idx.dispRect,
                                        ref color, cuDlg.timeStamp.ToString("yyyy'/'MM'/'dd HH:mm:ss"));
         }
         catch
         { }
     }
 }
Esempio n. 2
0
 /*
  * 创建用于叠加显示的字体
  */
 public void createTimeStampFont(Dialog.OneDialog dialog)
 {
     if (null == dialog)
     {
         return;
     }
     dialog.panel.BeginInvoke(createFontInDialog, new object[] { dialog });
 }
Esempio n. 3
0
 private void buttonGetPtzAttr_Click(object sender, EventArgs e)
 {
     Dialog.OneDialog dlg = m_sdkOperator.Dialog.getDialog(m_activePanel);
     if (dlg != null)
     {
         m_sdkOperator.getPtzAttr(dlg.pu.id, dlg.channelNo);
     }
 }
Esempio n. 4
0
 private void buttonGotoPresetPoint_Click(object sender, EventArgs e)
 {
     try
     {
         int index            = int.Parse(comboBoxPresetPoint.Text.Substring(0, comboBoxPresetPoint.Text.IndexOf(" | ")));
         Dialog.OneDialog dlg = m_sdkOperator.Dialog.getDialog(m_activePanel);
         if (dlg == null)
         {
             return;
         }
         m_sdkOperator.ptzControl(BVCU_PTZ_COMMAND.PRESET_GO, dlg.pu.id, dlg.channelNo, BVCU_PTZ_MOVE.BEGIN, index);
     }
     catch
     { }
 }
Esempio n. 5
0
 private void comboBoxCruiseLine_DropDown(object sender, EventArgs e)
 {
     comboBoxCruiseLine.Items.Clear();
     Dialog.OneDialog dlg = m_sdkOperator.Dialog.getDialog(m_activePanel);
     if (dlg != null && dlg.pu.puPtz.Count > 0)
     {
         BVCU_PUCFG_PTZAttr ptzAttr = (BVCU_PUCFG_PTZAttr)dlg.pu.puPtz[0];
         foreach (BVCU_PUCFG_Cruise cruise in ptzAttr.stCruise)
         {
             if (cruise.iIndex != -1)
             {
                 comboBoxCruiseLine.Items.Add(cruise.iIndex + " | " + cruise.szName);
             }
         }
     }
 }
Esempio n. 6
0
 private void comboBoxPresetPoint_DropDown(object sender, EventArgs e)
 {
     comboBoxPresetPoint.Items.Clear();
     Dialog.OneDialog dlg = m_sdkOperator.Dialog.getDialog(m_activePanel);
     if (dlg != null && dlg.pu.puPtz.Count > 0)
     {
         BVCU_PUCFG_PTZAttr ptzAttr = (BVCU_PUCFG_PTZAttr)dlg.pu.puPtz[0];
         foreach (BVCU_PUCFG_Preset preset in ptzAttr.stPreset)
         {
             if (preset.iIndex != -1)
             {
                 comboBoxPresetPoint.Items.Add(preset.iIndex + " | " + preset.szPreset);
             }
         }
     }
 }
Esempio n. 7
0
        void procRefreshAfterRenderIdx(Dialog.OneDialog dialog, Int64 timeStamp)
        {
            AfterRenderIndex idx = getIdx(dialog.dialogHandle);

            if (null == idx)
            {
                return;
            }
            idx.dispHandle = dialog.panel.Handle;
            idx.dispRect   = new BVRect(dialog.panel.ClientRectangle.Top,
                                        dialog.panel.ClientRectangle.Left,
                                        dialog.panel.ClientRectangle.Bottom,
                                        dialog.panel.ClientRectangle.Right);
            double   time     = timeStamp / BVCU.SAV_TIME_BASE + 28800;
            DateTime dateTime = new DateTime(1970, 1, 1, 0, 0, 0).AddSeconds(time);

            dialog.timeStamp = dateTime;
        }
Esempio n. 8
0
        void procCreateFontInDialog(Dialog.OneDialog dialog)
        {
            AfterRenderIndex idx = new AfterRenderIndex();

            idx.type         = INDEX_TYPE.FONT;
            idx.dispHandle   = dialog.panel.Handle;
            idx.dialogHandle = dialog.dialogHandle;
            if (!BVCU.SUCCEEDED(BVCU.BVDisplay_CreateFont(idx.dispHandle,
                                                          ref idx.index, 15, "Arial")))
            {
                return;
            }
            BVCU.FontDisplayMode effect = new BVCU.FontDisplayMode();
            effect.size       = BVCU.FONT_DISPLAY_MODE_SIZE;
            effect.fontColor  = new BVCU.Color(0xFFFFFFFF);
            effect.backColor  = new BVCU.Color(0xFF000000);
            effect.effect     = BVCU.BVDISPLAY_TEXT_EFFECT_OUTLINE;
            effect.effectSize = 1;
            BVCU.BVDisplay_SetFontDisplayMode(idx.dispHandle, idx.index, ref effect);
            m_afterRenderList.Add(idx);
        }
Esempio n. 9
0
 private void buttonCruise_Click(object sender, EventArgs e)
 {
     try
     {
         int index = int.Parse(comboBoxCruiseLine.Text.Substring(0, comboBoxCruiseLine.Text.IndexOf(" | ")));
         m_cruiseBegin = !m_cruiseBegin;
         Dialog.OneDialog dlg = m_sdkOperator.Dialog.getDialog(m_activePanel);
         if (dlg == null)
         {
             return;
         }
         if (m_cruiseBegin)
         {
             m_sdkOperator.ptzControl(BVCU_PTZ_COMMAND.CRUISE_GO, dlg.pu.id, dlg.channelNo, BVCU_PTZ_MOVE.BEGIN, index);
         }
         else
         {
             m_sdkOperator.ptzControl(BVCU_PTZ_COMMAND.CRUISE_STOP, dlg.pu.id, dlg.channelNo, BVCU_PTZ_MOVE.BEGIN, index);
         }
     }
     catch
     { }
 }
Esempio n. 10
0
        void buttonPtzControl(Button button, BVCU_PTZ_MOVE move)
        {
            int cmd = BVCU_PTZ_COMMAND.UP;

            if (button.Name.Equals("buttonPTZLeftUp"))
            {
                cmd = BVCU_PTZ_COMMAND.LEFTTOP;
            }
            else if (button.Name.Equals("buttonPTZUp"))
            {
                cmd = BVCU_PTZ_COMMAND.UP;
            }
            else if (button.Name.Equals("buttonPTZRightUp"))
            {
                cmd = BVCU_PTZ_COMMAND.RIGHTTOP;
            }
            else if (button.Name.Equals("buttonPTZRight"))
            {
                cmd = BVCU_PTZ_COMMAND.RIGHT;
            }
            else if (button.Name.Equals("buttonPTZRightDown"))
            {
                cmd = BVCU_PTZ_COMMAND.RIGHTDOWN;
            }
            else if (button.Name.Equals("buttonPTZDown"))
            {
                cmd = BVCU_PTZ_COMMAND.DOWN;
            }
            else if (button.Name.Equals("buttonPTZLeftDown"))
            {
                cmd = BVCU_PTZ_COMMAND.LEFTDOWN;
            }
            else if (button.Name.Equals("buttonPTZLeft"))
            {
                cmd = BVCU_PTZ_COMMAND.LEFT;
            }
            else if (button.Name.Equals("buttonLensUp"))
            {
                cmd = BVCU_PTZ_COMMAND.ZOOM_DEC;
            }
            else if (button.Name.Equals("buttonLensDown"))
            {
                cmd = BVCU_PTZ_COMMAND.ZOOM_INC;
            }
            else if (button.Name.Equals("buttonFocusUp"))
            {
                cmd = BVCU_PTZ_COMMAND.FOCUS_DEC;
            }
            else if (button.Name.Equals("buttonFocusDown"))
            {
                cmd = BVCU_PTZ_COMMAND.FOCUS_INC;
            }
            else if (button.Name.Equals("buttonApertureUp"))
            {
                cmd = BVCU_PTZ_COMMAND.APERTURE_DEC;
            }
            else if (button.Name.Equals("buttonApertureDown"))
            {
                cmd = BVCU_PTZ_COMMAND.APERTURE_INC;
            }
            else
            {
                return;
            }
            Dialog.OneDialog dlg = m_sdkOperator.Dialog.getDialog(m_activePanel);
            if (dlg != null)
            {
                m_sdkOperator.ptzControl(cmd, dlg.pu.id, dlg.channelNo, move);
            }
        }