private void LightGrid_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { _003C_003Ec__DisplayClass7 _003C_003Ec__DisplayClass = new _003C_003Ec__DisplayClass7(); _003C_003Ec__DisplayClass._003C_003E4__this = this; _003C_003Ec__DisplayClass.SyncOwnerID = ""; if (txtLight.Text.Equals("關")) { _003C_003Ec__DisplayClass.SyncOwnerID = clientId; } Task.Factory.StartNew(new Action(_003C_003Ec__DisplayClass._003CLightGrid_MouseLeftButtonDown_003Eb__6)); }
private void LawListCT_UnZip_Callback(Law_DownloadItemViewModel lawItem) { Func <LawRow, bool> func = null; _003C_003Ec__DisplayClass7 _003C_003Ec__DisplayClass = new _003C_003Ec__DisplayClass7(); _003C_003Ec__DisplayClass.lawItem = lawItem; if (!base.Dispatcher.CheckAccess()) { base.Dispatcher.BeginInvoke(new Action <Law_DownloadItemViewModel>(LawListCT_UnZip_Callback), _003C_003Ec__DisplayClass.lawItem); return; } IEnumerable <LawRow> source = Enumerable.OfType <LawRow>(LawRowSP.Children); if (func == null) { func = new Func <LawRow, bool>(_003C_003Ec__DisplayClass._003CLawListCT_UnZip_Callback_003Eb__5); } LawRow lawRow = Enumerable.FirstOrDefault(Enumerable.Where(source, func)); if (lawRow == null) { return; } if (_003C_003Ec__DisplayClass.lawItem.FileType == LawFileType.更新檔解壓縮中) { lawRow.txtUpdatePercent.Text = "100 %"; lawRow.pbUpdate.Value = lawRow.pb.Maximum; lawRow.txtUpdatePercent.Visibility = Visibility.Collapsed; lawRow.pbUpdate.Visibility = Visibility.Collapsed; Storyboard storyboard = (Storyboard)lawRow.TryFindResource("sbUpdate"); if (storyboard != null) { storyboard.Begin(); } } else { lawRow.txtPercent.Text = "100 %"; lawRow.pb.Value = lawRow.pb.Maximum; lawRow.txtPercent.Visibility = Visibility.Collapsed; lawRow.pb.Visibility = Visibility.Collapsed; Storyboard storyboard = (Storyboard)lawRow.TryFindResource("sb"); if (storyboard != null) { storyboard.Begin(); } } }
public void _003CGetHttpImage_003Eb__2() { try { _003C_003Ec__DisplayClass7 _003C_003Ec__DisplayClass = new _003C_003Ec__DisplayClass7(); _003C_003Ec__DisplayClass.CS_0024_003C_003E8__locals6 = this; WebClient webClient = new WebClient(); byte[] buffer = webClient.DownloadData(imgUrl); _003C_003Ec__DisplayClass.bitmapImage = new BitmapImage(); using (MemoryStream streamSource = new MemoryStream(buffer)) { _003C_003Ec__DisplayClass.bitmapImage.BeginInit(); _003C_003Ec__DisplayClass.bitmapImage.CacheOption = BitmapCacheOption.OnLoad; _003C_003Ec__DisplayClass.bitmapImage.StreamSource = streamSource; _003C_003Ec__DisplayClass.bitmapImage.EndInit(); _003C_003Ec__DisplayClass.bitmapImage.Freeze(); } _003C_003E4__this.Dispatcher.BeginInvoke(new Action(_003C_003Ec__DisplayClass._003CGetHttpImage_003Eb__3)); } catch (Exception ex) { LogTool.Debug(ex); } }