コード例 #1
0
 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     video_interval.Enabled = false;
     ServerHttpListener.StopThread();
     DeviceController.StopAllDevices(false);
     Configuration.SaveConfiguration();
 }
コード例 #2
0
 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     video_interval.Enabled = false;
     ServerHttpListener.StopThread();
     _controller.Exit();
     // TODO: Implements automatic bind devices
     //_controller.ctxApp.Config.Ctx.Devices = DeviceController.BindDeviceConfiguration();
     _controller.SaveConfig();
 }
コード例 #3
0
        public void ApplyContext()
        {
            Config = _config.Load();

            // Services
            try
            {
                if (Config.EnableServer)
                {
                    ServerHttpListener.StratThread();
                }
                else
                {
                    ServerHttpListener.StopThread();
                }
            }
            catch (Exception)
            {
                _notify.FailMessage("Falha ao inicializar serviços!");
            }

            //Devices
            foreach (var videoCapture in _videosCapture)
            {
                // Timer
                if (Config.EnableInterval)
                {
                    videoCapture.StartDevice();
                    videoCapture.StartVideo();
                }

                videoCapture.UpdateConfig();
            }

            _view.UpdateConfig();
        }
コード例 #4
0
 private void lbl_link_VisibleChanged(object sender, EventArgs e)
 {
     lbl_link.Text = $"http://{ServerHttpListener.LocalIPAddress()}:80/";
 }