• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# WindowItems.Window类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中White.Core.UIItems.WindowItems.Window的典型用法代码示例。如果您正苦于以下问题:C# Window类的具体用法?C# Window怎么用?C# Window使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Window类属于White.Core.UIItems.WindowItems命名空间,在下文中一共展示了Window类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Setup

        public void Setup()
        {
            _application = LaunchApplication();
            _horizonWindow = FindMainWindow();

            CustomCommandSerializer.AddKnownTypes(typeof(Background));
        }
开发者ID:abolourian,项目名称:WhiteCustomCommands,代码行数:7,代码来源:MyTextBoxTests.cs


示例2: Slide

 public void Slide(Window window)
 {
     var thumb = window.Get<Thumb>("Splitter");
     double originalX = thumb.Location.X;
     thumb.SlideHorizontally(50);
     Assert.AreEqual(originalX + 50, thumb.Location.X);
 }
开发者ID:ritro,项目名称:White,代码行数:7,代码来源:HorizontalThumbTest.cs


示例3: RunTheApplication

 public void RunTheApplication()
 {
     application = Application.Launch("ShopSchedule.exe");
     Assume.That(application, Is.Not.Null, "Application failed to start!");
     mainWindow = application.GetWindows()[0];
     Assume.That(mainWindow, Is.Not.Null, "Could not find the primary window!");
 }
开发者ID:hsteinhilber,项目名称:ShopSchedule,代码行数:7,代码来源:ShellActions.cs


示例4: SetUp

 public void SetUp()
 {
     application =
         Application.Launch(
             @"..\..\..\Components\CustomCommands\Tests\WPFTestApplication\bin\debug\White.CustomCommands.WPFTestApplication.exe");
     window = application.GetWindow("Form1");
 }
开发者ID:domik82,项目名称:white,代码行数:7,代码来源:WPFCustomCommandsTest.cs


示例5: FindModalWindowBasedOnSearchCriteriaWhenThereIsNoWindow

 public void FindModalWindowBasedOnSearchCriteriaWhenThereIsNoWindow()
 {
     window = application.GetWindow("Form1", InitializeOption.NoCache);
     window.Get<Button>("launchModal").Click();
     Window modalWindow = window.ModalWindow(SearchCriteria.ByText("ModalForm1"), InitializeOption.NoCache);
     Assert.AreEqual(null, modalWindow);
 }
开发者ID:huangzhichong,项目名称:White,代码行数:7,代码来源:WPFModalWindowTest.cs


示例6: Slide

 public void Slide(Window window)
 {
     var thumb = window.Get<Thumb>("Splitter");
     var originalY = thumb.Location.Y;
     thumb.SlideVertically(50);
     Assert.AreEqual(originalY + 50, thumb.Location.Y);
 }
开发者ID:ritro,项目名称:White,代码行数:7,代码来源:VerticalThumbTest.cs


示例7: New

        public virtual object New(Window window, ScreenRepository screenRepository)
        {
            var o = Activator.CreateInstance(type, window, screenRepository);
            //Get all fields, even from base types
            var fieldInfos = AllTypes(type).SelectMany(t=>t.GetFields(Entity.BindingFlag));
            foreach (var fieldInfo in fieldInfos)
            {
                if (nonInjectedTypes.Any(t=>t.IsAssignableFrom(fieldInfo.FieldType))) continue;

                object injectedObject = null;
                if (typeof(IUIItem).IsAssignableFrom(fieldInfo.FieldType))
                {
                    var interceptor = new UIItemInterceptor(SearchCondition(fieldInfo, window.Framework), window, screenRepository.SessionReport);
                    injectedObject = DynamicProxyGenerator.Instance.CreateProxy(fieldInfo.FieldType, interceptor);
                }
                else if (typeof(AppScreenComponent).IsAssignableFrom(fieldInfo.FieldType))
                {
                    var componentScreenClass = new ScreenClass(fieldInfo.FieldType);
                    injectedObject = componentScreenClass.New(window, screenRepository);
                }

                if (injectedObject != null) fieldInfo.SetValue(o, injectedObject);
            }

            return o;
        }
开发者ID:jasongdove,项目名称:White,代码行数:26,代码来源:ScreenClass.cs


示例8: AuctionSniperDriver

        public AuctionSniperDriver(int timeoutMillis)
        {
            application = Application.Attach(ProcessName);

            window = application.GetWindow("Form1");

            Assert.That(window.DisplayState, Is.EqualTo(DisplayState.Restored));
        }
开发者ID:ChrisFewtrell,项目名称:GOOS-Walkthrough,代码行数:8,代码来源:AuctionSniperDriver.cs


示例9: attach

		public API_VisualStudio_2010 attach()
		{
			GUI = VS_Process = new API_GuiAutomation("devenv");				
			if (VS_Process.TargetProcess.notNull())
				VS_MainWindow = VS_Process.windows()[0];//MAIN_WINDOW_TITLE);
			else
				start();
			return this;
		}
开发者ID:pusp,项目名称:o2platform,代码行数:9,代码来源:API_VisualStudio_2010.cs


示例10: GivenIAmAtANon_BlackLevel

        public void GivenIAmAtANon_BlackLevel()
        {
            _application = Application.Launch(@"..\..\CcdAddIn.TestHarness\bin\Debug\CcdAddIn.TestHarness.exe");
            _mainWindow = _application.GetWindow("MainWindow");
            _mainWindow.Get<Button>("goToRedLevelButton").Click();

            var firstPrinciple = _mainWindow.Get<ListBox>("principlesListView").Items[0];
            Assert.That(firstPrinciple.Text, Is.StringContaining(Resource.DoNotRepeatYourself));
        }
开发者ID:PapaMufflon,项目名称:CcdAddIn,代码行数:9,代码来源:Retrospective.cs


示例11: Generate

        public virtual string Generate(Window window)
        {
            window.ReInitialize(InitializeOption.WithCache);
            var stringBuilder = new StringBuilder();
            var stringWriter = new StringWriter(stringBuilder);

            var cscProvider = new CSharpCodeProvider();
            ICodeGenerator codeGenerator = cscProvider.CreateGenerator(stringWriter);
            var codeGeneratorOptions = new CodeGeneratorOptions {BlankLinesBetweenMembers = false, VerbatimOrder = false};

            codeGenerator.GenerateCodeFromCompileUnit(new CodeSnippetCompileUnit(string.Format("using {0};", typeof(UIItem).Namespace)), stringWriter, codeGeneratorOptions);
            codeGenerator.GenerateCodeFromCompileUnit(new CodeSnippetCompileUnit(string.Format("using {0};", typeof(Window).Namespace)), stringWriter, codeGeneratorOptions);
            codeGenerator.GenerateCodeFromCompileUnit(new CodeSnippetCompileUnit(string.Format("using {0};", typeof(AppScreen).Namespace)), stringWriter, codeGeneratorOptions);

            CodeNamespace codeNamespace = null;
            if (S.IsNotEmpty(options.Namespace))
            {
                codeNamespace = new CodeNamespace(options.Namespace);
            }

            var classDefinition = new CodeTypeDeclaration
                                      {
                                          IsClass = true,
                                          IsPartial = true,
                                          Name = window.Title.Trim().Replace(" ", string.Empty),
                                          TypeAttributes = TypeAttributes.Public
                                      };
            classDefinition.BaseTypes.Add(typeof (AppScreen));

            var constructor = new CodeConstructor {Attributes = MemberAttributes.Family};
            classDefinition.Members.Add(constructor);

            constructor = new CodeConstructor {Attributes = MemberAttributes.Public};
            constructor.Parameters.Add(new CodeParameterDeclarationExpression(typeof(Window), "window"));
            constructor.Parameters.Add(new CodeParameterDeclarationExpression(typeof (ScreenRepository), "screenRepository"));
            constructor.BaseConstructorArgs.Add(new CodeVariableReferenceExpression("window"));
            constructor.BaseConstructorArgs.Add(new CodeVariableReferenceExpression("screenRepository"));
            classDefinition.Members.Add(constructor);

            var visitor = new CodeGenerationVisitor(new WindowCodeGenerationStrategy(options));
            window.Visit(visitor);
            visitor.Generate(classDefinition);

            if (codeNamespace != null)
            {
                codeNamespace.Types.Add(classDefinition);
                codeGenerator.GenerateCodeFromNamespace(codeNamespace, stringWriter, codeGeneratorOptions);
            }
            else
            {
                codeGenerator.GenerateCodeFromType(classDefinition, stringWriter, codeGeneratorOptions);
            }

            stringWriter.Close();
            return stringBuilder.ToString();
        }
开发者ID:hsteinhilber,项目名称:white-project,代码行数:56,代码来源:ScreenObjectGenerator.cs


示例12: CleanupApplication

 public void CleanupApplication()
 {
     if (mainWindow != null) {
         mainWindow.Close();
         mainWindow = null;
     }
     if (application != null && application.HasExited) {
         application.Kill();
         application = null;
     }
 }
开发者ID:hsteinhilber,项目名称:ShopSchedule,代码行数:11,代码来源:ShellActions.cs


示例13: getGridData

 public void getGridData(Window win)
 {
     Thread.Sleep(1000);
      table = win.Get<Table>(SearchCriteria.ByAutomationId("grdDisplay"));
     TableRows rows = table.Rows;
     row = rows[0];
     // below line fails even though it is identified in Spy
     TableCell cell = row.Cells[0];
     String ab = cell.Value.ToString();
     Console.WriteLine(ab + " Cell Data");
     Console.ReadLine();
 }
开发者ID:ananddave123,项目名称:MyLocalRepo,代码行数:12,代码来源:Program.cs


示例14: CloseModal

 protected void CloseModal(Window window)
 {
     Window modalWindow = null;
     try
     {
         modalWindow = window.ModalWindow("ModalForm", InitializeOption.NoCache);
     }
     finally
     {
         if (modalWindow != null) modalWindow.Get<Button>("ok").Click();
     }
 }
开发者ID:hsteinhilber,项目名称:white-project,代码行数:12,代码来源:CoreTestTemplate.cs


示例15: GivenIFinishMyRetrospectiveWithASuggestionToAdvanceToTheNextLevel

        public void GivenIFinishMyRetrospectiveWithASuggestionToAdvanceToTheNextLevel()
        {
            File.Delete(@"..\..\CcdAddIn.TestHarness\bin\Debug\repository");
            File.Copy(@"..\..\repository21perfectRetrospectives", @"..\..\CcdAddIn.TestHarness\bin\Debug\repository");

            _application = Application.Launch(@"..\..\CcdAddIn.TestHarness\bin\Debug\CcdAddIn.TestHarness.exe");
            _mainWindow = _application.GetWindow("MainWindow");
            _mainWindow.Get<Button>("retrospectiveButton").Click();
            _mainWindow.Get<Button>("retrospectiveDoneButton").Click();

            File.Delete("repository");
        }
开发者ID:PapaMufflon,项目名称:CcdAddIn,代码行数:12,代码来源:Retrospective.cs


示例16: OpenNetworkWindow

 public void OpenNetworkWindow()
 {
     Application = Application.Launch(@"C:\Users\Flotschi\git\handle\Handle.WPF\Handle.WPF\bin\Debug\Handle.WPF.exe");
       Assert.IsNotNull(Application);
       MainWindow = Application.GetWindow("Handle");
       Assert.IsNotNull(MainWindow);
       MainWindow.Focus();
       Keyboard.LeaveAllKeys();
       Keyboard.HoldKey(KeyboardInput.SpecialKeys.CONTROL);
       Keyboard.Enter("n");
       NetworkWindow = MainWindow.ModalWindow("Networks");
       Assert.IsNotNull(NetworkWindow);
       Keyboard.LeaveAllKeys();
       NetworkWindow.Close();
       Application.Kill();
 }
开发者ID:schwarz,项目名称:handle,代码行数:16,代码来源:ShortcutTest.cs


示例17: start

		public API_VisualStudio_2010 start()
		{
			 GUI = VS_Process = VisualStudioExe.startProcess().automation(); 
			 for(int i =0; i < 10; i++)
			 {
			 	var windows = VS_Process.windows();
			 	if (windows.notNull() && windows.size()>0)
			 	{
			 		VS_MainWindow = VS_Process.windows()[0];
			 		break;
			 	}
			 	this.sleep(500);
			 }
			 if (VS_MainWindow.isNull())
			 	"In API_VisualStudio_2010 could not find the main Window".error();
			 return this;
		}			    	
开发者ID:pusp,项目名称:o2platform,代码行数:17,代码来源:API_VisualStudio_2010.cs


示例18: BaseTestFixtureTearDown

 protected override void BaseTestFixtureTearDown()
 {
     keyboard.PressSpecialKey(KeyboardInput.SpecialKeys.ESCAPE);
     if (window == null)
         application.Kill();
     else
     {
         try
         {
             window.Focus();
             window.Close();
         }
         catch {}
     }
     if (ConfigurationManager.AppSettings["SaveWindowItemsMap"] == "true") application.ApplicationSession.Save();
     window = null;
     resultLabel = null;
 }
开发者ID:hsteinhilber,项目名称:white-project,代码行数:18,代码来源:ControlsActionTest.cs


示例19: EditBoxEnter

        public void EditBoxEnter(Window win, string Textboxname, string val)
        {
            TextBox TextObj = win.Get<TextBox>(SearchCriteria.ByAutomationId(Textboxname));
            White.Core.InputDevices.AttachedKeyboard keyboard = win.Keyboard;
            if (TextObj != null)
            {
                TextObj.Focus();
                TextObj.RaiseClickEvent();
            // below line fails
                keyboard.Enter("Harriet");
            // even below commented line fails
                //TextObj.Enter(val);
                //TextObj.BulkText = "My simple Text";
                //Keyboard.Instance.Enter("my simple");
                string aa = TextObj.Text;
                Console.WriteLine(aa + " - Value Entered in Textbox");

            }
        }
开发者ID:ananddave123,项目名称:MyLocalRepo,代码行数:19,代码来源:Program.cs


示例20: New

        public virtual object New(Window window, ScreenRepository screenRepository)
        {
            object o = @class.New(window, screenRepository);
            @class.EachField(delegate(FieldInfo fieldInfo)
                                 {
                                     if (nonInjectedTypes.IsAssignableFrom(fieldInfo.FieldType)) return;
                                     object injectedObject = null;
                                     if (typeof (IUIItem).IsAssignableFrom(fieldInfo.FieldType))
                                     {
                                         var interceptor = new UIItemInterceptor(SearchCondition(fieldInfo), window, screenRepository.SessionReport);
                                         injectedObject = DynamicProxyGenerator.Instance.CreateProxy(interceptor, fieldInfo.FieldType);
                                     }
                                     else if (typeof (AppScreenComponent).IsAssignableFrom(fieldInfo.FieldType))
                                     {
                                         var componentScreenClass = new ScreenClass(new Class(fieldInfo.FieldType));
                                         injectedObject = componentScreenClass.New(window, screenRepository);
                                     }

                                     if (injectedObject != null) fieldInfo.SetValue(o, injectedObject);
                                 });
            return o;
        }
开发者ID:tmandersson,项目名称:FastGTD,代码行数:22,代码来源:ScreenClass.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ClientInterfaces.GridInstantMessage类代码示例发布时间:2022-05-26
下一篇:
C# Factory.InitializeOption类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap