Click here to Skip to main content
15,898,931 members

Comments by Member 11961673 (Top 21 by date)

Member 11961673 19-Sep-15 11:38am View    
what is regex? i m not aware of this . i want the code for the above mentioned problem since am very new to c#
Member 11961673 19-Sep-15 11:37am View    
no.i just want to fetch the file name from the entire string and update my GUI with the message
Member 11961673 5-Sep-15 12:51pm View    
sorry i m very new to all this. i will remove it
Member 11961673 5-Sep-15 12:31pm View    
all the above are the functions of one of the class of the single project. the other class has some functions that uses the concept of threads. if required i wil post the other class's functions also.


plz help me out in solving this hanging issue.
Member 11961673 5-Sep-15 12:27pm View    
Deleted
private bool CheckAsyncMsgRxvd(CanMessage SucessCANMessage)
{
bool status = false;


//bool MsgRead = false;

////Initializes a new instance CommTimer class
CommTimer AsyncMsgRxvdCommTimer = new CommTimer();

////start the timmer for 1 sec
AsyncMsgRxvdCommTimer.Start(Properties.Settings.Default.timeOutInterval);

//// wait until any message is recieved and timeout status is false
while ((this._AsyncMsgRxvdQueue.Count <= 0) && (AsyncMsgRxvdCommTimer.Timedoutstatus == false) && (_CancelStatus == false))
{
}
// AsyncMsgRxvdCommTimer.Dispose();
// if (this._AsyncMsgRxvdQueue.Count == 1 )
//while(this._AsyncMsgRxvdQueue.Count > 0 && (AsyncMsgRxvdCommTimer.Timedoutstatus == false) )
while (AsyncMsgRxvdCommTimer.Timedoutstatus == false && _CancelStatus == false)
{

//read the CAN Message present in the Queue one by one
if (_AsyncMsgRxvdQueue.Count > 0)
{
_AsyncMsgRxvd = this._AsyncMsgRxvdQueue.Dequeue();
}
// MsgRead = true;
//if (status)
//{
//returns true if CAN Message recieved is same as Success CAN Message
if ((_AsyncMsgRxvd.Data == SucessCANMessage.Data) && (_AsyncMsgRxvd.Id == SucessCANMessage.Id) && (_AsyncMsgRxvd.Length == SucessCANMessage.Length))
{
status = true;
AsyncMsgRxvdCommTimer.Dispose();
break;
}
else
{
//thread.sleep(100);
}
//}

}

// return MsgRead;
//function call to read the CAN Message present in the AsyncMsgRxvdQueue
//returns true if there is some message is present in the AsyncMsgRxvdQueue to read
//status = ReadAsyncMsg();


return status;
}