예제 #1
0
        //3) After the green screen will be filled, close the window and go back
        public void CloseRecordWindow()
        {
            if (!ExeWindowTitleReader.GetActiveWindowTitle().Equals(WINDOW_TITLE_LEARN_IR_CODE))
            {
                return;
            }

            ActionSimulator.ClickOnBtn(VirtualKeyCode.TAB);
            ActionSimulator.ClickOnBtn(VirtualKeyCode.TAB);
            ActionSimulator.ClickOnBtn(VirtualKeyCode.RETURN);
            //WaitForWindowTitle(WINDOW_TITLE_HEX_CODE, false, this);
        }
예제 #2
0
 public void AskForRightClickOnBar()
 {
     MouseWatcher.Start();
     MouseWatcher.OnMouseInput += (s, e) =>
     {
         ExeWindowTitleReader.GetActiveWindowTitle();
         if (e.Message == EventHook.Hooks.MouseMessages.WM_RBUTTONUP)
         {
             MouseWatcher.Stop();
         }
     };
 }
        internal void CheckForClosingDialog()
        {
            Console.WriteLine("sleeping");
            Thread.Sleep(CLOSE_WINDOW_WAIT_TIME);
            ActionSimulator.ClickOnBtn(WindowsInput.Native.VirtualKeyCode.SPACE);
            ActionSimulator.ClickOnBtn(WindowsInput.Native.VirtualKeyCode.SPACE);
            Console.WriteLine("waking! window: " + ExeWindowTitleReader.GetActiveWindowTitle());
            Console.WriteLine("is it close window? : " + ExeWindowTitleReader.GetActiveWindowTitle().Equals(CLOSE_WINDOW_TITLE));

            /*if (ExeWindowTitleReader.GetActiveWindowTitle().Equals(CLOSE_WINDOW_TITLE))
             * {
             *  Console.WriteLine("clicking space");
             *  ActionSimulator.ClickOnBtn(WindowsInput.Native.VirtualKeyCode.SPACE);
             * }*/
        }
예제 #4
0
        private void WaitForWindowTitle(string windowTitle, IWindowChangedListener windowChangedListener)
        //private void WaitForWindowTitle(string windowTitle, bool firstVisit, IWindowChangedListener windowChangedListener)
        {
            var windowDidntChangeYet = true;

            while (windowDidntChangeYet)
            {
                Thread.Sleep(250);
                if (ExeWindowTitleReader.GetActiveWindowTitle() == null || CursorIcon.IsCursorType(Cursors.WaitCursor.Handle))
                {
                    return;
                }
                if (ExeWindowTitleReader.GetActiveWindowTitle().Equals(windowTitle))
                {
                    windowDidntChangeYet = false;
                }
            }

            //windowChangedListener.OnWindowChanged(windowTitle, firstVisit);
            windowChangedListener.OnWindowChanged(windowTitle);
        }
 private bool StillInRecordWindow()
 {
     return(ExeWindowTitleReader.GetActiveWindowTitle().Equals(KeyboardMouseSimulator.WINDOW_TITLE_LEARN_IR_CODE));
 }
예제 #6
0
 private bool WindowClosed()
 {
     return(ExeWindowTitleReader.GetActiveWindowTitle().Equals(KeyboardMouseSimulator.WINDOW_TITLE_HEX_CODE));
 }