
주요 Code
MSDN
http://msdn.microsoft.com/ko-kr/library/system.componentmodel.backgroundworker(v=VS.90).aspx?appId=Dev10IDEF1&l=KO-KR&k=k(EHINVALIDOPERATION.WINFORMS.ILLEGALCROSSTHREADCALL);k(TargetFrameworkMoniker-".NETFRAMEWORK&k=VERSION=V3.5");k(DevLang-CSHARP)&rd=true
Created with colorer-take5 library. Type 'csharp' //sync private void testCodeSync() { using (System.Net.WebClient wc = new System.Net.WebClient()) { wc.DownloadFile(streamPath, "test_"+checkTime.ToString()+currentState+".tmp"); } stateTx.Text = currentState + " :: done"; } //async private void testCodeAsync() { using (System.Net.WebClient wc = new System.Net.WebClient()) { wc.DownloadFileAsync(streamPath, "test_" + checkTime.ToString() + currentState + ".tmp"); } stateTx.Text = currentState + " :: done"; } //################ //backgroundworker BackgroundWorker bw = new BackgroundWorker(); void BGWorker() { //bw = new BackgroundWorker(); bw.RunWorkerAsync(); bw.DoWork += new DoWorkEventHandler(bw_DoWork); bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bw_RunWorkerCompleted); } void bw_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { //RunWorkerCompleted 이벤트 안에서는 윈폼 스레드로 돌아와 안전��게 컨트롤 할�� 있다. stateTx.Text = currentState + " :: done"; bw.Dispose(); } void bw_DoWork(object sender, DoWorkEventArgs e) { using (System.Net.WebClient wc = new System.Net.WebClient()) { wc.DownloadFile(streamPath, "test_" + checkTime.ToString() + currentState + ".tmp"); } //에러! : 크로스 스레딩 ( 스레드가 다르다 ) //stateTx.Text = currentState + " :: done"; }인터넷 속도가 빠를경우 테스트가 잘 되지 않지만 Async 도 처음에 실행할때는 약간의 딜레이가 생긴다
sync 는 항상 딜레이가 생긴다.
테스트 타겟은 구글의 메인페이지 이다.
'C#' 카테고리의 다른 글
[Sharp Developer , XNA3.1] SharpDeveloper 의 Empty 프로젝트에 XNA 사용하기 (1369) | 2010.12.04 |
---|---|
[c#][Aforge] 웹캠 영상출력 (174) | 2010.12.04 |
[BackGroundWorkerTEST] Sync , Async , Thread (282) | 2010.12.04 |
[WIN32API] (61) | 2010.12.04 |
[user32.dll] 강제 마우스 컨트롤 ( user32.dll spec ) (63) | 2010.12.04 |
[Thread Invoke / BeginInvoke] invoke 와 begininvoke 의 차이 연구 (74) | 2010.12.04 |
이용약관위배로 관리자 삭제된 댓글입니다.
이용약관위배로 관리자 삭제된 댓글입니다.
이용약관위배로 관리자 삭제된 댓글입니다.
이용약관위배로 관리자 삭제된 댓글입니다.
이용약관위배로 관리자 삭제된 댓글입니다.
이용약관위배로 관리자 삭제된 댓글입니다.
이용약관위배로 관리자 삭제된 댓글입니다.
이용약관위배로 관리자 삭제된 댓글입니다.
이용약관위배로 관리자 삭제된 댓글입니다.
이용약관위배로 관리자 삭제된 댓글입니다.
이용약관위배로 관리자 삭제된 댓글입니다.
이용약관위배로 관리자 삭제된 댓글입니다.
데니冒险岛服务端奇迹mu服务端传奇外传服务端风云无双服务端神迹服务端
英雄王座travia服务端暗黑修仙服务端仙境传说ro服务端弹弹堂服务端
蜀门服务端RF服务端丝路传说服务端倚天2服务端决战服务端征服-SF端
传奇私服开服一条龙开区服务-
魔域私服一条龙开区服务-
传奇广告代理-
IDC服务器以及空间租用-
破天私服开服一条龙服务-
客服咨询QQ(企鹅扣扣)1124999543
Email:1124999543@qq.com
更多商业版本免费开放下载
遨腾科技梦幻真彩5D堡垒王国玛法战场韩国连击版传奇服务端
遨腾科技新传奇全新3D界面装备打孔座骑技能镶嵌宝石英雄合击特别版传奇服务端
遨腾科技已开5区独家传承宝盒2.06装备精炼属性转移特色赌神轻变升级版传奇服务端
에런
다없the best way we'd like most efficientmedical attentidirectly to stick fitand fit same way our pets also desirecare, medical attention and prefer to stick fitand fit. additionally they get illness and disease hence additionally they require smartdoctors specialized to offer them hospital therapy. Doctors who're specialized in giving hospital therapy and attentidirectly to animals are referred to as그있
단에Another challenge is of course the selection of the fastest checkout line in the supermarket, a feat that requires a vast array of skills and experience combining the assessment of shopper behavior (cash vs. check,Popular Shopping Destinations, self bagging vs. the delegation of bagging, possession of a store discount card vs. the often fictionalized "my spouse has the store discount card"), the k는없
방일Black and military green. Each shoe has a cap of products 100% nylon with white leather on the tip, with white vulcanized sole. The following is a list detailing details log on to Nike Air Max 90.
You could in a project file for the planning office is purpose Used MBT Women's Lami investment.Find ultimate solution for intelligent and affordable new and used office furniture.
Quite ofte법법
가메They are comfortable and keep your feet feel different! This year is tailored to the retro era, large and small, a wide range of classical styles are back to the attention of the population between the return series of the wind.
Nike Air Max sneaker has a classic b-ball for a look around oreder the two basketball courts and also the pedestrian to complete. Nike Air Max 95, a draft model Spo수메
있선Security Headaches
O.K., so the iPad really won't reduce any costs in my business. Can we justify its business ROI through increased employee productivity? Ha! You try using one of those things for a few hours and then tell me how much actual work you accomplished. It's just too damn fun.
Clients are going to ask me why I don't recommend it for their business. My employees are going 어알
다방火车采集器html简单模板示范
Fulfill Your Pocket Bike Desires with Mini Chopper Bikes
[标签:来源]
There are those among us who collect big toys not just for the sake of displaying them, but also of enjoying them to the fullest. Pocket bikes,How to Read a Woman's Body La, for example, are there to be ridden and seen in public in,Online Shopping- Choosing Awe, and customi관알
서방Like the above, knitted hat and a jacket with a lining seam searsucker-like. We're not normally a heavy logo'd pieces, but the embroidered letters feels like a part of the winter-generic design.
Few have left thoughts about the current collection. Moncler is not for everyone because not everyone can come from the look of nyloned painted in a bright color, but there are some interesting piec일있