这种情况Switch语句不执行 ,因为先调用了GetVariable方法 private void FlashBox_FSCommand(object sender, AxShockwaveFlashObjects._IShockwaveFlashEvents_FSCommandEvent e)
{
textBox1.Text = ((AxShockwaveFlash)sender).GetVariable(e.command) + " from Flash";
//Switch不执行
switch (e.command)
{
case "_tu1": FlashInit(file1); break;
case "_tu2": FlashInit(file2); break;
default: break; }
textBox1.Text = ((AxShockwaveFlash)sender).GetVariable(e.command) + " from Flash";
}
这种情况Switch执行 private void FlashBox_FSCommand(object sender, AxShockwaveFlashObjects._IShockwaveFlashEvents_FSCommandEvent e)
{
// textBox1.Text = ((AxShockwaveFlash)sender).GetVariable(e.command) + " from Flash";
//Switch执行
switch (e.command)
{
case "_tu1": FlashInit(file1); break;
case "_tu2": FlashInit(file2); break;
default: break; }
textBox1.Text = ((AxShockwaveFlash)sender).GetVariable(e.command) + " from Flash";
}为什么调用AxShockwaveFlash对象的GetVariable方法会使FSCommand事件提前结束?
{
textBox1.Text = ((AxShockwaveFlash)sender).GetVariable(e.command) + " from Flash";
//Switch不执行
switch (e.command)
{
case "_tu1": FlashInit(file1); break;
case "_tu2": FlashInit(file2); break;
default: break; }
textBox1.Text = ((AxShockwaveFlash)sender).GetVariable(e.command) + " from Flash";
}
这种情况Switch执行 private void FlashBox_FSCommand(object sender, AxShockwaveFlashObjects._IShockwaveFlashEvents_FSCommandEvent e)
{
// textBox1.Text = ((AxShockwaveFlash)sender).GetVariable(e.command) + " from Flash";
//Switch执行
switch (e.command)
{
case "_tu1": FlashInit(file1); break;
case "_tu2": FlashInit(file2); break;
default: break; }
textBox1.Text = ((AxShockwaveFlash)sender).GetVariable(e.command) + " from Flash";
}为什么调用AxShockwaveFlash对象的GetVariable方法会使FSCommand事件提前结束?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货