启动屏幕等待线程完成我还是有问题的飞溅屏幕。我不想用这房子SC.TopMost=true.现在,我的应用程序场景如下:在方案中:[STAThread]static void Main(){
new SplashScreen(_tempAL);// where _tempAL is an arrayList
Application.Run(new Form1(_tempAL));}在SplashScreen班:public SplashScreen(ArrayList _Data){
DisplaySplash()} private void DisplaySplash(){
this.Show();
this.TopMost = true;
this.CenterToScreen();
this.SetTopLevel(true);
_allServerNarrators = new string[10];
for (int i = 0; i < _allServerNarrators.Length; i++)
_allServerNarrators[i] = null;
GetFromServer();
this.Hide();
_serverData = new ArrayList();
_thisData.Add(_allServerNarrators);
_thisData.Add(_serverNarrators);}private void GetFromServer(){
_serverNarrators = new ArrayList();
string _file = "Suras.serverNar";
if (!Directory.Exists("c:\\ASGAQuraan"))
Directory.CreateDirectory("c:\\ASGAQuraan");
while (counter < 4 && _serverFiles == null)
{
if (Download("c:\\ASGAQuraan", _ftpServerIP, _file))
{
StreamReader _strReader = new StreamReader
("c:\\ASGAQuraan\\"+_file,System.Text.Encoding.Default);
string _line = _strReader.ReadLine();
string _word;
while (true)
{
while (_line != null)
{
_word = _line.Substring(0, _line.IndexOf("*"));
int _narId = Convert.ToInt32(_word);
_line = _line.Substring(2);我想要的是SplashScreen类中的一些内容,它等待线程完成。想知道更多细节,请告诉我需要告诉你的。
- 3 回答
- 0 关注
- 418 浏览
添加回答
举报
0/150
提交
取消