コード例 #1
0
        public override void Execute()
        {
            var properties = new WebcamWindowProperties()
            {
                IsEnabled  = Store.Data.Webcam.IsWebcamEnabled,
                BorderSize = 10
            };

            if (Store.Data.Webcam.IsWebcamEnabled && Store.Data.Webcam.Window != null)
            {
                Store.Data.Webcam.Window.Dispatcher.Invoke(new Action(() =>
                {
                    properties.Left       = Store.Data.Webcam.Window.Left;
                    properties.Top        = Store.Data.Webcam.Window.Top;
                    properties.Height     = Store.Data.Webcam.Window.Height;
                    properties.Width      = Store.Data.Webcam.Window.Width;
                    properties.BorderSize = Store.Data.Webcam.Window.BorderSize;
                }));
            }

            EmitService.EmitWebcamWindowProperties(properties);
        }
コード例 #2
0
 /// <summary>
 /// Emits a response with webcam window properties.
 /// </summary>
 /// <param name="webcamWindowProperties"></param>
 public static void EmitWebcamWindowProperties(WebcamWindowProperties webcamWindowProperties)
 {
     EmitSerializedOutput(AvailableCommand.GetWebcamWindowProperties, webcamWindowProperties);
 }