Example #1
0
        public void DragASwitchIntoForEachExpectNotAddedToForEach()
        {
            // Create the workflow
            RibbonUIMap.CreateNewWorkflow();

            // Get some variables
            UITestControl theTab         = TabManagerUIMap.GetActiveTab();
            UITestControl theStartButton = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "Start");
            Point         workflowPoint1 = new Point(theStartButton.BoundingRectangle.X, theStartButton.BoundingRectangle.Y + 200);

            Point requiredPoint = WorkflowDesignerUIMap.GetPointUnderStartNode(theTab);

            requiredPoint.Offset(20, 20);

            // Drag a ForEach onto the Workflow
            ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.ForEach, workflowPoint1, "For Each");

            // Open the toolbox, and drag the control onto the Workflow
            ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.Switch, requiredPoint);
            // Cancel Decision Wizard
            if (WizardsUIMap.TryWaitForWizard(3000))
            {
                KeyboardCommands.SendTab();
                KeyboardCommands.SendTab();
                KeyboardCommands.SendEnter(100);

                Assert.Fail("Got dropped ;(");
            }
        }
        public void CreateEmailSource(string sourceName)
        {
            KeyboardCommands.SendTab();
            Playback.Wait(50);
            KeyboardCommands.SendKey("localhost");
            KeyboardCommands.SendTab();
            Playback.Wait(50);
            KeyboardCommands.SendKey("test");
            KeyboardCommands.SendTab();
            KeyboardCommands.SendKey("test");
            KeyboardCommands.SendTabs(2);
            Playback.Wait(50);
            KeyboardCommands.SendTabs(2);
            Playback.Wait(50);
            KeyboardCommands.SendEnter();
            SendKeys.SendWait("^[email protected]{TAB}");
            SendKeys.SendWait("[email protected]{TAB}");
            Playback.Wait(50);
            KeyboardCommands.SendEnter();
            Playback.Wait(5000);//wait for test
            ClickSave();

            KeyboardCommands.SendTabs(3);
            Playback.Wait(50);
            KeyboardCommands.SendKey(sourceName);
            Playback.Wait(50);
            KeyboardCommands.SendTab();
            KeyboardCommands.SendEnter();
        }
Example #3
0
        public void WizardUiTests_WebServiceWizard_WebServiceInputMappingsDeleteAll_ExpectedNoInputMappings()
        {
            string    newGuid           = Guid.NewGuid().ToString();
            string    remove            = newGuid.Remove(8);
            string    newWebserviceName = "WebService" + remove;
            const int WaitMs            = 50;

            //Open wizard
            RibbonUIMap.ClickNewWebService();
            KeyboardCommands.SendTabs(2, WaitMs);
            KeyboardCommands.SendDownArrows(1, WaitMs);
            KeyboardCommands.SendTabs(8, WaitMs);
            KeyboardCommands.SendDownArrows(1, WaitMs);
            KeyboardCommands.SendTabs(4, WaitMs);
            KeyboardCommands.SendDel();
            KeyboardCommands.SendTabs(2, WaitMs);
            KeyboardCommands.SendEnter(5000);
            KeyboardCommands.SendTabs(1, WaitMs);
            KeyboardCommands.SendEnter(1000);
            KeyboardCommands.SendTabs(3, WaitMs);
            KeyboardCommands.SendKey(newWebserviceName, WaitMs);
            KeyboardCommands.SendTabs(1, WaitMs);
            KeyboardCommands.SendEnter(2000);

            UITestControl theTab          = RibbonUIMap.CreateNewWorkflow(1500);
            UITestControl activityControl = ExplorerUIMap.DragResourceOntoWorkflowDesigner(theTab, newWebserviceName, "Unassigned");

            using (var activity = new DsfActivityUiMap(false)
            {
                Activity = activityControl, TheTab = theTab
            })
            {
                Assert.AreEqual(0, activity.GetInputMappingRows().Count);
            }
        }
Example #4
0
        public void ClickHelpFeedback_Expected_FeedbackWindowOpens()
        {
            RibbonUIMap.ClickRibbonMenuItem("Feedback", 600);
            var dialogPrompt = StudioWindow.GetChildren()[0];

            if (dialogPrompt.GetType() != typeof(WpfWindow))
            {
                Assert.Fail("Error - Clicking the Feedback button does not create the Feedback Window");
            }

            KeyboardCommands.SendEnter();
            KeyboardCommands.SendEnter();

            // Wait for the init, then click around a bit

            // Click stop, then make sure the Feedback window has appeared.
            FeedbackUIMap.ClickStartStopRecordingButton();

            if (!FeedbackUIMap.DoesFeedbackWindowExist())
            {
                Assert.Fail("The Feedback window did not appear after the recording has been stopped.");
            }

            FeedbackUIMap.FeedbackWindow_ClickCancel();
        }
 public void EnterUsernameAndPassword(string user, string pass)
 {
     KeyboardCommands.SendTabs(3, 200);
     KeyboardCommands.SendKey(user);
     KeyboardCommands.SendTab();
     KeyboardCommands.SendKey(pass);
     Playback.Wait(100);
 }
Example #6
0
        public void ClickSaveButton(int numberOfTabsToSaveButton)
        {
            var wizard = StudioWindow.GetChildren()[0].GetChildren()[2];

            wizard.WaitForControlReady();
            KeyboardCommands.SendTabs(numberOfTabsToSaveButton, 200);
            KeyboardCommands.SendEnter();
            Playback.Wait(500);
        }
Example #7
0
        static void SendCommand(KeyboardCommands command, byte value)
        {
            WaitUntilReady();

            SendCommand(KeyboardCommands.Set_Keyboard_LEDs);

            WaitUntilReady();

            IO.WriteByte(IO.Port.KB_data_port, value);
        }
Example #8
0
 /// <summary>
 /// This method is used to calculate the First level of probability of a given command
 /// </summary>
 /// <param name="command"></param>
 public Dictionary <CommandType, object> CalculateProbabilityOfCommand(string command)
 {
     try
     {
         var probableCommands = new List <CommandType>();
         new NaiveCommandCategorization(_categoryCollection).CalculateProbabilityOfSegments(
             command.Split(' ').ToList(), true, out _probabilityScoreIndices);
         if (_probabilityScoreIndices == null)
         {
             return(null);
         }
         var highestProbabilityCategories = new NaiveCommandCategorization().GetHighestProbabilityScoreIndeces(_probabilityScoreIndices);
         if (highestProbabilityCategories.Count == 1)
         {
             var firstLevelHighestProbabilityCategory = highestProbabilityCategories.First();
             if (firstLevelHighestProbabilityCategory.ReferenceId ==
                 Conversions.ConvertEnumToInt(FirstLevelCategory.FunctionalCommand))
             {
                 probableCommands = new SecondLevelCategorization().CalculateSecondLevelProbabilityOfCommand(command);
             }
             else if (firstLevelHighestProbabilityCategory.ReferenceId ==
                      Conversions.ConvertEnumToInt(FirstLevelCategory.KeyboardCommand))
             {
                 probableCommands = new KeyboardCommands(command).GetCommand();
             }
             else if (firstLevelHighestProbabilityCategory.ReferenceId ==
                      Conversions.ConvertEnumToInt(FirstLevelCategory.MouseCommand))
             {
                 probableCommands = new MouseCommands(command).GetCommand();
             }
         }
         else
         {
             throw new Exception("Command Identification Failed From the First Level. There are " +
                                 highestProbabilityCategories.Count + " probable categories which are " + DataManager.GetHighestProbableCommandTypesForException <FirstLevelCategory>(highestProbabilityCategories));
         }
         var returnDict = GetCommandDetails(probableCommands, command);
         if (returnDict.Count == 1)
         {
             var identifiedCommandType = returnDict.First().Key;
             if (LearningManager.UnIdentifiedWords.Count > 0)
             {
                 LearningManager.AddUnidentifiedWordsToCommandText(identifiedCommandType);
             }
             DataManager.AddToCommandCounter(identifiedCommandType);
         }
         return(returnDict);
     }
     catch (Exception ex)
     {
         Log.ErrorLog(ex);
         throw;
     }
 }
Example #9
0
 public void CreateDbService(string serviceName)
 {
     ClickFirstAction();
     ClickTestAction();
     KeyboardCommands.SendTabs(5);
     KeyboardCommands.SendEnter();
     KeyboardCommands.SendTabs(3);
     SendKeys.SendWait(serviceName);
     Playback.Wait(10);
     KeyboardCommands.SendEnter();
 }
        public UITestControl SetWindowsGroupText(string groupName)
        {
            UITestControl addWindowsGoupTextBox = FetchSecurityGroupTextbox();

            addWindowsGoupTextBox.Click();
            KeyboardCommands.SelectAll();
            KeyboardCommands.SendDel();
            KeyboardCommands.SendKey(groupName);

            return(addWindowsGoupTextBox);
        }
        public string GetUserName()
        {
            KeyboardCommands.SendTabs(3, 250);
            KeyboardCommands.SelectAll();
            KeyboardCommands.SendKey(KeyboardCommands.CopyCommand);
            var wizard   = StudioWindow.GetChildren()[0].GetChildren()[2];
            var userName = Clipboard.GetText();

            //Clipboard.SetText(persistClipboard);
            Mouse.Click(wizard, new Point(584, 160));
            return(userName);
        }
Example #12
0
        public void ToolDesigners_XpathlargeView_TabbingToDone_FocusIsSetToDone()
        {
            var dsfActivityUiMap = new DsfXpathUiMap();

            dsfActivityUiMap.ClickOpenLargeView();
            // Tab to the result box
            for (int j = 0; j < 12; j++)
            {
                KeyboardCommands.SendTab();
            }
            //Check that the focus is in the done button
            Assert.IsTrue(dsfActivityUiMap.GetDoneButton().HasFocus);
        }
        /// <summary>
        /// ClickAndTypeInNameTextbox - Use 'ClickAndTypeInNameTextboxParams' to pass parameters into this method.
        /// </summary>
        public void ClickAndTypeInNameTextbox(string textToType)
        {
            WizardsUIMap.WaitForWizard();
            #region Variable Declarations
            //UITestControl uIItemImage = this.UIBusinessDesignStudioWindow.GetChildren()[0].GetChildren()[0];
            #endregion

            KeyboardCommands.SendTabs(6, 150);
            KeyboardCommands.SendKey(textToType, 200);
            KeyboardCommands.SendDel();
            //MouseCommands.ClickPoint(new Point(145, 364), 100);
            KeyboardCommands.SendTabs(2, 150);
            KeyboardCommands.SendEnter();
        }
Example #14
0
        // 05/11 - Failure is Intermittent ;)
        public void DecisionWizard_Save_WhenMouseUsedToSelect2ndAnd3rdInputFields_FieldDataSavedCorrectly()
        {
            //------------Setup for test--------------------------
            RibbonUIMap.CreateNewWorkflow();

            var theTab = TabManagerUIMap.GetActiveTab();

            //------------Execute Test---------------------------
            VariablesUIMap.EnterTextIntoScalarName(0, "VariableName");

            var pt = WorkflowDesignerUIMap.GetPointUnderStartNode(theTab);

            ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.Decision, pt);
            WizardsUIMap.WaitForWizard();
            Assert.AreEqual("Decision Flow", WizardsUIMap.GetLeftTitleText());
            _decisionWizardUiMap.SendTabs(5, 500);
            _decisionWizardUiMap.SelectMenuItem(17, 100); // select between ;)

            _decisionWizardUiMap.SendTabs(11, 500);
            _decisionWizardUiMap.GetFirstIntellisense("[[V", false, new Point(100, 120));

            _decisionWizardUiMap.SendTabs(2, 500);
            _decisionWizardUiMap.GetFirstIntellisense("[[V", false, new Point(400, 120));
            _decisionWizardUiMap.SendTabs(1, 500);
            _decisionWizardUiMap.GetFirstIntellisense("[[V", false, new Point(600, 120));

            _decisionWizardUiMap.SendTabs(6, 500);
            KeyboardCommands.SendEnter();

            //------------Assert Results-------------------------

            const string expected = "If [[VariableName]] Is Between [[VariableName]] and [[VariableName]]";

            var getDecision = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "FlowDecisionDesigner");

            getDecision.WaitForControlEnabled();
            var getDecisionText = getDecision.GetChildren()[0] as WpfEdit;

            if (getDecisionText != null)
            {
                var displayValue = getDecisionText.Text;

                Assert.AreEqual(expected, displayValue,
                                "Decision intellisense doesnt work when using the mouse to select intellisense results");
            }
            else
            {
                Assert.Fail("Null decision");
            }
        }
Example #15
0
        public ActionResult Execute([FromBody] Shortcut shortcut)
        {
            var simulator = new InputSimulator();
            var keyboard  = new KeyboardCommands(simulator.Keyboard);

            var executedShortcut = _shortcuts.FirstOrDefault(e => e.Id == shortcut.Id);

            if (executedShortcut is object && executedShortcut.Command is object)
            {
                executedShortcut.Command(keyboard);
            }

            return(Ok());
        }
Example #16
0
 public void CreateWebSource(string sourceUrl, string sourceName)
 {
     //Web Source Details
     KeyboardCommands.SendKey(sourceUrl);
     KeyboardCommands.SendTabs(3);
     Playback.Wait(100);
     KeyboardCommands.SendEnter();
     Playback.Wait(1000);
     WebSourceWizardUIMap.ClickSave();
     KeyboardCommands.SendTabs(3);
     KeyboardCommands.SendKey(sourceName);
     KeyboardCommands.SendTab();
     KeyboardCommands.SendEnter();
     Playback.Wait(1000);
 }
Example #17
0
 public void SaveWebService(string serviceName)
 {
     //Web Service Details
     KeyboardCommands.SendTabs(8);
     Playback.Wait(500);
     KeyboardCommands.SendEnter();
     Playback.Wait(500);//wait for test
     KeyboardCommands.SendTab();
     KeyboardCommands.SendEnter();
     Playback.Wait(500);
     KeyboardCommands.SendTabs(3);
     KeyboardCommands.SendKey(serviceName);
     KeyboardCommands.SendTab();
     KeyboardCommands.SendEnter();
 }
Example #18
0
        public void Decision_Intellisense_KeyboardSelect_DecisionTitleUpdatesCorrectly()
        {
            RibbonUIMap.CreateNewWorkflow();
            UITestControl theTab = TabManagerUIMap.GetActiveTab();

            VariablesUIMap.ClickScalarVariableName(0);
            SendKeys.SendWait("VariableName");

            ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.Decision, WorkflowDesignerUIMap.GetPointUnderStartNode(theTab));
            Playback.Wait(5000);
            //------------Execute Test---------------------------
            _decisionWizardUiMap.SendTabs(5, 1000);
            _decisionWizardUiMap.SelectMenuItem(17, 2000);
            _decisionWizardUiMap.SendTabs(11, 1000);

            //First field
            _decisionWizardUiMap.GetFirstIntellisense("[[V");
            _decisionWizardUiMap.SendTabs(2, 1000);

            //Second field
            _decisionWizardUiMap.GetFirstIntellisense("[[V");
            _decisionWizardUiMap.SendTabs(1, 1000);

            //Third field
            _decisionWizardUiMap.GetFirstIntellisense("[[V");
            _decisionWizardUiMap.SendTabs(6, 1000);

            //Wait for wizard to close
            KeyboardCommands.SendEnter(1500);

            // Assert Decision Title Updates Correctly
            const string Expected = "If [[VariableName]] Is Between [[VariableName]] and [[VariableName]]";

            var getDecision     = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "FlowDecisionDesigner");
            var getDecisionText = getDecision.GetChildren()[0] as WpfEdit;

            if (getDecisionText != null)
            {
                var displayValue = getDecisionText.Text;

                Assert.AreEqual(Expected, displayValue, "Decision intellisense doesnt work when using the keyboard to select intellisense results");
            }
            else
            {
                Assert.Fail();
            }
        }
Example #19
0
        public void WizardUiTests_WebServiceWizard_WebServiceInputMappings_ExpectedInputMappingsCreated()
        {
            string newGuid           = Guid.NewGuid().ToString();
            string remove            = newGuid.Remove(8);
            string newWebserviceName = "WebService" + remove;

            //Open wizard
            const int tabWait = 200;

            RibbonUIMap.ClickNewWebService();
            KeyboardCommands.SendTabs(2, tabWait);
            KeyboardCommands.SendDownArrows(1);
            KeyboardCommands.SendTabs(8, tabWait);
            KeyboardCommands.SendDownArrows(1); // first resource is faulty, we need the second ;)
            KeyboardCommands.SendTabs(4, tabWait);
            KeyboardCommands.SelectAllText();
            KeyboardCommands.SendDel();
            KeyboardCommands.SendKey("?[[a]]=[[b]][[c]]&[[d]]=[[f]]");
            KeyboardCommands.SendLeftArrows(2);
            KeyboardCommands.SendKey("e");
            KeyboardCommands.SendTabs(2, tabWait);
            KeyboardCommands.SendEnter(8000);
            KeyboardCommands.SendTabs(1, tabWait); // Test
            KeyboardCommands.SendEnter(5000);
            KeyboardCommands.SendTabs(3, tabWait);
            KeyboardCommands.SendKey(newWebserviceName);
            KeyboardCommands.SendTabs(1, tabWait);
            KeyboardCommands.SendEnter(2000);

            UITestControl theTab          = RibbonUIMap.CreateNewWorkflow(1500);
            UITestControl activityControl = ExplorerUIMap.DragResourceOntoWorkflowDesigner(theTab, newWebserviceName, "Unassigned");

            using (var activity = new DsfActivityUiMap(false)
            {
                Activity = activityControl, TheTab = theTab
            })
            {
                StringAssert.Contains(activity.GetInputMappingToServiceValue(1), "a");
                StringAssert.Contains(activity.GetInputMappingToServiceValue(2), "b");
                StringAssert.Contains(activity.GetInputMappingToServiceValue(3), "c");
                StringAssert.Contains(activity.GetInputMappingToServiceValue(4), "d");
                StringAssert.Contains(activity.GetInputMappingToServiceValue(5), "fe");
            }
        }
Example #20
0
        static void SendCommand(KeyboardCommands command)
        {
            KeyboardMessages message = KeyboardMessages.Acknowledge;

            do
            {
                IO.WriteByte(IO.Port.KB_data_port, (byte)command);

                // Wait for acknowledge and receieve it

                WaitUntilReady();

                message = (KeyboardMessages)IO.ReadByte(IO.Port.KB_data_port);

                if (message == KeyboardMessages.Request_Resend)
                {
                    continue;
                }
                else if (message == KeyboardMessages.Acknowledge)
                {
                    return;
                }
                else if (message == KeyboardMessages.Unknown1)                 // This was the cause of the caps issue.
                {
                    return;
                }
                else if (message == KeyboardMessages.Unknown2) // This was the cause of the caps issue in qemu.
                {
                    capsLock         = capsLock ^ capsLockReleased;
                    capsLockReleased = true;
                    return;
                }
                else
                {
                    TextMode.WriteByte((byte)message);
                    //Diagnostics.Error ("ADC.X86.Keyboard.SendCommand(): unhandled message");
                    return;
                }
            } while (message != KeyboardMessages.Acknowledge);
        }
Example #21
0
        public static void Enable()
        {
            var commands = new KeyboardCommands();
            var textbox  = Textbox.Create(new Transform2 {
                Location = new Vector2(400, 25), Size = new Size2(300, 50), ZIndex = ZIndex.Max - 8
            });
            var panel = Entity.Create("Scene Navigation Console", new Transform2 {
                Size = new Size2(1920, 100), ZIndex = ZIndex.Max - 10
            })
                        .Add((o, r) => new Texture(r.CreateRectangle(Color.DarkGray, o)))
                        .AttachTo(CurrentViewport.Position)
                        .Add(commands);

            textbox
            .AttachTo(panel);
            var sceneNavigator = new SceneNavigatorConsole(textbox, panel);

            commands.Add(Keys.Back, () => textbox.With <TypingInput>(x => x.Clear()));
            commands.Add(Keys.Enter, () => textbox.With <TypingInput>(
                             t => t.Value.If(v => !string.IsNullOrEmpty(v), () =>
            {
                var sceneName = t.Value;
                if (Navigate.SceneExists(sceneName))
                {
                    Navigate.To(sceneName);
                    t.Clear();
                    sceneNavigator.Toggle();
                }
                else
                {
                    t.Value = "Scene Not Found";
                }
            })));

            Entity.Create("Scene Navigation Console Commands", Transform2.Zero)
            .Add(new KeyboardCommand {
                Key = Keys.OemTilde, Command = () => sceneNavigator.Toggle()
            });
        }
Example #22
0
 public void CreateDbSource(string sourcePath, string sourceName)
 {
     //KeyboardCommands.SendTab();
     KeyboardCommands.SendKey(sourcePath);
     KeyboardCommands.SendTab();
     KeyboardCommands.SendRightArrows(1);
     KeyboardCommands.SendTab();
     KeyboardCommands.SendKey(@"testuser");
     KeyboardCommands.SendTab();
     KeyboardCommands.SendKey("test123");
     KeyboardCommands.SendTab();
     KeyboardCommands.SendEnter();
     Playback.Wait(2500);
     KeyboardCommands.SendTab();
     KeyboardCommands.SendDownArrows(1);
     KeyboardCommands.SendTab();
     KeyboardCommands.SendEnter();
     KeyboardCommands.SendTabs(3);
     KeyboardCommands.SendKey(sourceName);
     KeyboardCommands.SendTab();
     KeyboardCommands.SendEnter();
     Playback.Wait(1500);
 }
Example #23
0
        public void WizardUiTests_WebServiceWizard_WebServiceInputMappingsCase3_ExpectedInputMappingsCreated()
        {
            string newGuid           = Guid.NewGuid().ToString();
            string remove            = newGuid.Remove(8);
            string newWebserviceName = "WebService" + remove;

            //Open wizard
            RibbonUIMap.ClickNewWebService();
            KeyboardCommands.SendTabs(2);
            KeyboardCommands.SendDownArrows(1);
            KeyboardCommands.SendTabs(8);
            KeyboardCommands.SendDownArrows(1);
            KeyboardCommands.SendTabs(4);
            KeyboardCommands.SelectAllText();
            KeyboardCommands.SendKey("[[foobar]]?a=[[a]]");
            KeyboardCommands.SendTabs(2);
            KeyboardCommands.SendEnter(5000);
            KeyboardCommands.SendTabs(1);
            KeyboardCommands.SendEnter(1000);
            KeyboardCommands.SendTabs(3);
            KeyboardCommands.SendKey(newWebserviceName);
            KeyboardCommands.SendTabs(1);
            KeyboardCommands.SendEnter(2000);

            UITestControl theTab          = RibbonUIMap.CreateNewWorkflow(1500);
            UITestControl activityControl = ExplorerUIMap.DragResourceOntoWorkflowDesigner(theTab, newWebserviceName, "Unassigned");

            using (var activity = new DsfActivityUiMap(false)
            {
                Activity = activityControl, TheTab = theTab
            })
            {
                Assert.AreEqual("a", activity.GetInputMappingToServiceValue(1));
                Assert.AreEqual("foobar", activity.GetInputMappingToServiceValue(2));
            }
        }
Example #24
0
		static void SendCommand (KeyboardCommands command)
		{
			KeyboardMessages message = KeyboardMessages.Acknowledge;

			do {
				IO.WriteByte (IO.Port.KB_data_port, (byte) command);

				// Wait for acknowledge and receieve it

				WaitUntilReady ();

				message = (KeyboardMessages) IO.ReadByte (IO.Port.KB_data_port);

				if (message == KeyboardMessages.Request_Resend)
					continue;
				else if (message == KeyboardMessages.Acknowledge)
					return;
				else if (message == KeyboardMessages.Unknown1) // This was the cause of the caps issue.
					return;
                else if (message == KeyboardMessages.Unknown2) // This was the cause of the caps issue in qemu.
                {
                    capsLock = capsLock ^ capsLockReleased;
                    capsLockReleased = true;
                    return;
                } else {
                    TextMode.WriteByte ((byte) message);
                    //Diagnostics.Error ("ADC.X86.Keyboard.SendCommand(): unhandled message");
                    return;
                }

			} while (message != KeyboardMessages.Acknowledge);
		}
Example #25
0
        public static List <string> GetKeySymbols(KeyboardCommands command)
        {
            var e = map.Where(z => z.Value == command).Select(z => z.Key).Select(GetKeySymbol).ToList();

            return(e);
        }
Example #26
0
 public static List<string> GetKeySymbols(KeyboardCommands command)
 {
     var e = map.Where(z => z.Value == command).Select(z => z.Key).Select(GetKeySymbol).ToList();
     return e;
 }
 /// <summary>
 /// ClickCancel
 /// </summary>
 public void CancelWizard(int waitAmt = 2500)
 {
     Playback.Wait(waitAmt);
     KeyboardCommands.SendEsc(250);
 }
 /// <summary>
 /// Selects all window contents.
 /// </summary>
 /// <returns></returns>
 public string GetWindowContents()
 {
     KeyboardCommands.SelectAndCopy();
     return(Clipboard.GetText());
 }
 /// <summary>
 /// Edits the source.
 /// </summary>
 public void EditSource()
 {
     KeyboardCommands.SendTabs(2);
     KeyboardCommands.SendEnter();
 }
Example #30
0
 public static bool IsModeSpecific(KeyboardCommands cmd)
 {
     return(modeSpecific.Contains(cmd));
 }
 /// <summary>
 /// Cancels the entire operation.
 /// </summary>
 public void CancelEntireOperation()
 {
     KeyboardCommands.SendEsc();
 }
Example #32
0
		static void SendCommand (KeyboardCommands command, byte value)
		{
			WaitUntilReady ();

			SendCommand (KeyboardCommands.Set_Keyboard_LEDs);

			WaitUntilReady ();

			IO.WriteByte (IO.Port.KB_data_port, value);
		}
Example #33
0
 public void SchedulerShortcutKeyPress()
 {
     StudioWindow.SetFocus();
     KeyboardCommands.SendKey("{ALT}S", 2000);
 }