public ListItem(IRawElementProviderSimple provider) : base(provider) { invokeProvider = (IInvokeProvider)provider.GetPatternProvider(InvokePatternIdentifiers.Pattern.Id); selectionItemProvider = (ISelectionItemProvider)provider.GetPatternProvider(SelectionItemPatternIdentifiers.Pattern.Id); if (selectionItemProvider == null) { throw new ArgumentException("ListItem should always implement ISelectionItemProvider"); } toggleProvider = (IToggleProvider)provider.GetPatternProvider(TogglePatternIdentifiers.Pattern.Id); textExpert = TextImplementorFactory.GetImplementor(this, provider); imageExpert = new ImageImplementorHelper(this); actionExpert = new ActionImplementorHelper(); editableTextExpert = new EditableTextImplementorHelper(this, this, textExpert); // TODO: Localize the name?s actionExpert.Add("click", "click", null, DoClick); if (toggleProvider != null) { actionExpert.Add("toggle", "toggle", null, DoToggle); } if (invokeProvider != null) { actionExpert.Add("invoke", "invoke", null, DoInvoke); } Role = (toggleProvider != null? Atk.Role.CheckBox: Atk.Role.ListItem); }
public TreeItem(IRawElementProviderSimple provider) : base(provider) { invokeProvider = (IInvokeProvider)provider.GetPatternProvider(InvokePatternIdentifiers.Pattern.Id); selectionItemProvider = (ISelectionItemProvider)provider.GetPatternProvider(SelectionItemPatternIdentifiers.Pattern.Id); expandCollapseProvider = provider.GetPatternProvider( ExpandCollapsePatternIdentifiers.Pattern.Id) as IExpandCollapseProvider; textExpert = TextImplementorFactory.GetImplementor(this, provider); actionExpert = new ActionImplementorHelper(); // TODO: Localize the name?s actionExpert.Add("click", "click", null, DoClick); if (ToggleProvider != null) { actionExpert.Add("toggle", "toggle", null, DoToggle); } if (invokeProvider != null) { actionExpert.Add("invoke", "invoke", null, DoInvoke); } IRawElementProviderFragment fragment = Provider as IRawElementProviderFragment; if (fragment != null && fragment.Navigate(NavigateDirection.FirstChild) != null) { AddExpandContractAction(); } Role = (ToggleProvider != null? Atk.Role.CheckBox: Atk.Role.TableCell); imageExpert = new ImageImplementorHelper(this); editableTextExpert = new EditableTextImplementorHelper(this, this, textExpert); }
public TreeItem (IRawElementProviderSimple provider) : base (provider) { invokeProvider = (IInvokeProvider)provider.GetPatternProvider(InvokePatternIdentifiers.Pattern.Id); selectionItemProvider = (ISelectionItemProvider)provider.GetPatternProvider(SelectionItemPatternIdentifiers.Pattern.Id); expandCollapseProvider = provider.GetPatternProvider ( ExpandCollapsePatternIdentifiers.Pattern.Id) as IExpandCollapseProvider; textExpert = TextImplementorFactory.GetImplementor (this, provider); actionExpert = new ActionImplementorHelper (); // TODO: Localize the name?s actionExpert.Add ("click", "click", null, DoClick); if (ToggleProvider != null) actionExpert.Add ("toggle", "toggle", null, DoToggle); if (invokeProvider != null) actionExpert.Add ("invoke", "invoke", null, DoInvoke); IRawElementProviderFragment fragment = Provider as IRawElementProviderFragment; if (fragment != null && fragment.Navigate (NavigateDirection.FirstChild) != null) AddExpandContractAction (); Role = (ToggleProvider != null? Atk.Role.CheckBox: Atk.Role.TableCell); imageExpert = new ImageImplementorHelper (this); editableTextExpert = new EditableTextImplementorHelper (this, this, textExpert); }
protected override void InitializeAdditionalProviders () { selProvider = (ISelectionItemProvider)Provider.GetPatternProvider (SelectionItemPatternIdentifiers.Pattern.Id); if (selProvider == null) throw new ArgumentException ("The provider for RadioButton should implement the SelectionItem pattern"); imageImplementor = new ImageImplementorHelper (this); actionName = "click"; }
public CheckBoxButton (IRawElementProviderSimple provider) : base (provider) { toggleProvider = (IToggleProvider) provider.GetPatternProvider (TogglePatternIdentifiers.Pattern.Id); imageImplementor = new ImageImplementorHelper (this); if (toggleProvider == null) throw new ArgumentException ("The provider for CheckBox should implement the Toggle pattern"); Role = Atk.Role.CheckBox; }
protected override void InitializeAdditionalProviders() { selProvider = (ISelectionItemProvider)Provider.GetPatternProvider(SelectionItemPatternIdentifiers.Pattern.Id); if (selProvider == null) { throw new ArgumentException("The provider for RadioButton should implement the SelectionItem pattern"); } imageImplementor = new ImageImplementorHelper(this); actionName = "click"; }
public ToggleButton(IRawElementProviderSimple provider) : base(provider) { toggleProvider = (IToggleProvider)provider.GetPatternProvider(TogglePatternIdentifiers.Pattern.Id); imageImplementor = new ImageImplementorHelper(this); if (toggleProvider == null) { throw new ArgumentException("The provider for ToggleButton should implement the Toggle pattern"); } Role = Atk.Role.ToggleButton; }
public Image(IRawElementProviderSimple provider) : base(provider) { // Perhaps we should use Atk.Role.Image instead, // but gail uses Atk.Role.Icon // If we decide to use Image instead, we may need to // separate BalloonWindow handling, since it should // have Atk.Role.Icon. Role = Atk.Role.Icon; imageImplementor = new ImageImplementorHelper(this); }
public Image (IRawElementProviderSimple provider) : base (provider) { // Perhaps we should use Atk.Role.Image instead, // but gail uses Atk.Role.Icon // If we decide to use Image instead, we may need to // separate BalloonWindow handling, since it should // have Atk.Role.Icon. Role = Atk.Role.Icon; imageImplementor = new ImageImplementorHelper (this); }
public HeaderItem (IRawElementProviderSimple provider) : base (provider) { Role = Atk.Role.TableColumnHeader; invokeProvider = (IInvokeProvider) provider.GetPatternProvider (InvokePatternIdentifiers.Pattern.Id); imageExpert = new ImageImplementorHelper (this); actionExpert = new ActionImplementorHelper (); if (invokeProvider != null) actionExpert.Add ("click", "click", null, DoClick); }
// UI Automation Properties supported // AutomationElementIdentifiers.AcceleratorKeyProperty.Id // AutomationIdProperty() ? // AutomationElementIdentifiers.BoundingRectangleProperty.Id // AutomationElementIdentifiers.ClickablePointProperty.Id // AutomationElementIdentifiers.ControlTypeProperty.Id // AutomationElementIdentifiers.HelpTextProperty.Id // AutomationElementIdentifiers.IsContentElementProperty.Id // AutomationElementIdentifiers.IsControlElementProperty.Id // AutomationElementIdentifiers.IsKeyboardFocusableProperty.Id // AutomationElementIdentifiers.LabeledByProperty.Id // AutomationElementIdentifiers.LocalizedControlTypeProperty.Id // AutomationElementIdentifiers.NameProperty.Id public Button (IRawElementProviderSimple provider) : base (provider) { invokeProvider = (IInvokeProvider)provider.GetPatternProvider(InvokePatternIdentifiers.Pattern.Id); imageImplementor = new ImageImplementorHelper (this); InitializeAdditionalProviders (); if (invokeProvider != null) { //it seems the default description should be null actionName = default_invoke_name; Role = Atk.Role.PushButton; } textExpert = TextImplementorFactory.GetImplementor (this, provider); }
public HeaderItem(IRawElementProviderSimple provider) : base(provider) { Role = Atk.Role.TableColumnHeader; invokeProvider = (IInvokeProvider)provider.GetPatternProvider(InvokePatternIdentifiers.Pattern.Id); imageExpert = new ImageImplementorHelper(this); actionExpert = new ActionImplementorHelper(); if (invokeProvider != null) { actionExpert.Add("click", "click", null, DoClick); } }
// UI Automation Properties supported // AutomationElementIdentifiers.AcceleratorKeyProperty.Id // AutomationIdProperty() ? // AutomationElementIdentifiers.BoundingRectangleProperty.Id // AutomationElementIdentifiers.ClickablePointProperty.Id // AutomationElementIdentifiers.ControlTypeProperty.Id // AutomationElementIdentifiers.HelpTextProperty.Id // AutomationElementIdentifiers.IsContentElementProperty.Id // AutomationElementIdentifiers.IsControlElementProperty.Id // AutomationElementIdentifiers.IsKeyboardFocusableProperty.Id // AutomationElementIdentifiers.LabeledByProperty.Id // AutomationElementIdentifiers.LocalizedControlTypeProperty.Id // AutomationElementIdentifiers.NameProperty.Id public Button(IRawElementProviderSimple provider) : base(provider) { invokeProvider = (IInvokeProvider)provider.GetPatternProvider(InvokePatternIdentifiers.Pattern.Id); imageImplementor = new ImageImplementorHelper(this); InitializeAdditionalProviders(); if (invokeProvider != null) { //it seems the default description should be null actionName = default_invoke_name; Role = Atk.Role.PushButton; } textExpert = TextImplementorFactory.GetImplementor(this, provider); }
public ListItem (IRawElementProviderSimple provider) : base (provider) { invokeProvider = (IInvokeProvider)provider.GetPatternProvider(InvokePatternIdentifiers.Pattern.Id); selectionItemProvider = (ISelectionItemProvider)provider.GetPatternProvider(SelectionItemPatternIdentifiers.Pattern.Id); if (selectionItemProvider == null) throw new ArgumentException ("ListItem should always implement ISelectionItemProvider"); toggleProvider = (IToggleProvider) provider.GetPatternProvider (TogglePatternIdentifiers.Pattern.Id); textExpert = TextImplementorFactory.GetImplementor (this, provider); imageExpert = new ImageImplementorHelper (this); actionExpert = new ActionImplementorHelper (); editableTextExpert = new EditableTextImplementorHelper (this, this, textExpert); // TODO: Localize the name?s actionExpert.Add ("click", "click", null, DoClick); if (toggleProvider != null) actionExpert.Add ("toggle", "toggle", null, DoToggle); if (invokeProvider != null) actionExpert.Add ("invoke", "invoke", null, DoInvoke); Role = (toggleProvider != null? Atk.Role.CheckBox: Atk.Role.ListItem); }
public TextImageLabel (IRawElementProviderSimple provider) : base (provider) { imageImplementor = new ImageImplementorHelper (this); }
public TextImageLabel(IRawElementProviderSimple provider) : base(provider) { imageImplementor = new ImageImplementorHelper(this); }