コード例 #1
0
ファイル: Click.cs プロジェクト: bbriggs/FieldWorks
        /// <summary>
        /// method to apply when a non-terminal node has been found
        /// </summary>
        /// <param name="ah"></param>
        public void visitNode(AccessibilityHelper ah)
        {
            // does this ah need to be clicked or something to get to its children?
            if (1 == m_logLevel)
                m_log.paragraph(makeNameTag() + "Click found &quot;" + ah.Role + ":" + ah.Name + "&quot;");

            if ((ah.Role == AccessibleRole.MenuItem) || (m_for != null && "all" == (string)m_for))
            {
                if (1 == m_logLevel) m_log.paragraph(makeNameTag() + "Click determining what to do with this intermediate step");
                bool isFocused = (ah.States & AccessibleStates.Focused) == AccessibleStates.Focused;
                if (!isFocused)
                {
                    if (1 == m_logLevel) m_log.paragraph(makeNameTag() + "Clicking relative to &quot;" + ah.Role + ":" + ah.Name + "&quot; by (" + m_dx + ", " + m_dy + ") since it does not have focus");
                    ah.SimulateClickRelative(m_dx, m_dy);
                }
                else
                {
                    if (1 == m_logLevel) m_log.paragraph(makeNameTag() + "Click hovering on &quot;" + ah.Role + ":" + ah.Name + "&quot; since it has focus");
                    ah.MoveMouseOverMe(); // hover
                }
            }
        }
コード例 #2
0
ファイル: HoverOver.cs プロジェクト: sillsdev/WorldPad
		/// <summary>
		/// method to apply when a non-terminal node has been found
		/// </summary>
		/// <param name="ah"></param>
		public void visitNode(AccessibilityHelper ah)
		{ // does this ah need to be clicked or something to get to its children?
			ah.MoveMouseOverMe(); // hover
			if (1 == m_logLevel)
				m_log.paragraph("HoverOver hovering over &quot;" + ah.Role + ":" + ah.Name + "&quot;");
		}