void FileRowControl_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) { UserFile userFile = sender as UserFile; if (e.PropertyName == "Percentage") { Percentage.Value = userFile.Percentage; Percentage.Visibility = Visibility.Visible; } //当前文件上传完毕 if (userFile.State == Constants.FileStates.Finished) { Percentage.Visibility = Visibility.Collapsed; CWViewUploadedImage cw = new CWViewUploadedImage(); cw.Closed += (o, eventArgs) => { if (cw.DialogResult == true) //确定并就隐藏当前sl应用窗口 { NavPage.javaScriptableObject.OnCloseAvatar(null); //调用js端注册事件 } //Utils.ShowMessageBox("op: 确定并就隐藏当前sl应用窗口"); }; cw.LargeImageWidth.Text = Viewport.Width.ToString(); cw.LargeImageHeight.Text = Viewport.Height.ToString(); cw.Show(); } }
void FileRowControl_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) { UserFile userFile = sender as UserFile; if (e.PropertyName == "Percentage") { Percentage.Value = userFile.Percentage; Percentage.Visibility = Percentage.Value == 100 ? Visibility.Collapsed : Visibility.Visible; } //当前文件上传完毕 if (userFile.State == Constants.FileStates.Finished) { CWViewUploadedImage cw = new CWViewUploadedImage(); cw.Closed += (o, eventArgs) => { if (cw.DialogResult == true)//确定并就隐藏当前sl应用窗口 NavPage.javaScriptableObject.OnCloseAvatar(null); //调用js端注册事件 //Utils.ShowMessageBox("op: 确定并就隐藏当前sl应用窗口"); }; cw.LargeImageWidth.Text = focusRectangle.FocusRect.Width.ToString(); cw.LargeImageHeight.Text = focusRectangle.FocusRect.Height.ToString().ToString(); cw.Show(); captureSource.Start(); } }