Exemple #1
0
 private void button6_Click(object sender, EventArgs e)
 {
     using (TagConfigure tc = new TagConfigure {
         TagsNV = TagsNV, Owner = this
     })
     {
         if (tc.ShowDialog() == DialogResult.OK)
         {
             TagsNV = tc.TagsNV;
         }
     }
 }
Exemple #2
0
        public void ProcessKey(string keycommand)
        {
            //non-specific commands
            switch (keycommand.ToLower())
            {
            case "standby":
            case "back":
            case "power":
                Close();
                return;

            case "import":
                using (var imp = new Importer())
                {
                    imp.ShowDialog(this);
                }
                return;
            }
            int i;
            var c = GetActiveControl(out i);

            if (i == -1)
            {
                return;
            }


            var cw = c as CameraWindow;
            var vl = c as VolumeLevel;
            var fp = c as FloorPlanControl;

            switch (keycommand.ToLower())
            {
            case "channelup":
            case "nexttrack":
            case "next_control":
                i++;
                if (i == _pnlCameras.Controls.Count)
                {
                    i = 0;
                }
                _pnlCameras.Controls[i].Focus();
                break;

            case "channeldown":
            case "previoustrack":
            case "previous_control":
                i--;
                if (i == -1)
                {
                    i = _pnlCameras.Controls.Count - 1;
                }
                _pnlCameras.Controls[i].Focus();
                break;

            case "play":
            case "pause":
                if (cw != null)
                {
                    if (cw.Camobject.settings.active)
                    {
                        _pnlCameras.Maximise(cw);
                    }
                    else
                    {
                        cw.Enable();
                    }
                }
                if (vl != null)
                {
                    if (vl.Micobject.settings.active)
                    {
                        _pnlCameras.Maximise(vl);
                    }
                    else
                    {
                        vl.Enable();
                    }
                }
                break;

            case "stop":
                cw?.Disable();
                vl?.Disable();
                break;

            case "record":
                cw?.RecordSwitch(!((CameraWindow)c).Recording);
                vl?.RecordSwitch(!((VolumeLevel)c).Recording);
                break;

            case "maxmin":
            case "zoom":
                if (c is CameraWindow || c is VolumeLevel || c is FloorPlanControl)
                {
                    _pnlCameras.Maximise(c);
                }
                break;

            case "delete":
                if (cw != null)
                {
                    RemoveCamera(cw, true);
                }
                if (vl != null)
                {
                    RemoveMicrophone(vl, true);
                }
                if (fp != null)
                {
                    RemoveFloorplan(fp, true);
                }
                break;

            case "talk":

                if (cw != null)
                {
                    cw.Talking = !cw.Talking;
                    TalkTo(cw, cw.Talking);
                }
                break;

            case "listen":
                cw?.Listen();
                vl?.Listen();
                break;

            case "grab":
                cw?.Snapshot();
                break;

            case "edit":
                if (cw != null)
                {
                    EditCamera(cw.Camobject);
                }
                if (vl != null)
                {
                    EditMicrophone(vl.Micobject);
                }
                if (fp != null)
                {
                    EditFloorplan(fp.Fpobject);
                }

                break;

            case "tags":
                if (cw != null)
                {
                    using (TagConfigure tc = new TagConfigure {
                        TagsNV = cw.Camobject.settings.tagsnv, Owner = this
                    })
                    {
                        if (tc.ShowDialog() == DialogResult.OK)
                        {
                            cw.Camobject.settings.tagsnv = tc.TagsNV;
                            if (cw.Camera != null)
                            {
                                cw.Camera.Tags = null;
                            }
                        }
                    }
                }
                break;
            }
        }
Exemple #3
0
        public void ProcessKey(string keycommand)
        {
            //non-specific commands
            switch (keycommand.ToLower())
            {
                case "standby":
                case "back":
                case "power":
                    Close();
                    return;
                case "import":
                    using (var imp = new Importer())
                    {
                        imp.ShowDialog(this);
                    }
                    return;
            }
            int i;
            var c = GetActiveControl(out i);
            if (i == -1)
                return;
            

            var cw = c as CameraWindow;
            var vl = c as VolumeLevel;
            var fp = c as FloorPlanControl;

            switch (keycommand.ToLower())
            {
                case "channelup":
                case "nexttrack":
                case "next_control":
                    i++;
                    if (i == _pnlCameras.Controls.Count)
                        i = 0;
                    _pnlCameras.Controls[i].Focus();
                    break;
                case "channeldown":
                case "previoustrack":
                case "previous_control":
                    i--;
                    if (i == -1)
                        i = _pnlCameras.Controls.Count - 1;
                    _pnlCameras.Controls[i].Focus();
                    break;
                case "play":
                case "pause":
                    if (cw != null)
                    {
                        if (cw.Camobject.settings.active)
                        {
                            Maximise(cw);
                        }
                        else
                            cw.Enable();
                    }
                    if (vl != null)
                    {
                        if (vl.Micobject.settings.active)
                        {
                            Maximise(vl);
                        }
                        else
                            vl.Enable();
                    }
                    break;
                case "stop":
                    cw?.Disable();
                    vl?.Disable();
                    break;
                case "record":
                    cw?.RecordSwitch(!((CameraWindow)c).Recording);
                    vl?.RecordSwitch(!((VolumeLevel)c).Recording);
                    break;
                case "maxmin":
                case "zoom":
                    if (c is CameraWindow || c is VolumeLevel || c is FloorPlanControl)
                    {
                        Maximise(c);
                    }
                    break;
                case "delete":
                    if (cw != null)
                    {
                        RemoveCamera(cw,true);
                    }
                    if (vl != null)
                    {
                        RemoveMicrophone(vl, true);
                    }
                    if (fp != null)
                    {
                        RemoveFloorplan(fp, true);
                    }
                    break;
                case "talk":
                    
                    if (cw!=null)
                    {
                        cw.Talking = !cw.Talking;
                        TalkTo(cw, cw.Talking);
                    }
                    break;
                case "listen":
                    cw?.Listen();
                    vl?.Listen();
                    break;
                case "grab":
                    cw?.Snapshot();
                    break;
                case "edit":
                    if (cw != null)
                        EditCamera(cw.Camobject);
                    if (vl!=null)
                        EditMicrophone(vl.Micobject);
                    if (fp!=null)
                        EditFloorplan(fp.Fpobject);

                    break;
                case "tags":
                    if (cw != null)
                    {
                        using (TagConfigure tc = new TagConfigure { TagsNV = cw.Camobject.settings.tagsnv, Owner = this })
                        {
                            if (tc.ShowDialog() == DialogResult.OK)
                            {
                                cw.Camobject.settings.tagsnv = tc.TagsNV;
                                if (cw.Camera!=null)
                                    cw.Camera.Tags = null;
                            }
                        }
                    }
                    break;
            }
        }
Exemple #4
0
 private void button6_Click(object sender, EventArgs e)
 {
     using (TagConfigure tc = new TagConfigure {TagsNV = TagsNV, Owner = this})
     {
         if (tc.ShowDialog() == DialogResult.OK)
         {
             TagsNV = tc.TagsNV;
         }
     }
 }