当前位置: 首页>>代码示例>>C#>>正文


C# Window.Click方法代码示例

本文整理汇总了C#中Window.Click方法的典型用法代码示例。如果您正苦于以下问题:C# Window.Click方法的具体用法?C# Window.Click怎么用?C# Window.Click使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Window的用法示例。


在下文中一共展示了Window.Click方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: play_puzzle

    public void play_puzzle()
    {
        int i;
        UICollection<UIObject> UICoPane;

        UICondition uIpane = UICondition.Create("@ControlType=Pane", new Object[0]);
        UIObject uIopane = this.Children.Find(uIpane);
        //UICondition uIpane = UICondition.Create("@ControlType=ControlType.Pane", new Object[0]);
        UICoPane = uIopane.Children.FindMultiple(uIpane);
        int Dim = UICoPane.Count;
        //foreach (UIObject i in UICoPane)
        //{
        //    Window objpuzzle = new Window(i);
        //    objpuzzle.Click();
        //}
        for(int aa = 0; aa < 40; aa++)
        {
            Random rand = new Random(Environment.TickCount);
            i = rand.Next(Dim);
            //Console.Write(i.ToString()+" : ");
            //Console.WriteLine(UICoPane.Count.ToString()+" : "+aa.ToString());
            Window objpuzzle = new Window(UICoPane[i]);
            objpuzzle.Click();
            Thread.Sleep(200);
        }
    }
开发者ID:TerabyteX,项目名称:main,代码行数:26,代码来源:WinClass.cs

示例2: Test_about

 public void Test_about()
 {
     UICondition uICondition = UICondition.Create("@Name='about'", new Object[0]);
     UIObject uIObject = this.Descendants.Find(uICondition);
     Window obj = new Window(uIObject);
     UICondition uICondition2 = UICondition.Create("@Name='Tile Size'", new Object[0]);
     obj.Click();
     Thread.Sleep(300);
     UIObject result = this.Children.Find(uICondition2);
 }
开发者ID:TerabyteX,项目名称:main,代码行数:10,代码来源:WinClass.cs

示例3: Test_create

    public void Test_create()
    {
        UICondition uICcreate = UICondition.Create("@Name='create'", new Object[0]);
        UIObject uIoCreate = this.Descendants.Find(uICcreate);
        Window objcreate = new Window(uIoCreate);
        objcreate.Click();

        UICondition uI3x3 = UICondition.Create("@Name='3x3'", new Object[0]);
        UIObject uIo3x3 = this.Descendants.Find(uI3x3);

        UICondition uI4x4 = UICondition.Create("@Name='4x4'", new Object[0]);
        UIObject uIo4x4 = this.Descendants.Find(uI4x4);

        MS.Internal.Mita.Foundation.Controls.RadioButton radioButton3 = new MS.Internal.Mita.Foundation.Controls.RadioButton(uIo3x3);
        MS.Internal.Mita.Foundation.Controls.RadioButton radioButton4 = new MS.Internal.Mita.Foundation.Controls.RadioButton(uIo4x4);
        if (radioButton3.IsSelected)
        {
            radioButton4.Select();
        }

        //http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=27142
        //UICondition uICcreate2 = UICondition.Create("@Name='Create'", new Object[0]);
        //UIObject uIoCreate2 = this.Descendants.Find(uICcreate2);
        //Window objcreate2 = new Window(uIoCreate2);

        //UIProperty u = UIProperty.Get("ClassName");
        //UICondition uIcondition2 = UICondition.Create(u, "#32770");
        //WindowOpenedWaiter wait2 = new WindowOpenedWaiter(uIcondition2);
        //objcreate2.Click();
        //wait2.Wait(5000);

        //UIObject ui2 = this.Children.Find(uIcondition2);
        //UIObject uiyes = ui2.Children.Find(UICondition.Create("@Name='Yes'", new Object[0]));
        //Window winyes = new Window(uiyes);
        //Thread.Sleep(300);
        //winyes.Click();
    }
开发者ID:TerabyteX,项目名称:main,代码行数:37,代码来源:WinClass.cs

示例4: Test_play

 public void Test_play()
 {
     UICondition uIToStart = UICondition.Create("@Name='Shuffle\nto\nStart'", new Object[0]);
     for (int i = 0; i < 1000; i++)
     {
         if (this.Descendants.Contains(uIToStart))
         {
             break;
         }
         Thread.Sleep(100);
     }
     UIObject uIoStart = this.Descendants.Find(uIToStart);
     Window objStart = new Window(uIoStart);
     objStart.Click();
     play_puzzle();
 }
开发者ID:TerabyteX,项目名称:main,代码行数:16,代码来源:WinClass.cs

示例5: Test_options

 public void Test_options()
 {
     UICondition uICondition = UICondition.Create("@Name='options'", new Object[0]);
     UIObject uIObject = this.Descendants.Find(uICondition);
     Window obj = new Window(uIObject);
     UICondition uI2 = UICondition.Create("@Name='Tile Size'",new Object[0]);
     UICondition uI50 = UICondition.Create("@Name='50%'",new Object[0]);
     UICondition uI100 = UICondition.Create("@Name='100%'", new Object[0]);
     UICondition uI75 = UICondition.Create("@Name='75%'", new Object[0]);
     obj.Click();
     UIObject uITileSize = this.Descendants.Find(uI2);
     UIObject uIo75 = this.Descendants.Find(uI75);
     UIObject uIo100 = this.Descendants.Find(uI100);
     Window obj75 = new Window(uIo75);
     obj75.Click();
     Thread.Sleep(200);
     Window obj100 = new Window(uIo100);
     obj100.Click();
     UIObject uIo50 = this.Descendants.Find(uI50);
     Thread.Sleep(200);
     Window obj50= new Window(uIo50);
     obj50.Click();
     Thread.Sleep(200);
     //UICondition uICache = UICondition.Create("@Name='Allow caching'", new Object[0]);
     //UIObject uIoCache = this.Descendants.Find(uICache);
     //Window objCache = new Window(uIoCache);
     //objCache.Click();
     //Thread.Sleep(200);
     UICondition uIClsCa = UICondition.Create("@Name='Clear Cache'", new Object[0]);
     UIObject uIoClsCa = this.Descendants.Find(uIClsCa);
     Window objClsCa = new Window(uIoClsCa);
     objClsCa.Click();
     Thread.Sleep(200);
 }
开发者ID:TerabyteX,项目名称:main,代码行数:34,代码来源:WinClass.cs

示例6: Test_load

    public void Test_load()
    {
        UICondition uICondition = UICondition.Create("@Name='load'", new Object[0]);
        UIObject uIObject = this.Descendants.Find(uICondition);
        Window obj = new Window(uIObject);
        obj.Click();

        UICondition uIButton1 = UICondition.Create("@Name='Seattle (default game)\n(327, 714)\nAerial - Zoom Level 11 - 3x3'", new Object[0]);
        UIObject uIoButton1 = this.Descendants.Find(uIButton1);
        Window objButton1 = new Window(uIoButton1);
        objButton1.Click();
        Thread.Sleep(100);

        UICondition uIButton2 = UICondition.Create("@Name='New York\n(1205, 1538)\nRoad - Zoom Level 12 - 3x3'", new Object[0]);
        UIObject uIoButton2 = this.Descendants.Find(uIButton2);
        Window objButton2 = new Window(uIoButton2);
        objButton2.Click();
        Thread.Sleep(100);

        UICondition uIButton3 = UICondition.Create("@Name='World\n(0, 0)\nHybrid - Zoom Level 2 - 4x4'", new Object[0]);
        UIObject uIoButton3 = this.Descendants.Find(uIButton3);
        Window objButton3 = new Window(uIoButton3);
        objButton3.Click();
        Thread.Sleep(100);

        UICondition uIButton4 = UICondition.Create("@Name='North America\n(2, 5)\nAerial - Zoom Level 4 - 3x3'", new Object[0]);
        UIObject uIoButton4 = this.Descendants.Find(uIButton4);
        Window objButton4 = new Window(uIoButton4);
        objButton4.Click();
        Thread.Sleep(100);

        UICondition uILoad = UICondition.Create("@Name='Load Puzzle'", new Object[0]);
        UIObject uIoLoad = this.Descendants.Find(uILoad);
        Window objLoad = new Window(uIoLoad);
        objLoad.Click();
    }
开发者ID:TerabyteX,项目名称:main,代码行数:36,代码来源:WinClass.cs


注:本文中的Window.Click方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。