3C科技 娛樂遊戲 美食旅遊 時尚美妝 親子育兒 生活休閒 金融理財 健康運動 寰宇綜合

Zi 字媒體

2017-07-25T20:27:27+00:00
加入好友
C# Thread+GIF+Dialog 實作等待動畫     GITHUB URL : https://github.com/jash-git/CS_Animation_Thread       public void createThreadAnimation(String StrMsg, ParameterizedThreadStart fun)//執行多執行序和顯示等待動畫     {         ProgressDialog d = new ProgressDialog();         Thread t = new Thread(fun);         t.Start(d);         d.StartPosition = FormStartPosition.CenterParent;         d.m_strMessage = StrMsg;         d.ShowDialog();     }     public void Thread_function(object arg)//執行序     {         ProgressDialog d = (ProgressDialog)arg;         ….do something….         d.Invoke(new Action(d.Close));     }     ————          createThreadAnimation(“Dialog Message”, Thread_function);               //ps ProgressDialog包含一個GIF動畫和一個文字標籤      

本文由jashliaoeuwordpress提供 原文連結

寫了 5860316篇文章,獲得 23313次喜歡
精彩推薦