java invoke假死_BeginInvoke界面照样卡死,求救赎

这段代码展示了如何根据不同的类型(视频、文字、问题)来动态地显示和配置界面元素,如标题、内容区域、播放器等。同时,它处理了数据加载,包括视频播放、内容显示和问题呈现,并且在加载完成后隐藏了一个标签。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

private void Bind(Info_Node node, int vid, int type, stringGroupNo)

{

label1.Visible= true;

pic= null; question = null; answer = null; content = null; cour = null; anslist = null;

axWindowsMediaPlayer1.currentPlaylist.clear();if (type == -1)

{

lblTitle.Visible= false;

picTP.Visible= false;

lblContent.Visible= false;

lblSubject.Visible= true;

lblSubject.Text=node.NodeTitle;

lblSubject.Location= new Point((this.Width - lblSubject.Width) / 2, (this.Height - lblSubject.Height) / 2);

}else{

lblTitle.alphaRichTextBox1.Rtf=node.NodeRft;

TypeConverter converter= TypeDescriptor.GetConverter(typeof(Point));

lblTitle.Location=(Point)converter.ConvertFromString(node.NodeLocation);

TypeConverter converters= TypeDescriptor.GetConverter(typeof(Size));

lblTitle.Size=(Size)converters.ConvertFromString(node.NodeSize);

lblTitle.Visible= true;if (type == 0) //视频

{

picTP.ImageLocation= "";

picTP.Visible= false;

lblContent.Visible= false;

lblSubject.Visible= false;

cour=Info_CoursewareBLL.GetInfo_Courseware(vid);

axWindowsMediaPlayer1.URL=cour.CoursewareURL;

axWindowsMediaPlayer1.Visible= true;

}else if (type == 1)//文字

{

picTP.Visible= false; lblSubject.Visible = false;

lblContent.Visible= true; lblContent.Show();

axWindowsMediaPlayer1.Visible= false;

content=Info_ContentBLL.GetModel(node.NodeId);if (content != null && content.Contents != "")

{

lblContent.Location=(Point)converter.ConvertFromString(pointSize(content.CLocation, locOrSize.autoSize));

lblContent.Size=(Size)converters.ConvertFromString(content.CSize);

lblContent.alphaRichTextBox1.Rtf=content.Contents;

lblContent.Focus();

}

}else if (type == 3)//问题

{

axWindowsMediaPlayer1.Visible= false;

picTP.ImageLocation= "";

picTP.Visible= false; lblSubject.Visible = false;

lblContent.Visible= true;

content= null; pic = null;

question=Info_QuestionBLL.GetModel(node.NodeId);if (question != null && question.QuestionContent != "")

{if (question.QuestionSeconds > 0)

{

UPublic.Timers=question.QuestionSeconds;

UPublic.QuesId=question.QuestionId.ToString();

mainform.bottom.TimerStar();

}

lblContent.alphaRichTextBox1.Rtf=question.QuestionContent;

lblContent.Location=(Point)converter.ConvertFromString(pointSize(question.QLocation.Trim(), locOrSize.location));

lblContent.Size=(Size)converters.ConvertFromString(question.QSize);

}//加载(刷新)

mainform.BindData("wenti");

}

}

Thread.Sleep(800);

label1.Visible= false;

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值