Esempio n. 1
0
		internal SelectionItemPattern (ISelectionItemPattern source, AutomationElement element, bool cached)
		{
			this.element = element;
			this.cached = cached;
			this.Source = source;
			currentInfo = new SelectionItemPatternInformation (this, false);
			if (cached)
				cachedInfo = new SelectionItemPatternInformation (this, true);
		}
Esempio n. 2
0
 internal SelectionItemPattern(ISelectionItemPattern source, AutomationElement element, bool cached)
 {
     this.element = element;
     this.cached  = cached;
     this.Source  = source;
     currentInfo  = new SelectionItemPatternInformation(this, false);
     if (cached)
     {
         cachedInfo = new SelectionItemPatternInformation(this, true);
     }
 }
Esempio n. 3
0
        public static ISelectionItemPattern GetSelectionItemPattern(PatternsData data)
        {
            ISelectionItemPattern selectionItemPattern = Substitute.For <ISelectionItemPattern>();

            // selectionItemPattern.AddToSelection()
            // selectionItemPattern.RemoveFromSelection()
            // selectionItemPattern.Select()

            selectionItemPattern.Current.IsSelected.Returns(data.SelectionItemPattern_IsSelected);
            selectionItemPattern.Current.SelectionContainer.Returns(data.SelectionItemPattern_SelectionContainer);

            selectionItemPattern.Cached.IsSelected.Returns(data.SelectionItemPattern_IsSelected);
            selectionItemPattern.Cached.SelectionContainer.Returns(data.SelectionItemPattern_SelectionContainer);

            return(selectionItemPattern);
        }
 public SelectionItemPatternInformation(ISelectionItemPattern selectionItemPattern, bool useCache)
 {
     _selectionItemPattern = selectionItemPattern;
     _useCache             = useCache;
 }
 public SelectionItemPatternInformation(ISelectionItemPattern selectionItemPattern, bool useCache)
 {
     _selectionItemPattern = selectionItemPattern;
     _useCache = useCache;
 }