Skip to content

Add a sample of sparse packaged Winforms using WCR #444

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 18, 2025

Conversation

ssparach
Copy link

@ssparach ssparach commented Apr 16, 2025

Description

This pull request includes sample code demonstrating how to invoke WCR APIs within a Windows Forms application (sparse packaged). The application performs text recognition and summarization of text on an image after displaying package information.

Target Release

The example currently targets the 1.7-experimental3 which contains the WCR API. However, this will be updated in the future to target the stable release when it becomes available.

Checklist

Note that /azp run currently isn't working for this repo.

@ssparach ssparach marked this pull request as ready for review April 16, 2025 17:54
@ssparach ssparach requested a review from codendone April 16, 2025 18:33
Copy link

@codendone codendone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Added a few small comments.

}
base.Dispose(disposing);

// Find and end WCRforWinformsSparse.exe process as best effort

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this "Find an end" code an effort to fix the process hang issue you mentioned? I wouldn't expect this to be needed.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, there were instances when I could click 'exit' on the main form even though everything else was unresponsive and hanging. Hence, I added code in the dispose method to ensure the process ends if possible.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could maybe understand killing/exiting the current process, but finding and killing other processes seems weird.

I wondered if this code may have been added due to the extra run code which you've now removed, but the symptom you described sounds different.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking about this a bit more, I am inclined to remove this for now. I will revisit later if the sample application persistently continues to hang and will make a note to verify this when samples will be updated to the stable release. Thanks!

@ssparach ssparach requested a review from codendone April 18, 2025 16:39
@ssparach ssparach merged commit 56d5abb into release/experimental Apr 18, 2025
1 check passed
@ssparach ssparach deleted the user/ssparach/sparsepckgwinforms branch April 18, 2025 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants