Sha256: 80c168f9d83f35da53a8152d7b7e042c8de69c5bb06b7234e490040d98fbaa43

Contents?: true

Size: 1.29 KB

Versions: 1

Compression:

Stored size: 1.29 KB

Contents

#pragma once

using namespace System::Windows::Automation;
using namespace System::Windows;
using namespace System::Diagnostics;

ref class AutomationControl
{
public:
	AutomationControl(const HWND windowHandle);
  AutomationControl(const FindInformation& findInformation);

  property AutomationElement^ Element {
    AutomationElement^ get() { return _control; }
  }

	property String^ Name {
		String^ get() { return _control->Current.Name; }
	}

	property String^ ClassName {
		String^ get() { return _control->Current.ClassName; }
	}

  property Rect BoundingRectangle {
    Rect get() { return _control->Current.BoundingRectangle; }
  }

  property System::Windows::Automation::ControlType^ ControlType {
    System::Windows::Automation::ControlType^ get() { return _control->Current.ControlType; }
  }

  property int ProcessId {
    int get() { return _control->Current.ProcessId; }
  }

	property String^ Value {
		String^ get();
		void set(String^ value);
	}

  property bool Exists {
	  bool get() { return nullptr != _control; }
  }

protected:
	AutomationElement^ _control;

private:
	property ValuePattern^ AsValuePattern {
		ValuePattern^ get() {
			return dynamic_cast<ValuePattern^>(_control->GetCurrentPattern(ValuePattern::Pattern));
		}
	}
};

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rautomation-0.9.0 ext/UiaDll/UiaDll/AutomationControl.h