示例#1
0
 public VsAlarmParas(VsAppControlType eventFrom, VsAppControlType eventTo, VsDeviceType device,
                     String deviceName, VsAlarmType alarmParas)
     : base(eventFrom, eventTo, device, deviceName)
 {
     MsgType    = VsMessageType.MSG_ALARM_STYLE;
     AlarmParas = alarmParas;
 }
示例#2
0
 public VsViewerParas(VsAppControlType eventFrom, VsAppControlType eventTo, VsDeviceType device,
                      String deviceName, VsViewerType viewerParas)
     : base(eventFrom, eventTo, device, deviceName)
 {
     MsgType     = VsMessageType.MSG_VIEWER_STYLE;
     ViewerParas = viewerParas;
 }
示例#3
0
 public VsParameter(VsAppControlType eventFrom, VsAppControlType eventTo, VsDeviceType device, String deviceName)
 {
     EventFrom  = eventFrom;
     EventTo    = eventTo;
     Device     = device;
     DeviceName = deviceName;
 }
示例#4
0
        public void ActivatePropertyControl(VsDeviceType propType, String propName)
        {
            vsPropertyType = propType;
            vsTypeName     = propName;

            this.Enabled = true;

            switch (vsPropertyType)
            {
            case VsDeviceType.CAMERA:
                CameraProperty();
                this.vsCamera = vsCoreMonitor.GetCameraByName(vsTypeName);
                break;

            case VsDeviceType.CHANNEL:
                ChannelProperty();
                this.vsChannel = vsCoreMonitor.GetChannelByName(vsTypeName);
                break;

            case VsDeviceType.PAGE:
                PageProperty();
                this.vsPage = vsCoreMonitor.GetPageByName(vsTypeName);
                break;
            }
        }
示例#5
0
        public void InitialViewer()
        {
            vsViewer.Image    = global::Vs.Monitor.Properties.Resources.isys;
            vsViewer.SizeMode = PictureBoxSizeMode.CenterImage;

            i = 0;
            // initial toolbox - disable
            labelStatus.Text = "";
            panelTool.Focus();
            buttonStop.Enabled     = false;
            buttonAttach.Enabled   = false;
            buttonAnalyzer.Enabled = false;

            this.BorderStyle = BorderStyle.None;

            vsDeviceType = VsDeviceType.CAMERA;
            vsAttachType = VsAttachType.ATTACH_RECEIVER;
            vsStatus     = VsViewStatusType.VIEW_AVAIABLE;
        }
示例#6
0
 public VsAlarmParas(VsAppControlType eventFrom, VsAppControlType eventTo, VsDeviceType device,
     String deviceName, VsAlarmType alarmParas)
     : base(eventFrom, eventTo, device, deviceName)
 {
     MsgType = VsMessageType.MSG_ALARM_STYLE;
     AlarmParas = alarmParas;
 }
示例#7
0
 public VsViewerParas(VsAppControlType eventFrom, VsAppControlType eventTo, VsDeviceType device,
     String deviceName, VsViewerType viewerParas)
     : base(eventFrom, eventTo, device, deviceName)
 {
     MsgType = VsMessageType.MSG_VIEWER_STYLE;
     ViewerParas = viewerParas;
 }
示例#8
0
 public VsParameter(VsAppControlType eventFrom, VsAppControlType eventTo, VsDeviceType device, String deviceName)
 {
     EventFrom = eventFrom;
     EventTo = eventTo;
     Device = device;
     DeviceName = deviceName;
 }
示例#9
0
        public void ActivatePropertyControl(VsDeviceType propType, String propName)
        {
            vsPropertyType = propType;
            vsTypeName = propName;

            this.Enabled = true;

            switch (vsPropertyType)
            {
                case VsDeviceType.CAMERA:
                    CameraProperty();
                    this.vsCamera = vsCoreMonitor.GetCameraByName(vsTypeName);
                    break;
                case VsDeviceType.CHANNEL:
                    ChannelProperty();
                    this.vsChannel = vsCoreMonitor.GetChannelByName(vsTypeName);
                    break;
                case VsDeviceType.PAGE:
                    PageProperty();
                    this.vsPage = vsCoreMonitor.GetPageByName(vsTypeName);
                    break;
            }
        }
示例#10
0
        public void InitialViewer()
        {
            vsViewer.Image = global::Vs.Monitor.Properties.Resources.isys;
            vsViewer.SizeMode = PictureBoxSizeMode.CenterImage;

            i = 0;
            // initial toolbox - disable 
            labelStatus.Text = "";
            panelTool.Focus();
            buttonStop.Enabled = false;
            buttonAttach.Enabled = false;
            buttonAnalyzer.Enabled = false;

            this.BorderStyle = BorderStyle.None;

            vsDeviceType = VsDeviceType.CAMERA;
            vsAttachType = VsAttachType.ATTACH_RECEIVER;
            vsStatus = VsViewStatusType.VIEW_AVAIABLE;
        }
示例#11
0
        // drag drop into window
        void VsCameraViewer_DragDrop(object sender, DragEventArgs e)
        {
            this.BorderStyle = BorderStyle.None;

            if (vsStatus == VsViewStatusType.VIEW_CONNECTING || vsStatus == VsViewStatusType.VIEW_CONNECTED) return;

            string send = (string)e.Data.GetData(typeof(string));
            string[] cmd = send.Split('\\');

            vsDeviceName = cmd[1];
            // check if not root node
            if (cmd.Length == 2 && cmd[0] == "Analyzers")
            {
                // set flag
                vsDeviceType = VsDeviceType.CAMERA;
                vsStatus = VsViewStatusType.VIEW_CONNECTING;

                // update event
                this.vsUpdateEvent(this, new VsMonitorEventArgs(
                    new VsParameter(VsAppControlType.APP_SIGLEVIEW, VsAppControlType.APP_SIGLEVIEW, vsDeviceType, vsDeviceName)));

                labelStatus.Text = "Connecting...";
                // the current camera is connected
                if (!vsCoreMonitor.ConnectingCamera(vsDeviceName))
                {
                    // not connected
                    // try to connect
                    if (!vsCoreMonitor.ConnectCamera(vsDeviceName, false))
                        return;

                    // cache current camera
                    vsCamera = vsCoreMonitor.GetCameraByName(vsDeviceName);
                }

                // the camera is connected
                // attach to current view
                vsCoreMonitor.AttachCameraView(vsDeviceName, this);
                vsAttachType = VsAttachType.ATTACH_RECEIVER;

                // enable toolbox
                buttonStop.Enabled = true;
                buttonAttach.Enabled = true;
                buttonAnalyzer.Enabled = true;
            }
            else if (cmd.Length == 2 && cmd[0] == "Layouts")
            {
                // set flag
                vsDeviceType = VsDeviceType.CHANNEL;
                vsStatus = VsViewStatusType.VIEW_CONNECTING;

                // update event
                this.vsUpdateEvent(this, new VsMonitorEventArgs(
                    new VsParameter(VsAppControlType.APP_SIGLEVIEW, VsAppControlType.APP_SIGLEVIEW, vsDeviceType, vsDeviceName)));

                // the current channel is connected
                if (!vsCoreMonitor.ConnectingChannel(vsDeviceName))
                {
                    // not connected
                    // try to connect
                    if (!vsCoreMonitor.ConnectChannel(vsDeviceName, false))
                        return;

                    // cache current camera
                    vsChannel = vsCoreMonitor.GetChannelByName(vsDeviceName);
                }

                // the camera is connected
                // attach to current view
                vsCoreMonitor.AttachChannelView(vsDeviceName, this);

                // enable toolbox
                buttonStop.Enabled = true;
                buttonAttach.Enabled = true;
                buttonAnalyzer.Enabled = true;
            }
        }
示例#12
0
        public void connectDevice(string send)
        {
            if (vsStatus == VsViewStatusType.VIEW_CONNECTING || vsStatus == VsViewStatusType.VIEW_CONNECTED)
            {
                return;
            }

            string[] cmd = send.Split('\\');

            vsDeviceName = cmd[1];
            // check if not root node
            if (cmd.Length == 2 && cmd[0] == "Analyzers")
            {
                // set flag
                vsDeviceType = VsDeviceType.CAMERA;
                vsStatus     = VsViewStatusType.VIEW_CONNECTING;

                // update event
                this.vsUpdateEvent(this, new VsMonitorEventArgs(
                                       new VsParameter(VsAppControlType.APP_SIGLEVIEW, VsAppControlType.APP_SIGLEVIEW, vsDeviceType, vsDeviceName)));

                labelStatus.Text = "Connecting...";
                // the current camera is connected
                if (!vsCoreMonitor.ConnectingCamera(vsDeviceName))
                {
                    // not connected
                    // try to connect
                    if (!vsCoreMonitor.ConnectCamera(vsDeviceName, false))
                    {
                        return;
                    }

                    // cache current camera
                    vsCamera = vsCoreMonitor.GetCameraByName(vsDeviceName);
                }

                // the camera is connected
                // attach to current view
                vsCoreMonitor.AttachCameraView(vsDeviceName, this);
                vsAttachType = VsAttachType.ATTACH_RECEIVER;

                // enable toolbox
                buttonStop.Enabled     = true;
                buttonAttach.Enabled   = true;
                buttonAnalyzer.Enabled = true;
            }
            else if (cmd.Length == 2 && cmd[0] == "Layouts")
            {
                // set flag
                vsDeviceType = VsDeviceType.CHANNEL;
                vsStatus     = VsViewStatusType.VIEW_CONNECTING;

                // update event
                this.vsUpdateEvent(this, new VsMonitorEventArgs(
                                       new VsParameter(VsAppControlType.APP_SIGLEVIEW, VsAppControlType.APP_SIGLEVIEW, vsDeviceType, vsDeviceName)));

                // the current channel is connected
                if (!vsCoreMonitor.ConnectingChannel(vsDeviceName))
                {
                    // not connected
                    // try to connect
                    if (!vsCoreMonitor.ConnectChannel(vsDeviceName, false))
                    {
                        return;
                    }

                    // cache current camera
                    vsChannel = vsCoreMonitor.GetChannelByName(vsDeviceName);
                }

                // the camera is connected
                // attach to current view
                vsCoreMonitor.AttachChannelView(vsDeviceName, this);

                // enable toolbox
                buttonStop.Enabled     = true;
                buttonAttach.Enabled   = true;
                buttonAnalyzer.Enabled = true;
            }
        }