void ShowDetail() { if (factory == null) { factory = new TaskFactory(); } if (barHolder == null) { barHolder = new ProgressBar(); barHolder.Height = 25; barHolder.Width = 25; barHolder.Style = App.Current.Resources["MaterialDesignCircularProgressBar"] as Style; barHolder.IsIndeterminate = true; barHolder.Value = 50; barHolder.Margin = new Thickness(25); } mHost.ShowDialog(barHolder); Task tSpecify = factory.StartNew(new Action <object>(onShowResult.SpecifyAsync), new Action(() => { this.Dispatcher.Invoke(new Action(() => { detail = new LSongDetail(onShowResult); mHost.IsOpen = false; mHost.ShowDialog(detail); })); })); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.LDetailUserControl = ((LrcEditor.LSongDetail)(target)); return; case 2: this.CloseBtn = ((System.Windows.Controls.Button)(target)); #line 26 "..\..\LSongDetail.xaml" this.CloseBtn.Click += new System.Windows.RoutedEventHandler(this.CloseBtn_Click); #line default #line hidden return; case 3: this.DownloadDialog = ((MaterialDesignThemes.Wpf.DialogHost)(target)); return; case 4: this.CancelDownloadBtn = ((System.Windows.Controls.Button)(target)); #line 45 "..\..\LSongDetail.xaml" this.CancelDownloadBtn.Click += new System.Windows.RoutedEventHandler(this.CancelDownloadBtn_Click); #line default #line hidden return; case 5: this.DownloadProgressBar = ((System.Windows.Controls.ProgressBar)(target)); return; case 6: this.imgBorder = ((System.Windows.Controls.Border)(target)); return; case 7: this.AlbumImg = ((System.Windows.Controls.Image)(target)); return; case 8: this.ImgCopy = ((System.Windows.Controls.MenuItem)(target)); #line 58 "..\..\LSongDetail.xaml" this.ImgCopy.Click += new System.Windows.RoutedEventHandler(this.ImgCopy_Click); #line default #line hidden return; case 9: this.DetailInfoPanel = ((System.Windows.Controls.StackPanel)(target)); return; case 10: this.SnakeB = ((MaterialDesignThemes.Wpf.Snackbar)(target)); return; case 11: #line 82 "..\..\LSongDetail.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.OnlinePage_Click); #line default #line hidden return; case 12: #line 85 "..\..\LSongDetail.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.OnlineMusic_Click); #line default #line hidden return; case 13: #line 88 "..\..\LSongDetail.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.AddLrc_Click); #line default #line hidden return; case 14: #line 91 "..\..\LSongDetail.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.DownFile_Click); #line default #line hidden return; case 15: this.Folder = ((System.Windows.Controls.Button)(target)); #line 94 "..\..\LSongDetail.xaml" this.Folder.Click += new System.Windows.RoutedEventHandler(this.Folder_Click); #line default #line hidden return; } this._contentLoaded = true; }