Exemple #1
0
        public void WaitForSteamPrompt()
        {
            Thread.Sleep(500);
            var promptWindow = GetSteamPromptWindow();

            WindowTools.FocusWindow(promptWindow);

            while (promptWindow != IntPtr.Zero)
            {
                Thread.Sleep(10);
                promptWindow = GetSteamPromptWindow();
            }
        }
Exemple #2
0
        private static IntPtr GetSteamPromptWindow()
        {
            var windows = WindowTools.GetWindowsWithTitleMatching(_launchGamePromptRegex);

            return(Array.Find(windows, w => WindowTools.GetProcessForWindow(w).ProcessName == _processName));
        }