当前位置: 首页>>代码示例>>C#>>正文


C# InputBuilder类代码示例

本文整理汇总了C#中InputBuilder的典型用法代码示例。如果您正苦于以下问题:C# InputBuilder类的具体用法?C# InputBuilder怎么用?C# InputBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


InputBuilder类属于命名空间,在下文中一共展示了InputBuilder类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: MoveMouseToPositionOnVirtualDesktop

 public IMouseSimulator MoveMouseToPositionOnVirtualDesktop(double absoluteX, double absoluteY){
     Win32Types.INPUT[] inputList =
         new InputBuilder().AddAbsoluteMouseMovementOnVirtualDesktop((int) Math.Truncate(absoluteX),
             (int) Math.Truncate(absoluteY)).ToArray();
     SendSimulatedInput(inputList);
     return this;
 }
开发者ID:derjabkin,项目名称:eXpand,代码行数:7,代码来源:MouseSimulator.cs

示例2: Should_be_able_to_Generate_the_TextBox_with_the_PlaceHolder

 public void Should_be_able_to_Generate_the_TextBox_with_the_PlaceHolder()
 {
     ITextBoxBuilder textbox = new InputBuilder("Name", HTMLATTRIBUTE.TEXT).WithPlaceholder("SomeText");
     string htmlTextBox = textbox.ToString();
     var cq = CQ.Create(htmlTextBox);
     cq.Attr("name").Should().Be("Name");
     cq.Attr("placeholder").Should().Be("SomeText");
 }
开发者ID:satish860,项目名称:FluentHTML,代码行数:8,代码来源:FluentTextBoxTest.cs

示例3: Should_be_able_to_Generate_Text_With_the_type_Text_box

 public void Should_be_able_to_Generate_Text_With_the_type_Text_box()
 {
     ITextBoxBuilder textbox = new InputBuilder("Name", HTMLATTRIBUTE.TEXT).Value("Satish");
     string htmlTextBox = textbox.ToString();
     var cq = CQ.Create(htmlTextBox);
     cq.Attr("name").Should().Be("Name");
     cq.Val().Should().Be("Satish");
 }
开发者ID:satish860,项目名称:FluentHTML,代码行数:8,代码来源:FluentTextBoxTest.cs

示例4: ModifiersUp

        private static void ModifiersUp(InputBuilder builder, IEnumerable<VirtualKeyCode> modifierKeyCodes) {
            if (modifierKeyCodes == null) return;

            var stack = new Stack<VirtualKeyCode>(modifierKeyCodes);
            while (stack.Count > 0) {
                builder.AddKeyUp(stack.Pop());
            }
        }
开发者ID:gro-ove,项目名称:actools,代码行数:8,代码来源:KeyboardSimulator.cs

示例5: ModifiersUp

        private void ModifiersUp(InputBuilder builder, IEnumerable<VirtualKeyCode> modifierKeyCodes)
        {
            if (modifierKeyCodes == null) return;

            // Key up in reverse (I miss LINQ)
            var stack = new Stack<VirtualKeyCode>(modifierKeyCodes);
            while (stack.Count > 0) builder.AddKeyUp(stack.Pop());
        }
开发者ID:HouSong,项目名称:inputsimulator,代码行数:8,代码来源:KeyboardSimulator.cs

示例6: Should_be_able_to_Generate_the_Password_Box

 public void Should_be_able_to_Generate_the_Password_Box()
 {
     IInputElementBuilder textbox = new InputBuilder("Name", HTMLATTRIBUTE.PASSWORD).Value("Satish");
     string htmlTextBox = textbox.ToString();
     var cq = CQ.Create(htmlTextBox);
     cq.Attr(HTMLATTRIBUTE.TYPE).Should().Be(HTMLATTRIBUTE.PASSWORD);
     cq.Val().Should().Be("Satish");
 }
开发者ID:satish860,项目名称:FluentHTML,代码行数:8,代码来源:FluentPasswordBoxTest.cs

示例7: AddKeyDown

 public void AddKeyDown()
 {
     var builder = new InputBuilder();
     Assert.IsFalse(builder.ToArray().Any());
     builder.AddKeyDown(VirtualKeyCode.VK_A);
     Assert.AreEqual(builder.Count(), 1);
     Assert.AreEqual(builder[0].Type,(uint)InputType.Keyboard);
     Assert.AreEqual(builder[0].Data.Keyboard.KeyCode, (ushort)VirtualKeyCode.VK_A);
 }
开发者ID:HaKDMoDz,项目名称:InputSimulator,代码行数:9,代码来源:InputBuilderTests.cs

示例8: Should_be_able_to_add_Id_to_the_property_With_the_Generic_Name

 public void Should_be_able_to_add_Id_to_the_property_With_the_Generic_Name()
 {
     IInputElementBuilder textbox = new InputBuilder("Name", HTMLATTRIBUTE.PASSWORD)
         .Class("cssclass");
     string htmlTextBox = textbox.ToString();
     var cq = CQ.Create(htmlTextBox);
     cq.Attr(HTMLATTRIBUTE.TYPE).Should().Be(HTMLATTRIBUTE.PASSWORD);
     cq.Attr(HTMLATTRIBUTE.CLASS).Should().Be("cssclass");
 }
开发者ID:satish860,项目名称:FluentHTML,代码行数:9,代码来源:FluentPasswordBoxTest.cs

示例9: AddKeyDown

 public void AddKeyDown()
 {
     var builder = new InputBuilder();
     Assert.That(builder.ToArray(), Is.Empty);
     builder.AddKeyDown(VirtualKeyCode.VK_A);
     Assert.That(builder.Count(), Is.EqualTo(1));
     Assert.That(builder[0].Type, Is.EqualTo((uint)InputType.Keyboard));
     Assert.That(builder[0].Data.Keyboard.KeyCode, Is.EqualTo((ushort)VirtualKeyCode.VK_A));
 }
开发者ID:HouSong,项目名称:inputsimulator,代码行数:9,代码来源:InputBuilderTests.cs

示例10: KeyPress

        /// <summary>
        /// Calls the Win32 SendInput method with a KeyDown and KeyUp message in the same input sequence in order to simulate a Key PRESS.
        /// </summary>
        /// <param name="keyCode">The <see cref="VirtualKeyCode"/> to press</param>
        public void KeyPress(VirtualKeyCode keyCode)
        {
            var inputList =
                new InputBuilder()
                    .AddKeyDown(keyCode)
                    .AddKeyUp(keyCode)
                    .ToArray();

            SendSimulatedInput(inputList);
        }
开发者ID:HaKDMoDz,项目名称:baro-corelibrary,代码行数:14,代码来源:KeyboardSimulator.cs

示例11: Should_be_able_to_Generate_the_Text_With_Disabled_and_ReadOnly_TextBox

 public void Should_be_able_to_Generate_the_Text_With_Disabled_and_ReadOnly_TextBox()
 {
     ITextBoxBuilder textbox = new InputBuilder("Name", HTMLATTRIBUTE.TEXT).Value("Satish").Disabled(true).IsReadOnly(true);
     string htmlTextBox = textbox.ToString();
     var cq = CQ.Create(htmlTextBox);
     cq.Attr("name").Should().Be("Name");
     cq.Attr("disabled").Should().Be("disabled");
     cq.Attr("readonly").Should().Be("readonly");
     cq.Val().Should().Be("Satish");
 }
开发者ID:satish860,项目名称:FluentHTML,代码行数:10,代码来源:FluentTextBoxTest.cs

示例12: ModifiedKeyStroke

        public IKeyboardSimulator ModifiedKeyStroke(
            IEnumerable<Win32Constants.VirtualKeys> modifierKeyCodes, IEnumerable<Win32Constants.VirtualKeys> keyCodes){
            var builder = new InputBuilder();
            Win32Constants.VirtualKeys[] virtualKeyss = modifierKeyCodes.ToArray();
            ModifiersDown(builder, virtualKeyss);
            KeysPress(builder, keyCodes);
            ModifiersUp(builder, virtualKeyss);

            SendSimulatedInput(builder.ToArray());
            return this;
        }
开发者ID:derjabkin,项目名称:eXpand,代码行数:11,代码来源:KeyboardSimulator.cs

示例13: Should_be_able_to_Generate_the_Text_With_AutoComplete_and_AutoFoucs_TextBox

 public void Should_be_able_to_Generate_the_Text_With_AutoComplete_and_AutoFoucs_TextBox()
 {
     ITextBoxBuilder textbox = new InputBuilder("Name", HTMLATTRIBUTE.TEXT)
         .Value("Satish")
         .EnableAutoComplete(true)
         .AutoFocus(true);
     string htmlTextBox = textbox.ToString();
     var cq = CQ.Create(htmlTextBox);
     cq.Attr("name").Should().Be("Name");
     cq.Attr("AutoFocus").Should().Be("autofocus");
     cq.Attr("autocomplete").Should().Be("on");
     cq.Val().Should().Be("Satish");
 }
开发者ID:satish860,项目名称:FluentHTML,代码行数:13,代码来源:FluentTextBoxTest.cs

示例14: HorizontalScroll

 /// <summary>
 /// Simulates a mouse horizontal wheel scroll gesture. Supported by Windows Vista and later.
 /// </summary>
 /// <param name="scrollAmountInClicks">The amount to scroll in clicks. A positive value indicates that the wheel was rotated to the right; a negative value indicates that the wheel was rotated to the left.</param>
 public void HorizontalScroll(int scrollAmountInClicks)
 {
     var inputList = new InputBuilder().AddMouseHorizontalWheelScroll(scrollAmountInClicks * MouseWheelClickSize).ToArray();
     SendSimulatedInput(inputList);
 }
开发者ID:Hebo,项目名称:LeagueMaster,代码行数:9,代码来源:MouseSimulator.cs

示例15: LeftButtonUp

 /// <summary>
 /// Simulates a mouse left button up gesture.
 /// </summary>
 public void LeftButtonUp()
 {
     var inputList = new InputBuilder().AddMouseButtonUp(MouseButton.LeftButton).ToArray();
     SendSimulatedInput(inputList);
 }
开发者ID:Hebo,项目名称:LeagueMaster,代码行数:8,代码来源:MouseSimulator.cs


注:本文中的InputBuilder类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。