private void InitEvent() { // 下載事件不能這麼快掛上去,要等全部FileRow產生完成,在掛上去 // 不然如果在下載中,會阻塞到UI的產生 FileDownloader fileDownloader = Singleton_FileDownloader.GetInstance(userMeeting.ID); Start_callback = new MeetingRoom_DownloadFileStart_Function(MeetingRoom_DownloadFileStart_Callback); Progress_callback = new MeetingRoom_DownloadProgressChanged_Function(MeetingRoom_DownloadProgressChanged_Callback); ErrorFinish_callback = new MeetingRoom_DownloadFileToErrorCompleted_Function(MeetingRoom_DownloadFileToErrorCompleted_Callback); fileDownloader.MeetingRoom_DownloadFileStart_Event += Start_callback; fileDownloader.MeetingRoom_DownloadProgressChanged_Event += Progress_callback; fileDownloader.MeetingRoom_DownloadFileToErrorCompleted_Event += ErrorFinish_callback; this.MouseLeftButtonDown += MeetingRoom_MouseLeftButtonDown; btnSeries.MouseEnter += (sender, e) => { MouseTool.ShowHand(); }; btnSeries.MouseLeave += (sender, e) => { MouseTool.ShowArrow(); }; btnSeries.MouseLeftButtonDown += btnSeries_MouseLeftButtonDown; btnDelete.MouseEnter += (sender, e) => { MouseTool.ShowHand(); }; btnDelete.MouseLeave += (sender, e) => { MouseTool.ShowArrow(); }; btnDelete.MouseLeftButtonDown += btnDelete_MouseLeftButtonDown; btnRefresh.MouseEnter += (sender, e) => { MouseTool.ShowHand(); }; btnRefresh.MouseLeave += (sender, e) => { MouseTool.ShowArrow(); }; btnRefresh.MouseLeftButtonDown += btnDownload_btnPausing_MouseLeftButtonDown; btnDownload.MouseEnter += (sender, e) => { MouseTool.ShowHand(); }; btnDownload.MouseLeave += (sender, e) => { MouseTool.ShowArrow(); }; btnDownload.MouseLeftButtonDown += btnDownload_btnPausing_MouseLeftButtonDown; // 要變成暫停下載 btnPause.MouseEnter += (sender, e) => { MouseTool.ShowHand(); }; btnPause.MouseLeave += (sender, e) => { MouseTool.ShowArrow(); }; btnPause.MouseLeftButtonDown += btnPause_MouseLeftButtonDown; // 要變成繼續下載 btnPausing.MouseEnter += (sender, e) => { MouseTool.ShowHand(); }; btnPausing.MouseLeave += (sender, e) => { MouseTool.ShowArrow(); }; btnPausing.MouseLeftButtonDown += btnDownload_btnPausing_MouseLeftButtonDown; }
private void InitEvent() { FileDownloader instance = Singleton_FileDownloader.GetInstance(userMeeting.ID); Start_callback = new MeetingRoom_DownloadFileStart_Function(MeetingRoom_DownloadFileStart_Callback); Progress_callback = new MeetingRoom_DownloadProgressChanged_Function(MeetingRoom_DownloadProgressChanged_Callback); ErrorFinish_callback = new MeetingRoom_DownloadFileToErrorCompleted_Function(MeetingRoom_DownloadFileToErrorCompleted_Callback); instance.MeetingRoom_DownloadFileStart_Event += Start_callback; instance.MeetingRoom_DownloadProgressChanged_Event += Progress_callback; instance.MeetingRoom_DownloadFileToErrorCompleted_Event += ErrorFinish_callback; base.MouseLeftButtonDown += new MouseButtonEventHandler(MeetingRoom_MouseLeftButtonDown); Image image = btnSeries; if (CS_0024_003C_003E9__CachedAnonymousMethodDelegate13 == null) { CS_0024_003C_003E9__CachedAnonymousMethodDelegate13 = new MouseEventHandler(_003CInitEvent_003Eb__7); } image.MouseEnter += CS_0024_003C_003E9__CachedAnonymousMethodDelegate13; Image image2 = btnSeries; if (CS_0024_003C_003E9__CachedAnonymousMethodDelegate14 == null) { CS_0024_003C_003E9__CachedAnonymousMethodDelegate14 = new MouseEventHandler(_003CInitEvent_003Eb__8); } image2.MouseLeave += CS_0024_003C_003E9__CachedAnonymousMethodDelegate14; btnSeries.MouseLeftButtonDown += new MouseButtonEventHandler(btnSeries_MouseLeftButtonDown); Image image3 = btnDelete; if (CS_0024_003C_003E9__CachedAnonymousMethodDelegate15 == null) { CS_0024_003C_003E9__CachedAnonymousMethodDelegate15 = new MouseEventHandler(_003CInitEvent_003Eb__9); } image3.MouseEnter += CS_0024_003C_003E9__CachedAnonymousMethodDelegate15; Image image4 = btnDelete; if (CS_0024_003C_003E9__CachedAnonymousMethodDelegate16 == null) { CS_0024_003C_003E9__CachedAnonymousMethodDelegate16 = new MouseEventHandler(_003CInitEvent_003Eb__a); } image4.MouseLeave += CS_0024_003C_003E9__CachedAnonymousMethodDelegate16; btnDelete.MouseLeftButtonDown += new MouseButtonEventHandler(btnDelete_MouseLeftButtonDown); Image image5 = btnRefresh; if (CS_0024_003C_003E9__CachedAnonymousMethodDelegate17 == null) { CS_0024_003C_003E9__CachedAnonymousMethodDelegate17 = new MouseEventHandler(_003CInitEvent_003Eb__b); } image5.MouseEnter += CS_0024_003C_003E9__CachedAnonymousMethodDelegate17; Image image6 = btnRefresh; if (CS_0024_003C_003E9__CachedAnonymousMethodDelegate18 == null) { CS_0024_003C_003E9__CachedAnonymousMethodDelegate18 = new MouseEventHandler(_003CInitEvent_003Eb__c); } image6.MouseLeave += CS_0024_003C_003E9__CachedAnonymousMethodDelegate18; btnRefresh.MouseLeftButtonDown += new MouseButtonEventHandler(btnDownload_btnPausing_MouseLeftButtonDown); Image image7 = btnDownload; if (CS_0024_003C_003E9__CachedAnonymousMethodDelegate19 == null) { CS_0024_003C_003E9__CachedAnonymousMethodDelegate19 = new MouseEventHandler(_003CInitEvent_003Eb__d); } image7.MouseEnter += CS_0024_003C_003E9__CachedAnonymousMethodDelegate19; Image image8 = btnDownload; if (CS_0024_003C_003E9__CachedAnonymousMethodDelegate1a == null) { CS_0024_003C_003E9__CachedAnonymousMethodDelegate1a = new MouseEventHandler(_003CInitEvent_003Eb__e); } image8.MouseLeave += CS_0024_003C_003E9__CachedAnonymousMethodDelegate1a; btnDownload.MouseLeftButtonDown += new MouseButtonEventHandler(btnDownload_btnPausing_MouseLeftButtonDown); Image image9 = btnPause; if (CS_0024_003C_003E9__CachedAnonymousMethodDelegate1b == null) { CS_0024_003C_003E9__CachedAnonymousMethodDelegate1b = new MouseEventHandler(_003CInitEvent_003Eb__f); } image9.MouseEnter += CS_0024_003C_003E9__CachedAnonymousMethodDelegate1b; Image image10 = btnPause; if (CS_0024_003C_003E9__CachedAnonymousMethodDelegate1c == null) { CS_0024_003C_003E9__CachedAnonymousMethodDelegate1c = new MouseEventHandler(_003CInitEvent_003Eb__10); } image10.MouseLeave += CS_0024_003C_003E9__CachedAnonymousMethodDelegate1c; btnPause.MouseLeftButtonDown += new MouseButtonEventHandler(btnPause_MouseLeftButtonDown); Image image11 = btnPausing; if (CS_0024_003C_003E9__CachedAnonymousMethodDelegate1d == null) { CS_0024_003C_003E9__CachedAnonymousMethodDelegate1d = new MouseEventHandler(_003CInitEvent_003Eb__11); } image11.MouseEnter += CS_0024_003C_003E9__CachedAnonymousMethodDelegate1d; Image image12 = btnPausing; if (CS_0024_003C_003E9__CachedAnonymousMethodDelegate1e == null) { CS_0024_003C_003E9__CachedAnonymousMethodDelegate1e = new MouseEventHandler(_003CInitEvent_003Eb__12); } image12.MouseLeave += CS_0024_003C_003E9__CachedAnonymousMethodDelegate1e; btnPausing.MouseLeftButtonDown += new MouseButtonEventHandler(btnDownload_btnPausing_MouseLeftButtonDown); }