[SOLVED] How To Close The Desktop (and get back to a Login window)

Answered
0
0

Hello Support.

My wisej application starts with a Login window (using the ‘mainWindow’ option in Default.json) and the Login window opens a Desktop for the user. This is all Ok but I want to give a logout option so the user does not have to leave their desktop open. I can’t find out how to close the desktop and go back to normal Window (which will be the Login window again). I can’t do ‘Close()’ from a Desktop. How do I close/end a Desktop and open a normal Window again ?

Thank you

Andrew

  • You must to post comments
Best Answer
1
0

Hi Andrew,

I build a testcase with Wisej 2 and used Application.Exit() and “autoreload” in the Default.json to come back to the Login Dialog after exiting the application.

Steps: Start in myLogin, which can be opened with either “startup” or “mainWindow” in default.json.

After click the login button, the Desktop is assigned and the first Window1 will be created.

After clicking the Exit button in Window1, Application.Exit() will be called.

Best,

Jens

  • Andrew Pearce
    Thank you for your answer Jens. I implemented your suggestions into my application and it works exactly as I was looking for. Thanks again. Andrew
  • You must to post comments
0
0

Hi Andrew,

in addition to Jens solution just a hint that you can close the Desktop with

Application.Desktop.Dispose()
or

Application.Desktop = null

Best regards
Frank

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.