谁能帮我看看这段程序要怎么修改?调试出错说:控制不能从一个 case 标签(“case 4:”)贯穿到另一个 case 标签
程序如下:
public static void LY()
{
D1.PUSH_PLAY();
D1.FeedSigFunc();
//byte[] FileName;
char[] TmpFilePath;
short TmpDTMF;
for(short i=0; i<TotalLine; i++)
{
DrawState(i);
switch(Lines[i].State)
{
case CHANNEL_STATE.CH_FREE:
if(D1.RingDetect(i) == true)
{
if(Lines[i].nType == CHANNEL_TYPE.User)
{
D1.OffHook(i);
Lines[i].State = CHANNEL_STATE.CH_OFFHOOK;
}
else
{
Lines[i].State = CHANNEL_STATE.CH_RECEIVEID;
D1.ResetCallerIDBuffer(i);
Lines[i].nTimeElapse = 0;
}
}
break;
case CHANNEL_STATE.CH_RECEIVEID:
byte[] TmpCID = new byte[32];
int iResult = 0;
iResult = D1.GetCallerIDStr(i, TmpCID);
if(iResult == 3)
{
for(int j=0; j<TmpCID.Length; j++)
{
Lines[i].CallerID = Lines[i].CallerID + ((char)TmpCID[j]).ToString();
}
D1.OffHook(i);
D1.StartSigCheck(i);
Lines[i].State = CHANNEL_STATE.CH_OFFHOOK;
}
break;
case CHANNEL_STATE.CH_WAITSECONDRING:
break;
case CHANNEL_STATE.CH_OFFHOOK:
D1.InitDtmfBuf(i);
break;
case CHANNEL_STATE.CH_SELECT:
TmpDTMF = D1.GetDtmfCode(i);
if(TmpDTMF != -1)
{
Lines[i].Dtmf = TmpDTMF.ToString();
switch(Lines[i].Dtmf)
{
case "1":
//FileName = encoding.ascii.getbytes(path);
D1.StartRecordFileNew(i,0,8000*60,0);
break;
case"2":
D1.StopRecordFile(i);
break;
// case"3":
// D1.StartPlayFile(i);
// break;
default:
break;
}
}
}
}
}
}
}
很急麻烦大家帮我看看拉!
[此贴子已经被作者于2006-8-15 13:10:18编辑过]