第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

啟動(dòng)屏幕等待線程完成

啟動(dòng)屏幕等待線程完成

C#
慕無(wú)忌1623718 2019-06-28 11:03:13
啟動(dòng)屏幕等待線程完成我還是有問(wèn)題的飛濺屏幕。我不想用這房子SC.TopMost=true.現(xiàn)在,我的應(yīng)用程序場(chǎng)景如下:在方案中:[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類中的一些內(nèi)容,它等待線程完成。想知道更多細(xì)節(jié),請(qǐng)告訴我需要告訴你的。
查看完整描述

3 回答

?
至尊寶的傳說(shuō)

TA貢獻(xiàn)1789條經(jīng)驗(yàn) 獲得超10個(gè)贊

在兩個(gè)線程中進(jìn)行跟蹤有點(diǎn)讓人費(fèi)解,但我要試一試,然后說(shuō).

我不完全理解您的設(shè)計(jì),但是如果問(wèn)題是當(dāng)您啟動(dòng)第二個(gè)應(yīng)用程序時(shí),SplashScreen表單會(huì)變成白色.這很可能是因?yàn)閱?dòng)屏幕忙于執(zhí)行GetFromServer()中的所有代碼。太忙了,以至于沒(méi)有時(shí)間重新粉刷自己。

為了解決這個(gè)問(wèn)題,我建議您使用后備作業(yè)部件若要執(zhí)行GetFromServer方法,請(qǐng)執(zhí)行以下操作。這將在一個(gè)單獨(dú)的線程中運(yùn)行該方法,并讓表單的線程自由重新繪制自己。


查看完整回答
反對(duì) 回復(fù) 2019-06-28
  • 3 回答
  • 0 關(guān)注
  • 443 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)