Example #1
0
        public IMarshalWindow Push(IntPtr handle)
        {
            Window         window        = GetWindow(handle);
            IMarshalWindow marshalWindow = MarshalWindow.CreateInstance(window);

            Push(marshalWindow);
            return(marshalWindow);
        }
 public static void SetCheckBox <T>(this IMarshalWindow window, string name, bool isChecked)
 {
     if (window.IsChecked <T>(name) == isChecked)
     {
         return;
     }
     window.NativeClick <ZoomLabSettingsDialogBox>(name);
 }
Example #3
0
        public void Pop(bool close = true)
        {
            IMarshalWindow w = windowStack.Pop();

            if (close)
            {
                w?.Close();
            }
        }
        public static IMarshalWindow WaitAndPush <T>(this IWindowStackManager windowStackManager,
                                                     Action action, string name, int timeout = 5000)
            where T : DispatcherObject
        {
            IntPtr         handle = WindowWatcher.Push(name, action, timeout);
            IMarshalWindow window = windowStackManager.Push(handle);

            Assert.IsNotNull(window);
            Assert.IsTrue(window.IsType <T>());
            Assert.IsTrue(name == null || name == window.Title);
            return(window);
        }
        public static void NativeClickList <T>(this IMarshalWindow window, string name, int index)
        {
            Point p = window.GetListElementPosition <T>(name, index);

            MouseUtil.SendMouseLeftClick((int)p.X, (int)p.Y);
        }
        public static void NativeClick <T>(this IMarshalWindow window, string name)
        {
            Point p = window.GetPosition <T>(name);

            MouseUtil.SendMouseLeftClick((int)p.X, (int)p.Y);
        }
Example #7
0
 public void Push(IMarshalWindow marshalWindow)
 {
     windowStack.Push(marshalWindow);
 }