예제 #1
0
        public TestCaseDropdownBox()
        {
            var testItems = new string[10];
            int i         = 0;

            while (i < items_to_add)
            {
                testItems[i] = @"test " + i++;
            }

            Add(testDropdown = new TestDropdown
            {
                Width    = 150,
                Position = new Vector2(200, 70),
                Items    = testItems
            });

            Add(testDropdownMenu = new TestDropdown
            {
                Width    = 150,
                Position = new Vector2(400, 70),
                Items    = testItems
            });

            Add(bindableDropdown = new TestDropdown
            {
                Width      = 150,
                Position   = new Vector2(600, 70),
                ItemSource = bindableList
            });
        }
        public TestSceneDropdown()
        {
            var testItems = new TestModel[10];
            int i         = 0;

            while (i < items_to_add)
            {
                testItems[i] = @"test " + i++;
            }

            Add(platformActionContainerKeyboardSelection = new PlatformActionContainer
            {
                Child = testDropdown = new TestDropdown
                {
                    Width    = 150,
                    Position = new Vector2(50, 50),
                    Items    = testItems
                }
            });

            Add(platformActionContainerKeyboardPreselection = new PlatformActionContainer
            {
                Child = testDropdownMenu = new TestDropdown
                {
                    Width    = 150,
                    Position = new Vector2(250, 50),
                    Items    = testItems
                }
            });
            testDropdownMenu.Menu.MaxHeight = explicit_height;

            Add(bindableDropdown = new TestDropdown
            {
                Width      = 150,
                Position   = new Vector2(450, 50),
                ItemSource = bindableList
            });

            Add(platformActionContainerEmptyDropdown = new PlatformActionContainer
            {
                Child = emptyDropdown = new TestDropdown
                {
                    Width    = 150,
                    Position = new Vector2(650, 50),
                }
            });

            Add(disabledDropdown = new TestDropdown
            {
                Width    = 150,
                Position = new Vector2(50, 350),
                Items    = testItems,
                Current  =
                {
                    Value    = testItems[3],
                    Disabled = true
                }
            });
        }
예제 #3
0
        public TestSceneDropdown()
        {
            var testItems = new string[10];
            int i         = 0;

            while (i < items_to_add)
            {
                testItems[i] = @"test " + i++;
            }

            Add(platformActionContainerKeyboardSelection = new PlatformActionContainer
            {
                Child = testDropdown = new TestDropdown
                {
                    Width    = 150,
                    Position = new Vector2(200, 70),
                    Items    = testItems
                }
            });

            Add(platformActionContainerKeyboardPreselection = new PlatformActionContainer
            {
                Child = testDropdownMenu = new TestDropdown
                {
                    Width    = 150,
                    Position = new Vector2(400, 70),
                    Items    = testItems
                }
            });
            testDropdownMenu.Menu.MaxHeight = explicit_height;

            Add(bindableDropdown = new TestDropdown
            {
                Width      = 150,
                Position   = new Vector2(600, 70),
                ItemSource = bindableList
            });

            Add(platformActionContainerEmptyDropdown = new PlatformActionContainer
            {
                Child = emptyDropdown = new TestDropdown
                {
                    Width    = 150,
                    Position = new Vector2(800, 70),
                }
            });
        }
 private void assertDropdownIsClosed(TestDropdown dropdown) => AddAssert("dropdown is closed", () => dropdown.Menu.State == MenuState.Closed);
 private void assertDropdownIsOpen(TestDropdown dropdown) => AddAssert("dropdown is open", () => dropdown.Menu.State == MenuState.Open);
 private void toggleDropdownViaClick(TestDropdown dropdown, string dropdownName = null) => AddStep($"click {dropdownName ?? "dropdown"}", () =>
 {
     InputManager.MoveMouseTo(dropdown.Header);
     InputManager.Click(MouseButton.Left);
 });
예제 #7
0
 private void toggleDropdownViaClick(TestDropdown dropdown)
 {
     InputManager.MoveMouseTo(dropdown.Header);
     InputManager.Click(MouseButton.Left);
 }
예제 #8
0
 private void toggleDropdownViaClick(TestDropdown dropdown)
 {
     InputManager.MoveMouseTo(dropdown.Children.First());
     InputManager.Click(MouseButton.Left);
 }