PageRenderTime 83ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/Languages/IronPython/Samples/tests/BadPaint/UIMap.Designer.vb

https://github.com/thomo13/ironruby
Visual Basic | 344 lines | 240 code | 52 blank | 52 comment | 0 complexity | 82ad8e803d33dcb32b3c5a7ee0b66024 MD5 | raw file
  1. '------------------------------------------------------------------------------
  2. ' <auto-generated>
  3. ' This code was generated by coded UI test builder.
  4. ' Version: 10.0.0.0
  5. '
  6. ' Changes to this file may cause incorrect behavior and will be lost if
  7. ' the code is regenerated.
  8. ' </auto-generated>
  9. ' ------------------------------------------------------------------------------
  10. Imports System
  11. Imports System.CodeDom.Compiler
  12. Imports System.Collections.Generic
  13. Imports System.Drawing
  14. Imports System.Text.RegularExpressions
  15. Imports System.Windows.Input
  16. Imports Microsoft.VisualStudio.TestTools.UITest.Extension
  17. Imports Microsoft.VisualStudio.TestTools.UITesting
  18. Imports Microsoft.VisualStudio.TestTools.UITesting.WinControls
  19. Imports Microsoft.VisualStudio.TestTools.UITesting.WpfControls
  20. Imports Microsoft.VisualStudio.TestTools.UnitTesting
  21. Imports Keyboard = Microsoft.VisualStudio.TestTools.UITesting.Keyboard
  22. Imports Mouse = Microsoft.VisualStudio.TestTools.UITesting.Mouse
  23. Imports MouseButtons = System.Windows.Forms.MouseButtons
  24. Namespace BadPaint
  25. <GeneratedCode("Coded UITest Builder", "10.0.30319.1")> _
  26. Partial Public Class UIMap
  27. '''<summary>
  28. '''InsertPythonCode - Use 'InsertPythonCodeParams' to pass parameters into this method.
  29. '''</summary>
  30. Public Sub InsertPythonCode()
  31. Dim uI_currentLanguageComboBox As WpfComboBox = Me.UIBadPaintWindow.UI_currentLanguageComboBox
  32. Dim uI_codeTextBoxEdit As WpfEdit = Me.UIBadPaintWindow.UI_codeTextBoxEdit
  33. 'Select 'IronPython 2.7' in '_currentLanguage' combo box
  34. uI_currentLanguageComboBox.SelectedItem = Me.InsertPythonCodeParams.UI_currentLanguageComboBoxSelectedItem
  35. 'Type the following paragraph in '_codeTextBox' text box
  36. ''import clr
  37. 'clr.AddReference("PresentationFramework")
  38. 'import System
  39. 'System.Windows.MessageBox.Show(str(dir()))'
  40. uI_codeTextBoxEdit.Text = Me.InsertPythonCodeParams.UI_codeTextBoxEditText
  41. 'Click '_codeTextBox' text box
  42. Mouse.Click(uI_codeTextBoxEdit, New Point(568, 110))
  43. End Sub
  44. '''<summary>
  45. '''RunPythonCode
  46. '''</summary>
  47. Public Sub RunPythonCode()
  48. Dim uIBadPaintTitleBar As WpfTitleBar = Me.UIBadPaintWindow.UIBadPaintTitleBar
  49. Dim uIRunCodeButton As WpfButton = Me.UIBadPaintWindow.UIRunCodeButton
  50. 'Click 'BadPaint' title bar
  51. Mouse.Click(uIBadPaintTitleBar, New Point(464, 10))
  52. 'Click 'Run Code' button
  53. Mouse.Click(uIRunCodeButton, New Point(77, 14))
  54. End Sub
  55. '''<summary>
  56. '''AssertPythonExecute - Use 'AssertPythonExecuteExpectedValues' to pass parameters into this method.
  57. '''</summary>
  58. Public Sub AssertPythonExecute()
  59. Dim uIApplicationSystem__bText As WinText = Me.UIApplicationSystem__bWindow.UIApplicationSystem__bText
  60. 'Verify that '['Application', 'System', '__builtins__', '__doc__...' label's property 'DisplayText' equals '['Application', 'System', '__builtins__', '__doc__', '__file__', '__name__', 'clr']'
  61. Assert.AreEqual(Me.AssertPythonExecuteExpectedValues.UIApplicationSystem__bTextDisplayText, uIApplicationSystem__bText.DisplayText)
  62. End Sub
  63. '''<summary>
  64. '''CloseBadPaint
  65. '''</summary>
  66. Public Sub CloseBadPaint()
  67. Dim uIOKButton As WinButton = Me.UIOKWindow.UIOKButton
  68. Dim uICloseButton As WpfButton = Me.UIBadPaintWindow.UIBadPaintTitleBar.UICloseButton
  69. 'Click 'OK' button
  70. Mouse.Click(uIOKButton, New Point(63, 17))
  71. 'Click 'Close' button
  72. Mouse.Click(uICloseButton, New Point(13, 10))
  73. End Sub
  74. #Region "Properties"
  75. Public Overridable ReadOnly Property InsertPythonCodeParams() As InsertPythonCodeParams
  76. Get
  77. If (Me.mInsertPythonCodeParams Is Nothing) Then
  78. Me.mInsertPythonCodeParams = New InsertPythonCodeParams()
  79. End If
  80. Return Me.mInsertPythonCodeParams
  81. End Get
  82. End Property
  83. Public Overridable ReadOnly Property AssertPythonExecuteExpectedValues() As AssertPythonExecuteExpectedValues
  84. Get
  85. If (Me.mAssertPythonExecuteExpectedValues Is Nothing) Then
  86. Me.mAssertPythonExecuteExpectedValues = New AssertPythonExecuteExpectedValues()
  87. End If
  88. Return Me.mAssertPythonExecuteExpectedValues
  89. End Get
  90. End Property
  91. Public ReadOnly Property UIBadPaintWindow() As UIBadPaintWindow
  92. Get
  93. If (Me.mUIBadPaintWindow Is Nothing) Then
  94. Me.mUIBadPaintWindow = New UIBadPaintWindow()
  95. End If
  96. Return Me.mUIBadPaintWindow
  97. End Get
  98. End Property
  99. Public ReadOnly Property UIApplicationSystem__bWindow() As UIApplicationSystem__bWindow
  100. Get
  101. If (Me.mUIApplicationSystem__bWindow Is Nothing) Then
  102. Me.mUIApplicationSystem__bWindow = New UIApplicationSystem__bWindow()
  103. End If
  104. Return Me.mUIApplicationSystem__bWindow
  105. End Get
  106. End Property
  107. Public ReadOnly Property UIOKWindow() As UIOKWindow
  108. Get
  109. If (Me.mUIOKWindow Is Nothing) Then
  110. Me.mUIOKWindow = New UIOKWindow()
  111. End If
  112. Return Me.mUIOKWindow
  113. End Get
  114. End Property
  115. #End Region
  116. #Region "Fields"
  117. Private mInsertPythonCodeParams As InsertPythonCodeParams
  118. Private mAssertPythonExecuteExpectedValues As AssertPythonExecuteExpectedValues
  119. Private mUIBadPaintWindow As UIBadPaintWindow
  120. Private mUIApplicationSystem__bWindow As UIApplicationSystem__bWindow
  121. Private mUIOKWindow As UIOKWindow
  122. #End Region
  123. End Class
  124. '''<summary>
  125. '''Parameters to be passed into 'InsertPythonCode'
  126. '''</summary>
  127. <GeneratedCode("Coded UITest Builder", "10.0.30319.1")> _
  128. Public Class InsertPythonCodeParams
  129. #Region "Fields"
  130. '''<summary>
  131. '''Select 'IronPython 2.7' in '_currentLanguage' combo box
  132. '''</summary>
  133. Public UI_currentLanguageComboBoxSelectedItem As String = "IronPython 2.7"
  134. '''<summary>
  135. '''Type the following paragraph in '_codeTextBox' text box
  136. ''''import clr
  137. '''clr.AddReference("PresentationFramework")
  138. '''import System
  139. '''System.Windows.MessageBox.Show(str(dir()))'
  140. '''</summary>
  141. Public UI_codeTextBoxEditText As String = "import clr"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"clr.AddReference(""PresentationFramework"")"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"import System"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"System.Wind"& _
  142. "ows.MessageBox.Show(str(dir()))"
  143. #End Region
  144. End Class
  145. '''<summary>
  146. '''Parameters to be passed into 'AssertPythonExecute'
  147. '''</summary>
  148. <GeneratedCode("Coded UITest Builder", "10.0.30319.1")> _
  149. Public Class AssertPythonExecuteExpectedValues
  150. #Region "Fields"
  151. '''<summary>
  152. '''Verify that '['Application', 'System', '__builtins__', '__doc__...' label's property 'DisplayText' equals '['Application', 'System', '__builtins__', '__doc__', '__file__', '__name__', 'clr']'
  153. '''</summary>
  154. Public UIApplicationSystem__bTextDisplayText As String = "['Application', 'System', '__builtins__', '__doc__', '__file__', '__name__', 'clr"& _
  155. "']"
  156. #End Region
  157. End Class
  158. <GeneratedCode("Coded UITest Builder", "10.0.30319.1")> _
  159. Public Class UIBadPaintWindow
  160. Inherits WpfWindow
  161. Public Sub New()
  162. MyBase.New
  163. Me.SearchProperties(WpfWindow.PropertyNames.Name) = "BadPaint"
  164. Me.SearchProperties.Add(New PropertyExpression(WpfWindow.PropertyNames.ClassName, "HwndWrapper", PropertyExpressionOperator.Contains))
  165. Me.WindowTitles.Add("BadPaint")
  166. End Sub
  167. #Region "Properties"
  168. Public ReadOnly Property UI_currentLanguageComboBox() As WpfComboBox
  169. Get
  170. If (Me.mUI_currentLanguageComboBox Is Nothing) Then
  171. Me.mUI_currentLanguageComboBox = New WpfComboBox(Me)
  172. Me.mUI_currentLanguageComboBox.SearchProperties(WpfComboBox.PropertyNames.AutomationId) = "_currentLanguage"
  173. Me.mUI_currentLanguageComboBox.WindowTitles.Add("BadPaint")
  174. End If
  175. Return Me.mUI_currentLanguageComboBox
  176. End Get
  177. End Property
  178. Public ReadOnly Property UI_codeTextBoxEdit() As WpfEdit
  179. Get
  180. If (Me.mUI_codeTextBoxEdit Is Nothing) Then
  181. Me.mUI_codeTextBoxEdit = New WpfEdit(Me)
  182. Me.mUI_codeTextBoxEdit.SearchProperties(WpfEdit.PropertyNames.AutomationId) = "_codeTextBox"
  183. Me.mUI_codeTextBoxEdit.WindowTitles.Add("BadPaint")
  184. End If
  185. Return Me.mUI_codeTextBoxEdit
  186. End Get
  187. End Property
  188. Public ReadOnly Property UIBadPaintTitleBar() As UIBadPaintTitleBar
  189. Get
  190. If (Me.mUIBadPaintTitleBar Is Nothing) Then
  191. Me.mUIBadPaintTitleBar = New UIBadPaintTitleBar(Me)
  192. End If
  193. Return Me.mUIBadPaintTitleBar
  194. End Get
  195. End Property
  196. Public ReadOnly Property UIRunCodeButton() As WpfButton
  197. Get
  198. If (Me.mUIRunCodeButton Is Nothing) Then
  199. Me.mUIRunCodeButton = New WpfButton(Me)
  200. Me.mUIRunCodeButton.SearchProperties(WpfButton.PropertyNames.AutomationId) = "UpdateButton"
  201. Me.mUIRunCodeButton.WindowTitles.Add("BadPaint")
  202. End If
  203. Return Me.mUIRunCodeButton
  204. End Get
  205. End Property
  206. #End Region
  207. #Region "Fields"
  208. Private mUI_currentLanguageComboBox As WpfComboBox
  209. Private mUI_codeTextBoxEdit As WpfEdit
  210. Private mUIBadPaintTitleBar As UIBadPaintTitleBar
  211. Private mUIRunCodeButton As WpfButton
  212. #End Region
  213. End Class
  214. <GeneratedCode("Coded UITest Builder", "10.0.30319.1")> _
  215. Public Class UIBadPaintTitleBar
  216. Inherits WpfTitleBar
  217. Public Sub New(ByVal searchLimitContainer As UITestControl)
  218. MyBase.New(searchLimitContainer)
  219. Me.SearchProperties(WpfTitleBar.PropertyNames.AutomationId) = "TitleBar"
  220. Me.WindowTitles.Add("BadPaint")
  221. End Sub
  222. #Region "Properties"
  223. Public ReadOnly Property UICloseButton() As WpfButton
  224. Get
  225. If (Me.mUICloseButton Is Nothing) Then
  226. Me.mUICloseButton = New WpfButton(Me)
  227. Me.mUICloseButton.SearchProperties(WpfButton.PropertyNames.AutomationId) = "Close"
  228. Me.mUICloseButton.WindowTitles.Add("BadPaint")
  229. End If
  230. Return Me.mUICloseButton
  231. End Get
  232. End Property
  233. #End Region
  234. #Region "Fields"
  235. Private mUICloseButton As WpfButton
  236. #End Region
  237. End Class
  238. <GeneratedCode("Coded UITest Builder", "10.0.30319.1")> _
  239. Public Class UIApplicationSystem__bWindow
  240. Inherits WinWindow
  241. Public Sub New()
  242. MyBase.New
  243. Me.SearchProperties(WinWindow.PropertyNames.Name) = "['Application', 'System', '__builtins__', '__doc__', '__file__', '__name__', 'clr"& _
  244. "']"
  245. Me.SearchProperties(WinWindow.PropertyNames.ClassName) = "Static"
  246. Me.WindowTitles.Add("['Application', 'System', '__builtins__', '__doc__', '__file__', '__name__', 'clr"& _
  247. "']")
  248. End Sub
  249. #Region "Properties"
  250. Public ReadOnly Property UIApplicationSystem__bText() As WinText
  251. Get
  252. If (Me.mUIApplicationSystem__bText Is Nothing) Then
  253. Me.mUIApplicationSystem__bText = New WinText(Me)
  254. Me.mUIApplicationSystem__bText.SearchProperties(WinText.PropertyNames.Name) = "['Application', 'System', '__builtins__', '__doc__', '__file__', '__name__', 'clr"& _
  255. "']"
  256. Me.mUIApplicationSystem__bText.WindowTitles.Add("['Application', 'System', '__builtins__', '__doc__', '__file__', '__name__', 'clr"& _
  257. "']")
  258. End If
  259. Return Me.mUIApplicationSystem__bText
  260. End Get
  261. End Property
  262. #End Region
  263. #Region "Fields"
  264. Private mUIApplicationSystem__bText As WinText
  265. #End Region
  266. End Class
  267. <GeneratedCode("Coded UITest Builder", "10.0.30319.1")> _
  268. Public Class UIOKWindow
  269. Inherits WinWindow
  270. Public Sub New()
  271. MyBase.New
  272. Me.SearchProperties(WinWindow.PropertyNames.Name) = "OK"
  273. Me.SearchProperties(WinWindow.PropertyNames.ClassName) = "Button"
  274. Me.WindowTitles.Add("OK")
  275. End Sub
  276. #Region "Properties"
  277. Public ReadOnly Property UIOKButton() As WinButton
  278. Get
  279. If (Me.mUIOKButton Is Nothing) Then
  280. Me.mUIOKButton = New WinButton(Me)
  281. Me.mUIOKButton.SearchProperties(WinButton.PropertyNames.Name) = "OK"
  282. Me.mUIOKButton.WindowTitles.Add("OK")
  283. End If
  284. Return Me.mUIOKButton
  285. End Get
  286. End Property
  287. #End Region
  288. #Region "Fields"
  289. Private mUIOKButton As WinButton
  290. #End Region
  291. End Class
  292. End Namespace