public void TypeText(string str) { SUIMouse.MouseClick(this, (int)((Width - X) / 2), (int)((Height - Y) / 2)); //Clear exsting text. SUIKeyboard.Press(SUIKeyboard.VK.CONTROL); SUIKeyboard.Type(SUIKeyboard.VK.HOME); SUIKeyboard.Release(SUIKeyboard.VK.CONTROL); int textLeng = Text.Length; for (int i = 0; i < textLeng; i++) { SUIKeyboard.Type(SUIKeyboard.VK.DELETE); } SUIKeyboard.Type(str); }
public void Click(int rowIndex, int columnIndex, int nFlags) { SUIListViewItem slvitem = GetItemByIndex(rowIndex); SUIListViewSubitem subItem = slvitem.GetSubitem(columnIndex); if (nFlags == 0) //Shift down { SUIKeyboard.Press(SUI.Base.Win.SUIKeyboard.VK.SHIFT); subItem.Click(); SUIKeyboard.Release(SUI.Base.Win.SUIKeyboard.VK.SHIFT); } else if (nFlags == 1) //Control down { SUIKeyboard.Press(SUI.Base.Win.SUIKeyboard.VK.CONTROL); subItem.Click(); SUIKeyboard.Release(SUI.Base.Win.SUIKeyboard.VK.CONTROL); } else { subItem.Click(); } }