Sha256: 74dd7b27af1e5a764b0552ddea5c400fcbb0c6c5189e34895b1043f115841439
Contents?: true
Size: 1.16 KB
Versions: 1
Compression:
Stored size: 1.16 KB
Contents
#include "StdAfx.h" #include "AutomatedTabControl.h" AutomatedTabControl::AutomatedTabControl(const FindInformation& findInformation) : AutomationControl(findInformation) {} String^ AutomatedTabControl::Selection::get() { auto theSelection = AsSelectionPattern->Current.GetSelection()[0]; return theSelection->Current.Name; } void AutomatedTabControl::Selection::set(String^ value) { Select(_control->FindFirst(UIA::TreeScope::Subtree, GetNamedTabItemCondition(value))); } void AutomatedTabControl::SelectedIndex::set(int selectedIndex) { Select(TabItems[selectedIndex]); } int AutomatedTabControl::SelectedIndex::get() { int selectedIndex = 0; for each(AutomationElement^ selectionItem in TabItems) { auto selectionPattern = dynamic_cast<SelectionItemPattern^>(selectionItem->GetCurrentPattern(SelectionItemPattern::Pattern)); if( selectionPattern->Current.IsSelected ) { return selectedIndex; } ++selectedIndex; } return -1; } int AutomatedTabControl::GetTabItems(const char* options[]) { auto tabItems = TabItems; if( NULL != options ) { StringHelper::CopyNames(tabItems, options); } return tabItems->Count; }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rautomation-0.10.0 | ext/UiaDll/UiaDll/AutomatedTabControl.cpp |