Ejemplo n.º 1
0
        public Image TakePhoto()
        {
            _lastImagePath = null;
            var hWindow = WindowTools.FindWindowByWindowName("Remote Camera Control");

            WindowTools.SetForegroundWindow(hWindow);
            WindowTools.SetWindowPosition(hWindow, new Point(0, 0));
            MouseTools.Move(new Point(223, 193));
            MouseTools.Click(MouseTools.Button.Left, MouseTools.Speed.Slow);

            if (_waitHandle.WaitOne(5000) && _lastImagePath != null)
            {
                return(Image.FromFile(_lastImagePath));
            }

            return(null);
        }