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:
- the program opened first time. no user logged in opens userhandling form
- the userhandling form opened. when user done , locks app, goes step 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.
- 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
Post a Comment