c# - Conditional reopening of a form that have been closed -


i have built program based on users being logged in use. , have mainform , userhandling form. how trigger userform if none logged in?

my mainform called program.cs , in init of class check if there no user logged in. if case open userform user can login. when logged in, form closed , he/she can use mainform. now, problem appears when user logs out. store logged in users in list on mainform can sense if user logged in or not (my program can have multiple users logged in @ same time) want sort of loop doesn't occupy whole program automatically opens userform again if "userlist" empty.

i'm looking ideas on how solve this. can me?

edit: added picture of programflow simplify issue: enter image description here

  1. the program opened first time. no user logged in opens userhandling form
  2. the userhandling form opened. when user done , locks app, goes step 3
  3. in step, want automaticly send user userhandlingform, since dont want user use mainform without beeing logged in. dont know here how reopen userhandling form.
  4. userhandlingform open ready take new login.

i'd go like:

while(user logged in && no userhandlingform open) { show userhandlingform } 

but since winforms app, navigated through different types of components dont know , how achieve this. such rare thing want do? facing wrong way?


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -