Esempio n. 1
0
        public System.Collections.ArrayList GetDialogWindows( )
        {
            Tracing.StartMethodTrace();
            System.Collections.ArrayList dialogs = new System.Collections.ArrayList();

            System.Collections.ArrayList dialogs1 = UI.Window_GetTopLevelWindows();
            System.Collections.ArrayList dialogs2 = UI.Window_GetChildWindows(this.m_painter);

            foreach (int hwnd in dialogs1)
            {
                if (this.IsPainterDialog(hwnd))
                {
                    string wclass = WindowsAutomation.UI.Window_GetWindowClass(hwnd);
                    string title  = WindowsAutomation.UI.Window_GetWindowText(hwnd);
                    if ((wclass == "_ASI_THREED_") && (title == ""))
                    {
                        continue;
                    }
                    dialogs.Add(hwnd);
                    Trace.WriteLine("Found Painter Dialog");
                    Tracing.DumpWindow(hwnd);
                }
            }
            foreach (int hwnd in dialogs2)
            {
                if (this.IsPainterDialog(hwnd))
                {
                    dialogs.Add(hwnd);
                }
            }
            Tracing.EndMethodTrace();
            return(dialogs);
        }