Click here to Skip to main content
15,887,214 members
Home / Discussions / C#
   

C#

 
Questionprocess Pin
messages13-Dec-12 19:04
messages13-Dec-12 19:04 
AnswerRe: process Pin
OriginalGriff13-Dec-12 21:49
mveOriginalGriff13-Dec-12 21:49 
QuestionThe semaphore timeout period has expired. Pin
C-P-User-313-Dec-12 8:01
C-P-User-313-Dec-12 8:01 
QuestionTextChat works fine and users are added to the list but VoiceChat doesn't work Pin
sagarDuwal13-Dec-12 7:47
sagarDuwal13-Dec-12 7:47 
AnswerRe: TextChat works fine and users are added to the list but VoiceChat doesn't work Pin
OriginalGriff13-Dec-12 8:15
mveOriginalGriff13-Dec-12 8:15 
QuestionLogin Screen Pin
txmatt13-Dec-12 5:15
txmatt13-Dec-12 5:15 
AnswerRe: Login Screen Pin
OriginalGriff13-Dec-12 5:21
mveOriginalGriff13-Dec-12 5:21 
AnswerRe: Login Screen Pin
XsenseX13-Dec-12 5:28
XsenseX13-Dec-12 5:28 
There are many ways to protect this.
However if you want to go for simplicity you can use a global bool for this.

Example:
C#
public bool LoginStatus;


Then an example of usage:
!LoginStatus means basically if false.
LoginStatus means true.

So you set this bool in your login part to true if login is ok.

By using:
C#
LoginStatus = true;


C#
public void YourLogin()
{
   if(!LoginStatus)
   {
     //User is not logged in use a return;
     //Or whatever you wish to do with it.
   }
   else
   {
     //User is logged in continue doing your things.
   }
}


As said above this is a very simple way to do it.
There are lots ways more to do this.
GeneralRe: Login Screen Pin
OriginalGriff13-Dec-12 5:42
mveOriginalGriff13-Dec-12 5:42 
AnswerRe: Login Screen Pin
Matt U.13-Dec-12 7:00
Matt U.13-Dec-12 7:00 
GeneralRe: Login Screen Pin
txmatt13-Dec-12 7:04
txmatt13-Dec-12 7:04 
QuestionIs there an issue with this script? Pin
Vasudevan Deepak Kumar13-Dec-12 4:38
Vasudevan Deepak Kumar13-Dec-12 4:38 
AnswerRe: Is there an issue with this script? Pin
OriginalGriff13-Dec-12 5:00
mveOriginalGriff13-Dec-12 5:00 
GeneralRe: Is there an issue with this script? Pin
Vasudevan Deepak Kumar13-Dec-12 6:17
Vasudevan Deepak Kumar13-Dec-12 6:17 
AnswerRe: Is there an issue with this script? Pin
Eddy Vluggen13-Dec-12 6:43
professionalEddy Vluggen13-Dec-12 6:43 
Questionстрана говна Pin
WebMaster12-Dec-12 22:00
WebMaster12-Dec-12 22:00 
AnswerRe: страна говна Pin
Pete O'Hanlon12-Dec-12 22:41
mvePete O'Hanlon12-Dec-12 22:41 
GeneralRe: страна говна Pin
Killzone DeathMan12-Dec-12 23:30
Killzone DeathMan12-Dec-12 23:30 
GeneralRe: страна говна Pin
Richard MacCutchan13-Dec-12 2:50
mveRichard MacCutchan13-Dec-12 2:50 
AnswerRe: страна говна Pin
Keith Barrow13-Dec-12 0:40
professionalKeith Barrow13-Dec-12 0:40 
GeneralRe: страна говна Pin
Richard Deeming13-Dec-12 1:24
mveRichard Deeming13-Dec-12 1:24 
QuestionHOW TO WRITE IN CONNECTION captcha XML?? Pin
WebMaster12-Dec-12 21:23
WebMaster12-Dec-12 21:23 
AnswerRe: HOW TO WRITE IN CONNECTION captcha XML?? Pin
Mycroft Holmes12-Dec-12 22:20
professionalMycroft Holmes12-Dec-12 22:20 
QuestionProblem when loading dll file in my project: Unable to load DLL “…” The specified module could not be found. (Exception from HRESULT: 0x8007007E) Pin
taibc12-Dec-12 19:21
taibc12-Dec-12 19:21 
AnswerRe: Problem when loading dll file in my project: Unable to load DLL “…” The specified module could not be found. (Exception from HRESULT: 0x8007007E) Pin
Sivaraman Dhamodharan12-Dec-12 19:26
Sivaraman Dhamodharan12-Dec-12 19:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.