ACAT.Extensions.Default.FunctionalAgents.NewFile.NewFileAgent.waitForWordWindow C# (CSharp) Méthode

waitForWordWindow() private méthode

Waits for MS Word to start. Does this by checking if the window with the file name title was created
private waitForWordWindow ( String fileName ) : void
fileName String name of the file loaded
Résultat void
        private void waitForWordWindow(String fileName)
        {
            String name = Path.GetFileName(fileName);
            String title = name + " - Microsoft Word";
            Log.Debug(title);
            for (int ii = 0; ii < 10; ii++)
            {
                IntPtr h = User32Interop.FindWindow(null, title);
                if (h != IntPtr.Zero)
                {
                    Log.Debug("window FOUND!!!");
                    break;
                }

                Log.Debug("window not found");
                Thread.Sleep(500);
            }
        }
    }