Ejemplo n.º 1
0
        internal WindowInfo(IntPtr hwnd)
        {
            Hwnd = hwnd;

            string comment;

            if (WindowPropertyStore.GetComment(hwnd, out comment))
            {
                AppWindowProperties props;
                IsParagonWindow = AppWindowProperties.TryParse(comment, out props);
                if (IsParagonWindow)
                {
                    AppInstanceId = props.AppInstanceId;

                    string appId;
                    if (WindowPropertyStore.GetAppId(hwnd, out appId))
                    {
                        AppId = appId;
                    }
                }
            }
        }
        internal AppInfo(IntPtr hwnd)
        {
            _hwnd      = hwnd;
            BrowserPid = (int)Win32Api.GetWindowProcessId(_hwnd);

            string comment;

            if (WindowPropertyStore.GetComment(hwnd, out comment))
            {
                AppWindowProperties props;
                if (AppWindowProperties.TryParse(comment, out props))
                {
                    AppInstanceId = props.AppInstanceId;
                    _workspaceId  = props.WorkspaceId;

                    string appId;
                    if (WindowPropertyStore.GetAppId(_hwnd, out appId))
                    {
                        AppId = appId;
                    }
                }
            }
        }