-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Manually cancel/reset open forms #208
Comments
Hey, I would also love to have this feature. I have a console app that sometimes receives requests from a server, in which case I would like to stop the current prompt question and start a new one with the request coming from the server. Thanks for making this cool prompt, I was looking for something like this for a while and just came across this project this week. |
Do you think adding support for CancellationToken would fulfill your request? I would like to refer to the API design. |
For my case I would think that would definitely work, all I want to do is to cancel the current prompt question and create a new one. I guess this is also what @IbexPeak needs? Thank you for your reply. |
Sorry for the late reply, CancellationToken would be ok for me. |
CancellationToken would be nice. |
Hi shibayan,
I currently have the problem that I can't cancel a form like an input form manually.
In my application a wpf window hosts a console, which is shown upon request and can be hidden using a button. If the user inputs text without pressing enter, but than hides the console, the next time the (cleared) console is displayed, the last form is still opened, and results in strange effects with the next inputs (inputs are combined with cached inputs). Creating a fresh console instance does not resolve the problem, as the input form is still open inside Sharprompt.
Currently the only solution is when the use enters "Ctrl" + "C" in combination with Prompt.ThrowExceptionOnCancel, which internally resets the form in Sharprompt. It would be nice if this reset can be called at any time from code for all open forms.
Thanks in advance!
The text was updated successfully, but these errors were encountered: