示例#1
0
        public static void SetTextRaw(int hwnd, string new_caption)
        {
            WindowsAutomation.UI.Window_SetWindowTextRaw(hwnd, new_caption);

            TestWindowText wait_client = new TestWindowText(hwnd, new_caption);
            int            timeout     = 10 * 1000; // 10 seconds
            int            interval    = 500;       // .5 second;
            int            elapsed;
            bool           success = WindowsAutomation.Timing.WaitObject.WaitForCondition(wait_client, timeout, interval, out elapsed);

            if (!success)
            {
                throw new Errors.AutomationError("Timed out setting text");
            }
        }
示例#2
0
文件: UI.cs 项目: saveenr/saveenr
		public static void SetTextRaw( int hwnd, string new_caption)
		{
			
			WindowsAutomation.UI.Window_SetTextRaw( hwnd , new_caption);

			TestWindowText wait_client = new TestWindowText( hwnd , new_caption);
			int timeout = 10 * 1000 ; // 10 seconds
			int interval = 500; // .5 second;
			int elapsed;
			bool success = WindowsAutomation.Timing.WaitObject.WaitForCondition( wait_client, timeout, interval, out elapsed);
			if (!success)
			{
				throw new Errors.AutomationError( "Timed out setting text");
			}
		}