Click here to Skip to main content
15,922,630 members
Home / Discussions / C#
   

C#

 
AnswerRe: Bind each record in Form A from Form b on Btn clicks in Form A Pin
Peace ON27-Apr-10 20:58
Peace ON27-Apr-10 20:58 
GeneralRe: Bind each record in Form A from Form b on Btn clicks in Form A Pin
MathewPV27-Apr-10 22:55
MathewPV27-Apr-10 22:55 
AnswerRe: Bind each record in Form A from Form b on Btn clicks in Form A Pin
Gerry Schmitz27-Apr-10 23:01
mveGerry Schmitz27-Apr-10 23:01 
QuestionC# .net question about how to change this code to allow a parameter and substitute "q" for that parameter Pin
joe loyzaga27-Apr-10 19:27
joe loyzaga27-Apr-10 19:27 
AnswerRe: C# .net question about how to change this code to allow a parameter and substitute "q" for that parameter Pin
Estys27-Apr-10 22:17
Estys27-Apr-10 22:17 
GeneralRe: C# .net question about how to change this code to allow a parameter and substitute "q" for that parameter Pin
joe loyzaga28-Apr-10 0:16
joe loyzaga28-Apr-10 0:16 
GeneralRe: C# .net question about how to change this code to allow a parameter and substitute "q" for that parameter Pin
Estys28-Apr-10 0:38
Estys28-Apr-10 0:38 
GeneralRe: C# .net question about how to change this code to allow a parameter and substitute "q" for that parameter Pin
joe loyzaga28-Apr-10 12:21
joe loyzaga28-Apr-10 12:21 
this is my whole code and I want to parameterise the " HtmlEdit uIGenericSearchEdit = this.UIGenericWindowsInterneWindow.UIGenericDocument.UIGenericSearchEdit;
"to supply the name of the object so as not to have a new mthod for each new object type searchedit of different name - i will still give it a unique label -uIGenericSearchEdit1 ,uIGenericSearchEdit2 etc

// ------------------------------------------------------------------------------<br />
//  <auto-generated><br />
//      This code was generated by coded UI test builder.<br />
//      Version: 10.0.0.0<br />
//<br />
//      Changes to this file may cause incorrect behavior and will be lost if<br />
//      the code is regenerated.<br />
//  </auto-generated><br />
// ------------------------------------------------------------------------------<br />
<br />
namespace proofofconcept1csharp<br />
{<br />
    using System;<br />
    using System.CodeDom.Compiler;<br />
    using System.Collections.Generic;<br />
    using System.Drawing;<br />
    using System.Text.RegularExpressions;<br />
    using System.Windows.Input;<br />
    using Microsoft.VisualStudio.TestTools.UITest.Extension;<br />
    using Microsoft.VisualStudio.TestTools.UITesting;<br />
    using Microsoft.VisualStudio.TestTools.UITesting.HtmlControls;<br />
    using Microsoft.VisualStudio.TestTools.UITesting.WinControls;<br />
    using Microsoft.VisualStudio.TestTools.UnitTesting;<br />
    using Keyboard = Microsoft.VisualStudio.TestTools.UITesting.Keyboard;<br />
    using Mouse = Microsoft.VisualStudio.TestTools.UITesting.Mouse;<br />
    using MouseButtons = System.Windows.Forms.MouseButtons;<br />
    <br />
    using System.IO;<br />
    using System.Collections;<br />
    using System.Configuration;<br />
    using System.Data;<br />
    using System.Data.OleDb;<br />
    using System.Web;<br />
    using System.Web.UI;<br />
<br />
    <br />
    [GeneratedCode("Coded UITest Builder", "10.0.30128.1")]<br />
    public partial class UIMap<br />
    {<br />
        <br />
        /// <summary><br />
        /// RecordedMethod1 - Use 'RecordedMethod1Params' to pass parameters into this method.<br />
        /// </summary><br />
        public void RecordedMethod1()<br />
        {<br />
            #region Variable Declarations<br />
            HtmlEdit uIGenericSearchEdit = this.UIGenericWindowsInterneWindow.UIGenericDocument.UIGenericSearchEdit;<br />
            HtmlInputButton uIGenericSearchButton = this.UIGenericWindowsInterneWindow.UIGenericDocument.UIGenericSearchButton;<br />
            WinButton uICloseButton = this.UIGenericWindowsInterneWindow.UITestGenericSearchWindTitleBar.UICloseButton;<br />
            #endregion<br />
            <br />
<br />
            // Go to web page 'http://www.google.com.au/' using new browser instance<br />
            this.UIGenericWindowsInterneWindow.LaunchUrl(new System.Uri(this.RecordedMethod1Params.UIGenericWindowsInterneWindowUrl));<br />
<br />
            // Type 'test' in 'Google Search' text box<br />
            uIGenericSearchEdit.Text = this.RecordedMethod1Params.UIGenericSearchEditText;<br />
<br />
            // Click 'Google Search' button<br />
            Mouse.Click(uIGenericSearchButton, new Point(47, 19));<br />
<br />
            // Click 'Close' button<br />
            Mouse.Click(uICloseButton, new Point(7, 9));<br />
        }<br />
        <br />
        #region Properties<br />
        public virtual RecordedMethod1Params RecordedMethod1Params<br />
        {<br />
            get<br />
            {<br />
                if ((this.mRecordedMethod1Params == null))<br />
                {<br />
                    this.mRecordedMethod1Params = new RecordedMethod1Params();<br />
                }<br />
                return this.mRecordedMethod1Params;<br />
            }<br />
        }<br />
        <br />
        public UIGenericWindowsInterneWindow UIGenericWindowsInterneWindow<br />
        {<br />
            get<br />
            {<br />
                if ((this.mUIGenericWindowsInterneWindow == null))<br />
                {<br />
                    this.mUIGenericWindowsInterneWindow = new UIGenericWindowsInterneWindow();<br />
                }<br />
                return this.mUIGenericWindowsInterneWindow;<br />
            }<br />
        }<br />
        #endregion<br />
        <br />
        #region Fields<br />
        private RecordedMethod1Params mRecordedMethod1Params;<br />
        <br />
        private UIGenericWindowsInterneWindow mUIGenericWindowsInterneWindow;<br />
        #endregion<br />
    }<br />
    <br />
    /// <summary><br />
    /// Parameters to be passed into 'RecordedMethod1'<br />
    /// </summary><br />
    [GeneratedCode("Coded UITest Builder", "10.0.30128.1")]<br />
    public class RecordedMethod1Params<br />
    {<br />
        <br />
        #region Fields<br />
        /// <summary><br />
        /// Go to web page 'http://www.google.com.au/' using new browser instance<br />
        /// </summary><br />
        public string UIGenericWindowsInterneWindowUrl = "http://www.google.com.au/";<br />
        <br />
        /// <summary><br />
        /// Type 'test' in 'Google Search' text box<br />
        /// </summary><br />
        public string UIGenericSearchEditText = "test";<br />
        #endregion<br />
    }<br />
    <br />
    [GeneratedCode("Coded UITest Builder", "10.0.30128.1")]<br />
  <br />
    public class UIGenericWindowsInterneWindow : BrowserWindow<br />
    {<br />
<br />
        public UIGenericWindowsInterneWindow()<br />
        {<br />
            #region Search Criteria<br />
            ///this.SearchProperties[UITestControl.PropertyNames.Name] = "Google";<br />
            this.SearchProperties[UITestControl.PropertyNames.ClassName] = "IEFrame";<br />
            ///this.WindowTitles.Add("Google");<br />
            ///this.WindowTitles.Add("test - Google Search");<br />
            #endregion<br />
        }<br />
<br />
        public void LaunchUrl(System.Uri url)<br />
        {<br />
            this.CopyFrom(BrowserWindow.Launch(url));<br />
        }<br />
<br />
        #region Properties<br />
        public UIGenericDocument UIGenericDocument<br />
        {<br />
            get<br />
            {<br />
                if ((this.mUIGenericDocument == null))<br />
                {<br />
                    this.mUIGenericDocument = new UIGenericDocument(this);<br />
                }<br />
                return this.mUIGenericDocument;<br />
            }<br />
        }<br />
<br />
        public UITestGenericSearchWindTitleBar UITestGenericSearchWindTitleBar<br />
        {<br />
            get<br />
            {<br />
                if ((this.mUITestGenericSearchWindTitleBar == null))<br />
                {<br />
                    this.mUITestGenericSearchWindTitleBar = new UITestGenericSearchWindTitleBar(this);<br />
                }<br />
                return this.mUITestGenericSearchWindTitleBar;<br />
            }<br />
        }<br />
        #endregion<br />
<br />
        #region Fields<br />
        private UIGenericDocument mUIGenericDocument;<br />
<br />
        private UITestGenericSearchWindTitleBar mUITestGenericSearchWindTitleBar;<br />
        #endregion<br />
    }<br />
   <br />
    [GeneratedCode("Coded UITest Builder", "10.0.30128.1")]<br />
 <br />
    public class UIGenericDocument : HtmlDocument<br />
    {<br />
<br />
        public UIGenericDocument(UITestControl searchLimitContainer) :<br />
            base(searchLimitContainer)<br />
        {<br />
            #region Search Criteria<br />
           /// this.SearchProperties[HtmlDocument.PropertyNames.Id] = null;<br />
           /// this.SearchProperties[HtmlDocument.PropertyNames.RedirectingPage] = "False";<br />
           /// this.SearchProperties[HtmlDocument.PropertyNames.FrameDocument] = "False";<br />
            ///this.FilterProperties[HtmlDocument.PropertyNames.Title] = "Google";<br />
            ///this.FilterProperties[HtmlDocument.PropertyNames.AbsolutePath] = "/";<br />
            ///this.FilterProperties[HtmlDocument.PropertyNames.PageUrl] = "http://www.google.com.au/";<br />
            ///this.WindowTitles.Add("Google");<br />
            #endregion<br />
        }<br />
<br />
        #region Properties<br />
        public HtmlEdit UIGenericSearchEdit<br />
        {<br />
            get<br />
            {<br />
                if ((this.mUIGenericSearchEdit == null))<br />
                {<br />
                    this.mUIGenericSearchEdit = new HtmlEdit(this);<br />
                    #region Search Criteria<br />
                    this.mUIGenericSearchEdit.SearchProperties[HtmlEdit.PropertyNames.Id] = null;<br />
                    this.mUIGenericSearchEdit.SearchProperties[HtmlEdit.PropertyNames.Name] = "q";<br />
                    this.mUIGenericSearchEdit.SearchProperties[HtmlEdit.PropertyNames.LabeledBy] = null;<br />
                    this.mUIGenericSearchEdit.SearchProperties[HtmlEdit.PropertyNames.Type] = "SINGLELINE";<br />
                    ///this.mUIGenericSearchEdit.FilterProperties[HtmlEdit.PropertyNames.Title] = "Google Search";<br />
                    ///this.mUIGenericSearchEdit.FilterProperties[HtmlEdit.PropertyNames.Class] = "lst";<br />
                    ///this.mUIGenericSearchEdit.FilterProperties[HtmlEdit.PropertyNames.ControlDefinition] = "onblur=google&&google.fade&&";<br />
                    ///this.mUIGenericSearchEdit.FilterProperties[HtmlEdit.PropertyNames.TagInstance] = "3";<br />
                    ///this.mUIGenericSearchEdit.WindowTitles.Add("Google");<br />
                    #endregion<br />
                }<br />
                return this.mUIGenericSearchEdit;<br />
            }<br />
        }<br />
<br />
        public HtmlInputButton UIGenericSearchButton<br />
        {<br />
            get<br />
            {<br />
                if ((this.mUIGenericSearchButton == null))<br />
                {<br />
                    this.mUIGenericSearchButton = new HtmlInputButton(this);<br />
                    #region Search Criteria<br />
                    this.mUIGenericSearchButton.SearchProperties[HtmlButton.PropertyNames.Id] = null;<br />
                    this.mUIGenericSearchButton.SearchProperties[HtmlButton.PropertyNames.Name] = "btnG";<br />
                    ///this.mUIGenericSearchButton.SearchProperties[HtmlButton.PropertyNames.DisplayText] = "Google Search";<br />
                    this.mUIGenericSearchButton.FilterProperties[HtmlButton.PropertyNames.Type] = "submit";<br />
                    this.mUIGenericSearchButton.FilterProperties[HtmlButton.PropertyNames.Title] = null;<br />
                    ///this.mUIGenericSearchButton.FilterProperties[HtmlButton.PropertyNames.Class] = "lsb";<br />
                    ///this.mUIGenericSearchButton.FilterProperties[HtmlButton.PropertyNames.ControlDefinition] = "class=lsb onclick=this.checked=1 value=\"";<br />
                    ///this.mUIGenericSearchButton.FilterProperties[HtmlButton.PropertyNames.TagInstance] = "4";<br />
                    ///this.mUIGenericSearchButton.WindowTitles.Add("Google");<br />
                    #endregion<br />
                }<br />
                return this.mUIGenericSearchButton;<br />
            }<br />
        }<br />
        #endregion<br />
<br />
        #region Fields<br />
        private HtmlEdit mUIGenericSearchEdit;<br />
<br />
        private HtmlInputButton mUIGenericSearchButton;<br />
        #endregion<br />
    }<br />
    <br />
    [GeneratedCode("Coded UITest Builder", "10.0.30128.1")]<br />
   <br />
    public class UITestGenericSearchWindTitleBar : WinTitleBar<br />
    {<br />
<br />
        public UITestGenericSearchWindTitleBar(UITestControl searchLimitContainer) :<br />
            base(searchLimitContainer)<br />
        {<br />
            #region Search Criteria<br />
            ///this.WindowTitles.Add("test - Google Search");<br />
            #endregion<br />
        }<br />
<br />
        #region Properties<br />
        public WinButton UICloseButton<br />
        {<br />
            get<br />
            {<br />
                if ((this.mUICloseButton == null))<br />
                {<br />
                    this.mUICloseButton = new WinButton(this);<br />
                    #region Search Criteria<br />
                    this.mUICloseButton.SearchProperties[WinButton.PropertyNames.Name] = "Close";<br />
                    ///this.mUICloseButton.WindowTitles.Add("test - Google Search");<br />
                    #endregion<br />
                }<br />
                return this.mUICloseButton;<br />
            }<br />
        }<br />
        #endregion<br />
<br />
        #region Fields<br />
        private WinButton mUICloseButton;<br />
        #endregion<br />
    }<br />
}<br />

GeneralRe: C# .net question about how to change this code to allow a parameter and substitute "q" for that parameter Pin
Estys28-Apr-10 23:57
Estys28-Apr-10 23:57 
QuestionFind Year from text in C# Pin
montu337727-Apr-10 17:01
montu337727-Apr-10 17:01 
AnswerRe: Find Year from text in C# Pin
RCoate27-Apr-10 17:05
RCoate27-Apr-10 17:05 
GeneralRe: Find Year from text in C# Pin
montu337727-Apr-10 17:20
montu337727-Apr-10 17:20 
GeneralRe: Find Year from text in C# Pin
PIEBALDconsult27-Apr-10 17:29
mvePIEBALDconsult27-Apr-10 17:29 
AnswerRe: Find Year from text in C# Pin
Mycroft Holmes27-Apr-10 17:20
professionalMycroft Holmes27-Apr-10 17:20 
AnswerRe: Find Year from text in C# Pin
Gerry Schmitz27-Apr-10 23:19
mveGerry Schmitz27-Apr-10 23:19 
Questionchange the image to the color.. Pin
@nisha 2n27-Apr-10 15:35
@nisha 2n27-Apr-10 15:35 
AnswerRe: change the image to the color.. Pin
Mycroft Holmes27-Apr-10 17:13
professionalMycroft Holmes27-Apr-10 17:13 
GeneralRe: change the image to the color.. Pin
@nisha 2n27-Apr-10 20:20
@nisha 2n27-Apr-10 20:20 
QuestionPC Crashed: Getting "Class Library Cannot be Started Directly" error Pin
boreland27-Apr-10 14:38
boreland27-Apr-10 14:38 
AnswerRe: PC Crashed: Getting "Class Library Cannot be Started Directly" error Pin
Luc Pattyn27-Apr-10 15:07
sitebuilderLuc Pattyn27-Apr-10 15:07 
QuestionDLL Decomplile Pin
Abdullah S. Abdelhay27-Apr-10 8:24
Abdullah S. Abdelhay27-Apr-10 8:24 
AnswerRe: DLL Decomplile Pin
Dimitri Witkowski27-Apr-10 8:31
Dimitri Witkowski27-Apr-10 8:31 
AnswerRe: DLL Decomplile Pin
Ian Shlasko27-Apr-10 8:32
Ian Shlasko27-Apr-10 8:32 
AnswerRe: DLL Decomplile Pin
Pete O'Hanlon27-Apr-10 22:36
mvePete O'Hanlon27-Apr-10 22:36 
AnswerRe: DLL Decomplile Pin
harold aptroot28-Apr-10 2:00
harold aptroot28-Apr-10 2:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.